[forge-users] How to install a plugin in maven

forge-users at lists.jboss.org forge-users at lists.jboss.org
Wed Feb 11 01:14:28 EST 2015

I am trying to install a plugin in maven.So the end application is updating pom.xml something like
+  <artifactId>jbake-maven-plugin</artifactId>+
+  <executions>+
+  <execution>+
+  <id>default-generate</id>+
+  <phase>generate-resources</phase>+
+  <goals>+
+  <goal>generate</goal>+
+  </goals>+
+          </execution>+
+  </executions>+
+  </plugin>+
Now i have written code for this

+Coordinate compiler =  CoordinateBuilder.create("br.com.ingenieux:jbake-maven-plugin");+
 +MavenPluginBuilder builder = MavenPluginBuilder.create().setCoordinate(compiler).addExecution(ExecutionBuilder.create().setPhase("default-generate").setPhase("generate-resources").addGoal("generate"));+
 +Plugin plugin = new MavenPluginAdapter(builder);+

But when i run this command the pom.xml is not updated.I know i have only constructed plugin object.Is there any way to install this just like how we use DependencyInstaller for installing dependecies.

Posted by forums
Original post: https://developer.jboss.org/message/918425#918425

More information about the forge-users mailing list