Questions tagged [maven-plugin]

Do not use this tag for the use of specific Maven plugins. Use it only for Maven plugins development related questions.

Maven Plugins, also known as Mojos, are the central feature of Maven that allow for the reuse of common build logic across multiple projects.

From the official Maven documentation

"Maven" is really just a core framework for a collection of Maven Plugins. In other words, plugins are where much of the real action is performed, plugins are used to: create jar files, create war files, compile code, unit test code, create project documentation, and on and on. Almost any action that you can think of performing on a project is implemented as a Maven plugin.


Please do not use this tag for the use of specific Maven plugins. Use it only for Maven plugins development related questions.

More information

3670 questions
62
votes
3 answers

How to check pom.xml for updated dependencies

I am fairly new to Maven and pom.xml. Is there a way I can find out which of my dependencies that are outdated, so that I can update version numbers in my pom.xml. In other languages, for instance, Ruby has the command gem list outdated that gives…
Jesper Rønn-Jensen
  • 106,591
  • 44
  • 118
  • 155
61
votes
9 answers

What is the best way to avoid maven-jar?

I am using a different plugin (ant4eclipse) to jar my files. What is the best way to avoid the maven-jar plugin from executing? I tried to remove the maven-jar-plugin I tried to ** / * < / exclude> I tried to…
unj2
  • 52,135
  • 87
  • 247
  • 375
60
votes
11 answers

m2e lifecycle-mapping not found

I am trying to use the solution described here to solve the annoying "Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.7:add-source (execution: default, phase: generate-sources)" when I place the…
TraderJoeChicago
  • 6,205
  • 8
  • 50
  • 54
59
votes
4 answers

Changing the order of maven plugins execution

I am new to maven, I would like to change the order of the maven plugins execution. In my pom.xml, I have maven-assembly-plugin and maven-ant-plugin. maven-assembly-plugin for creating a zip file. maven-ant-plugin for copying the zip file from…
user1062115
  • 591
  • 1
  • 4
  • 4
57
votes
3 answers

In netbeans 7 how do I skip testing and add maven additional parameters when building a maven project?

I want to issue commands like -Dmaven.test.skip=true -Dcheckstyle.skip
bneil
  • 1,590
  • 3
  • 16
  • 26
57
votes
13 answers

Maven:Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.7:resources

I am building my project using Maven. My maven version is apache-maven-3.0.4. I am using Eclipse Luna. When I try to build my project I get the following error [ERROR] Failed to execute goal…
Avinash Reddy
  • 2,204
  • 3
  • 25
  • 44
57
votes
6 answers

Maven: Overview for the values of Maven properties

I would like to find out the values of all Maven properties as they apply to some Maven project. mvn help:system lists OS environment variables and JVM system properties, but no Maven properties. mvn help:evaluate only works in an interactive mode,…
Abdull
  • 26,371
  • 26
  • 130
  • 172
50
votes
9 answers

How to copy .war to Tomcat's webapps directory using Maven?

Is there anything I can add to pom.xml that will copy the generated .war file from the target directory to my Tomcat's webapps directory?
l15a
  • 2,547
  • 5
  • 29
  • 41
50
votes
4 answers

webxml attribute is required with Servlet 3.0

I get this error when trying to compile a Vaadin WAR: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project testvaadin-web: Error assembling WAR: webxml attribute is required (or pre-existing…
Roger
  • 2,684
  • 4
  • 36
  • 51
48
votes
2 answers

When to use MojoExecutionException vs MojoFailureException in Maven

The AbstractMavenMojo's execute method declares it throws two exceptions, MojoExecutionException and MojoFailureException. Throwing either results in the build stopping and the log displays an almost identical message in each case. The message for…
Rich Seller
  • 83,208
  • 23
  • 172
  • 177
47
votes
5 answers

What is the difference between artifactId and groupId in pom.xml?

How would you explain it to a newbie web developer or programmer with some real world organization example (like say facebook company or Google company)?
sofs1
  • 3,834
  • 11
  • 51
  • 89
46
votes
4 answers

How to create a project using maven-archetype-plugin? What is artefactId etc?

I am new to Maven and am using the maven.apache.org tutorial here as an introduction. In the "How do I make my first Maven project?" section of the tutorial, it teaches us to generate a Maven archetype project by executing the following command: mvn…
Mellon
  • 37,586
  • 78
  • 186
  • 264
46
votes
5 answers

What are the URLs of all the Maven Archetype catalogs that you know about?

Maven Archetypes are the "templates" by which you can quickly generate a running example of a given framework or project type. I am trying to compile a list of all the Maven archetype catalogs currently active on the net. From the Maven…
Matthew McCullough
  • 17,160
  • 7
  • 39
  • 38
46
votes
7 answers

how to integrate Angular 2 + Java Maven Web Application

I have created a Angular 2 front-end Application.and i have created one Java Rest WS Back-end Application which is connected to DB. My Folder structure for Angular 2 App is below- Angular2App confg dist e2e node_modules public src …
45
votes
3 answers

Maven Surefire plugin "Error occured in starting fork, check output in log"

I get the following error BUILD ERROR Error occured in starting fork, check output in log when using Maven 2.2.1 and Surefire plugin 2.11 while running junit test cases. How can I fix it?
user1137387
  • 1,933
  • 3
  • 18
  • 27