Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No plugin found for prefix 'heroku' in the current project and in the plugin groups

i am trying to deploy a maven java application on heroku using eclipse JEE. But when i run i got this error

[ERROR] No plugin found for prefix 'heroku' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\menna.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]

this is my Pom.xml file

<sourceDirectory>src</sourceDirectory>

<resources>
  <resource>
    <directory>src</directory>
    <excludes>
<exclude>**/*.java</exclude>
    </excludes>
  </resource>
</resources>

<plugins>

  <plugin>
   <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.3</version>
    <configuration>
      <source>1.5</source>
      <target>1.5</target>
    </configuration>
  </plugin>

  <plugin>
    <groupId>com.heroku.sdk</groupId>
    <artifactId>heroku-maven-plugin</artifactId>
    <version>0.5.6</version>
  </plugin>

   <plugin>
      <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.6</version>
       <dependencies>
        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-filtering</artifactId>
            <version>1.3</version>
        </dependency>
      </dependencies>
    </plugin>


  <plugin>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.6</version>
    <configuration>
    <appName>young-anchorage-8143</appName>
      <warSourceDirectory>WebContent</warSourceDirectory>
      <failOnMissingWebXml>false</failOnMissingWebXml>


    </configuration>
  </plugin>


</plugins>

like image 745
Menna Elgohary Avatar asked Nov 24 '15 13:11

Menna Elgohary


2 Answers

According to the error, it is not listed in the plugin groups, but you can force the plugin prefix mapping adding this to your local settings.xml.

<pluginGroups>
  <pluginGroup>com.heroku.sdk</pluginGroup>
</pluginGroups>

I found the plugin group URL checking its last version page, which today is 2.0.7, and found that it is available in central repo, but it seems was not deployed to default plugins group. You can do the same if you ever run in this problem again with other plugins.

like image 143
Andres Eusse Avatar answered Oct 17 '22 00:10

Andres Eusse


Add heroku plugin to your pom.xml under plugins. Also make sure that your packaging is set to war. For more information check heroku's web site

     <plugin>
        <groupId>com.heroku.sdk</groupId>
        <artifactId>heroku-maven-plugin</artifactId>
        <version>2.0.16</version>
     </plugin>

To make it remote use:

heroku git:remote -a "app_name"

like image 35
Cugomastik Avatar answered Oct 17 '22 01:10

Cugomastik