maven-plugin

How to reference javadocs to dependencies in Maven's eclipse plugin when javadoc not attached to dependency

I use Eclipse, Maven, and Java in my development. I use Maven to download dependencies (jar files and javadoc when available) and Maven's eclipse plug-in to generate the .project and .classpath files for Eclipse. When the dependency downloaded does not have attached javadoc I manually add a link for the javadoc in the .classpath file so ...

Maven Jdepend report contains no data

I'm running the jdepend maven plugin on my project and whether I run "mvn site:site" or "mvn jdepend:generate" the report that gets generated says "There are no package used." There are no errors in the maven output. Other plugins (cobertura, findbugs, etc.) run fine. My pom is configured like this: <reporting> <plugins> <p...

Maven2 Multiproject Cobertura Reporting Problems During mvn site Build

We've got a multiproject we're trying to run Cobertura test coverage reports on as part of our mvn site build. I can get Cobertura to run on the child projects, but it erroneously reports 0% coverage, even though the reports still highlight the lines of code that were hit by the unit tests. We're using mvn 2.0.8. I've tried running "mvn ...

What is the best way to obtain a list of site resources when writing a Maven2 site plugin?

When creating a plugin that executes in the default life-cycle, it's easy to obtain a reference to the project and its resources, but I'm getting a null instead of a MavenProject object when creating plugins that execute in the site life-cycle. Any hints, tips or suggestions? ...

Best way to access the runtime configuration of a maven plugin from a custom mojo?

I am writing a custom maven2 MOJO. I need to access the runtime configuration of another plugin, from this MOJO. What is the best way to do this? ...

How do you force a maven MOJO to be executed only once at the end of a build?

I have a MOJO I would like executed once, and once only after the test phase of the last project in the reactor to run. Using: if (!getProject().isExecutionRoot()) { return ; } at the start of the execute() method means my mojo gets executed once, however at the very beginning of the build - before all other child modules. ...

What is the easiest way to start tomcat in embedded mode from the cargo-maven2-plugin?

I have defined tomcat:catalina:5.5.23 as a dependency to the cargo plugin, however I still get the following exception: java.lang.ClassNotFoundException: org.apache.catalina.Connector at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findCla...

maven-buildnumber-plugin

Hi all, i use the maven-buildnumber-plugin to generate my version number for JAR/WAR/EAR packages. So when doing a compile i'll get for example ${project.version}-${buildNumber}, because is set to this value. But when using mvn deploy just ${project.version} is the filename, samen when i set in pom.xml to XX ${buildNumber} then the fi...

How do I add an extra source directory that will be used by the maven-jxr-plugin?

I'm using the build-helper-maven-plugin to add it to my build, but I'd like to see the XREF source for this extra source directory as well. FYI: maven-jxr-plugin - The JXR plugin produces a cross-reference of the project's sources. The generated reports make it easier for the user to reference or find specific lines of code. It is also...

How to use maven to export a project from subversion?

Maven has a plugin called maven-scm-plugin, which can interact with source control systems. According to the documentation, I should be able to export a project like this: mvn scm:export -DconnectionUrl=scm:svn:svn://url... -DexportDirectory=./project-export However when I run this command with maven 2.0.9, I got the following error f...

Why can't maven find a plugin?

If I type the command: mvn dependency:list The docs suggest that I'll get a list of my project's dependencies. Instead though, I get this: [INFO] Searching repository for plugin with prefix: 'dependency'. [INFO] ----------------------------------------------------------- [ERROR] BUILD FAILURE [INFO] ----------------------------------...

GOOD tutorial for writing Maven plugins?

Can someone please recommend a GOOD online tutorial for writing maven2 plugins? I looked at about 5 tutorials yesterday and each skipped steps, didn't tell you where key components (referenced in the tutorial) were supposed to go or how to install the plugin you wrote. Futher, many didn't reference which version of maven they worked ...

How do I track plugin dependencies in maven2 ?

I am trying to locate an evil plugin that includes a stoneage version of a certain jar file. How do I do that ? ...

Maven2 life cycle help

I’ve built a custom Maven2 plug-in using Ant. I would like to call another maven plug-in in particular the Cargo Maven2 plug-in immediately after the custom Ant plug-in successfully completes. However, I do not want to attach the Cargo plug-in to another goal or phase. Is there a way to have them run consecutively without having to write...

How to use Maven Surefire plug-in with different groups for test and integration-test?

I want to use testng with the Surefire plug-in of Maven. The idea is to tag some tests with a group integrationTest and run the plug-in twice: for goal test excluding the group integrationTest and for goal integration-test including the group integrationTest only. I found some material for running the plug-in for both goals and that wor...

Nested Maven properties evaluated in refering POM rather than defining POM

I'm defining a report configuration in my parent pom which will be run in each child and grandchild project. Like so: <reporting> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <version>1.2</version> <configuration> ...

Maven 2 Checkstyle configLocation

Hi, i have a project which has as maven dependency a jar file which includes a xml file where i stored my rules for checkstyle. I thought it would be ok to just use this configuration: <configLocation>mycheckstyle.xml</configLocation>. My understanding is that the file should be searched on the classpath and my jar file is a Maven depen...

How to externalize pieces of maven build file?

I was faced to a problem how to version a configuration file in XML format. The easiest way is to write XSLT updates. Every release of the application has its own XSLT update. All these update files are small enough to be managable by the IDE, especially its DIFF tool. Since the project is already been developed as Maven2 Java logical s...

Maven FindBugs plugin

You have usage: http://mojo.codehaus.org/findbugs-maven-plugin/usage.html <project> [...] <reporting> [...] <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <version>1.2.1</version> <configuration> <xmlOutput>true|false</xmlOutput> <xmlOutput...

selenium-maven-plugin

Hi, i'm trying to set up the selenium-maven-plugin and having some difficulties i hope somebody can help me. My configuration looks like this: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>selenium-maven-plugin</artifactId> <executions> <execution> <phase>pre-integration-test</phase> <goals> <goal>...