maven-plugin

Maven2: How to stage JXR plugin result when using mvn site?

Hi, I have a multi-module project and I want to deploy on the project's site an HTML version of my source code using the JXR maven plugin. The problem is that the JXR plugin runs well, the XREF folder is properly generated for each of my module, but when I use the mvn site:stage command in order to retrieve all the project's site conte...

Why doesn't my Maven plugin pick up parent properties?

When I make one plugin extend another it normally inherits the properties from the parent. Sometimes it doesn't work though. When the plugin is loaded up, the properties from the parent are all null What might I be doing wrong? I package my project as a maven-plugin and it builds ok. ...

Can I set the project version with a buildnumber-maven-plugin?

I'm trying to add the svn.revision to project version as a build number and can't seem to do so. My jar has the correct name durin packaging, but its installed in the my local repository it is as if ${buildNumber} is/was undefined when the version was set. I get foo-1.0.0-SNAPSHOT-${buildNumber} instead of foo-1.0.0-SNAPSHOT-304 Any ...

Maven findbugs:check - Output Summary Of Bugs

Does anybody know how to configure the maven findbugs plugin to output a summary of the bugs to the console (similar to the pmd plugin)? At present findbugs:check just prints out how many bugs there are in total and I need to check the individual modules target/findbugs directory and each findbugs.xml file to fix the issues. <plugin> ...

Maven2 compiler custom execution source directory and target directory

I want to run the maven compiler plugin in a different phase and with different sourceDirectories and destinationDirectories such that code from directories other than src/main/java and src/test/java can be used. I thought the solution would look something like the below, where the phase I was linking it to was pre-integration-test. How...

Maven: Including a META-INF folder in the classes folder.

Hello all, I have a very simple war project and I want to include a folder:META-INF at the top of the classes output folder where all the compiled java classes are. Im doing this by using maven but it seems that by default maven won't include anything that is not a java class. So it ignores my META-INF folder that is sitting at the top...

Restricting Java maven plugin configuration parameters

Hi, I’m writing a maven plugin with a number of configurable parameters. There are a number of parameters specified in the Mojo class. One of these parameters is required and must contain certain values (let’s say, either ‘Atwood’ or ‘Spolsky’). At the moment it is annotated with a. @required field as shows here: public class Generat...

Tool for creating a Java daemon service on Linux

What is the best way to create a java application that can be run using ‘service’ on Linux? I was going to use the JSW available here, but cannot use the licence on that (licence is either GPL or it costs money as far as I can tell). I’d need an apache style licence. I’m using maven to build, so it would be great if it was possible to c...

Cobertura maven plugin when to download

Can anyone tell me to locate and download the cobertura maven plugin? I've looked on the web. On the Corbertura homepage there is a URL http://maven-plugins.sourceforge.net/repository/maven-plugins/ to the download, but that page is dead. ...

Overlay BIRT runtime into correct WAR locations

I'm trying to get Maven to assemble a WAR with the BIRT runtime in a useful location within the WAR. The BIRT runtime is in the pom.xml as <dependency> <groupId>org.eclipse.birt</groupId> <artifactId>report-engine</artifactId> <version>2.3.2</version> <type>zip</type> <scope>runtime</scope> </dependency> The desired outcome...

String arrays as command line arguments for maven plugin

I'm writing a maven plugin that has a parameter that's a String[]. Like this: /** * @parameter expression="${args}" */ protected String[] args; This can be utilized through the POM like this: <args> <arg>arg1</arg> <arg>arg2</arg> <args> But I want to send it in from the command line -Dargs={arg1, arg2} Is this possible? ...

How do I configure maven 2's surefire plugin to run Junit 4.5?

Maven 2 does not seem to consider my @Test and @Ignore annotations. How do I configure the surefire plugin to run and use the annotations? This question is still not answered. ...

Maven2: How to be sure Maven build is using a specific plugin version?

Hi, I just found something that sounds weird with Maven plugin management. While working on the site generation I wanted to use a specific version of the maven site plugin in order to have a specific functionnalty working. Let's say I want to use version 2.0.1 of this plugin. If I use the reporting section of my POM in order to genera...

Maven JBoss plugin update from 1.3.1 to 1.3.2 caused deployment to fail

By accident I updated Maven JBoss plugin to version 1.3.2. After that the deployment failed silently, no attempt to connect JBoss was made. Eventually we found out the version change and reverted back to old version. Here is the current config: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jb...

maven cobertura reports 0% with aspectj

Has anyone been able to use maven2 with the Aspectj plugin, and Cobertura plugin? I keep getting 0% coverage, when I should get something. Cobertura instrumentation is running before Aspectj weaving which, I think, is messing up the Cobertura instrumentation. Also, Cobertura is giving warnings about my aspects, it looks like it is trying...

How to use a single checkstyle suppression file in Maven for all modules.

I have a project that consists of several Maven modules which are all children of a parent module. I have the parent set up to use checkstyle and the child modules all inherit this behaviour correctly. I would like all the child modules to use the parents suppression file defined in its plugin. I define a property checkstyle.suppression...

Maven assembly plugin support Jar format?

Hi I have configured my assembly descriptor to have an assembly of type jar by <formats> <format>jar</format> </formats> However,on running mvn install getting zip files instead of jar.Where I have gone wrong? ...

How to bind a plugin goal to another plugin goal

Hi, In my current project we use some plugins needed by other plugins parameters like properties-maven-plugin or buildnumber-plugin. <?xml version="1.0"?> <project> <modelVersion>4.0.0</modelVersion> <groupId>mygroup</groupId> <artifactId>myartifact</artifactId> <packaging>pom</packaging> <version>v0</version> <...

how to configure <manifest> only once in pom.xml in a desktop application

Hi all, I'm making a swing application with maven and I try to keep the pom.xml under tight reins (this file tends to become a pile of junk after pasting there whatever we find in google). My pom is with jar and I use the maven-assembly-plugin with "jar-with-dependencies" descriptor. So I need to define twice the part of my project (...

Maven - built jar using maven-assembly-plug in not always deployable

I can build a deployable jar just fine on my local machine, but when trying to use jar built off our server, even if I explicitly invoke the command by hand, the jar will not run. At first, it appeared that it wasn't including files I'd had in my classpath/Resources directory, but after adding the builder-helper plug in, it's now includi...