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
372
votes
7 answers

Maven 3 warnings about build.plugins.plugin.version

Since I updated to Maven 3 I get the following warning messages at each build : How can I get rid of these warnings? [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for…
Istao
  • 7,425
  • 6
  • 32
  • 39
184
votes
4 answers

What is MOJO in Maven?

I'm reading about Maven right now and everywhere in a text I see this word (mojo). I approximately understand what it means, but I would not refuse from a good explanation. I tried to google, but found only non-maven explanations. POJO - ok, but…
dnim
  • 2,470
  • 4
  • 20
  • 19
148
votes
3 answers

How do I execute a program using Maven?

I would like to have a Maven goal trigger the execution of a java class. I'm trying to migrate over a Makefile with the lines: neotest: mvn exec:java -Dexec.mainClass="org.dhappy.test.NeoTraverse" And I would like mvn neotest to produce what…
dysbulic
  • 3,005
  • 2
  • 28
  • 48
135
votes
6 answers

Difference of Maven JAXB plugins

I have determined that two JAXB plugins for Maven 2 exist, with some different configurations. The one is from Sun: http://jaxb.dev.java.net/jaxb-maven2-plugin/, the other from Mojohaus: http://mojohaus.org/jaxb2-maven-plugin/ Which of these two…
cuh
  • 3,723
  • 4
  • 30
  • 47
127
votes
2 answers

Run a single Maven plugin execution?

I thought I was an experienced Maven user, but I am having a mental block on how to do this! I've been able to use the Maven sql plugin to drop, create, and install a schema in a database via plugin executions I've defined and bound to the…
Dave
  • 21,524
  • 28
  • 141
  • 221
126
votes
28 answers

Unsupported major.minor version 52.0 in my app

I'm trying to compile my Android project and I'm getting this error [INFO] Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0 [INFO] at…
Rafael Reyes
  • 2,615
  • 8
  • 34
  • 51
98
votes
8 answers

Eclipse : Maven search dependencies doesn't work

I created a new simple Maven project in a new Workspace. When I open the pom.xml's Dependencies view in Eclipse editor, and I choose Add.. dependency, there's no search results no matter what search criteria I input in the search fields: It…
Majid Laissi
  • 19,188
  • 19
  • 68
  • 105
95
votes
2 answers

Maven test dependency in multi module project

I use maven to build a multi module project. My module 2 depends on Module 1 src at compile scope and module 1 tests in test scope. Module 2 - blah MODULE1
user209947
  • 1,013
  • 1
  • 9
  • 5
91
votes
2 answers

Using Maven for C/C++ projects

I'm putting Maven build around cluster of amateur, poorly written and frankly - primitive C/C++ code (meaning some C, some C++). Problem is - there's lots of it in circulation currently and cannot be easily replaced. Building it requires a lot of…
Bostone
  • 36,858
  • 39
  • 167
  • 227
78
votes
3 answers

Send maven output to file

On Windows 7, I am trying to send the output of a maven-3 command to a text file. I call the command from the root of the project I am trying to analyze. The command is: mvn dependency:tree -Dverbose -Dincludes=commons-collections…
rapt
  • 11,810
  • 35
  • 103
  • 145
75
votes
12 answers

Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.code.TypeTags when using lombok

I have following dependency in pom.xml: org.projectlombok lombok 1.16.8 When I run mvn clean install, I have following error: Caused by:…
Thomas
  • 1,805
  • 1
  • 15
  • 31
74
votes
6 answers

Basic maven plugin project not working, Mojo plugin descriptors not generating

I am following the tutorial for creating a maven plugin and cannot run mvn install without getting errors. The info complains that i don't have the required mojo descriptors when the annotations should be generating them for me. I am running maven…
coderatchet
  • 8,120
  • 17
  • 69
  • 125
74
votes
5 answers

Why does the Maven command "mvn sonar:sonar" work without any plugin configuration in my "pom.xml"?

I have a Maven web project in my repo. I am a Maven noob but still I understand the fact that there are plugins which we need to configure only then we could run plugin specific commands. Facts: I have a sonar server running on my local machine at…
Rakesh Waghela
  • 2,227
  • 2
  • 26
  • 46
72
votes
7 answers

Maven 2 assembly with dependencies: jar under scope "system" not included

I am using maven-assembly plugin to create a jar of my application, including its dependencies as follows: macosx tar.gz dir
YuppieNetworking
  • 8,672
  • 7
  • 44
  • 65
63
votes
7 answers

Plugins in Maven and POM.xml

I just started using Maven and I read that plugins are additional components that can be used. A typical structure of pom.xml file is org.koshik.javabrains JarName (A fldernamed JarName was…
Rajeshwar
  • 11,179
  • 26
  • 86
  • 158
1
2 3
99 100