maven-plugin

maven build execute svn get

I have a project build that needs to include files from another svn location during the build. I want to execute an svn get and then copy these files to the appropriate folder for the build. Researching this issue it seems I could use ant tasks but I wanted to find out what might be the best approach to take for this build. ...

How do I tell maven-verifier-plugin to use a location inside an archive?

The maven-verifier-plugin seems useful, but the example verifications.xml: <verifications><files> <file> <location>src/main/resources/file1.txt</location> </file> <file> <location>src/main/resources/file2.txt</location> <contains>aaaabbbb</contains> </file> <file> <location>src/main/resources/file3.txt</location> <exists>false...

Error in GMaven Plugin

Whenever I execute the gmaven plugin, I get the following problem org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager executing goal 'org.codehaus.groovy.maven:gmaven-plugin:1.0-rc-5:generateStubs': Mojo execution failed. The relevant section of my POM is below. Any thoughts why? <plugin> ...

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 MojoExecutionException is: [INFO] -------------------------------------------------------...

Why does Maven javadoc fail with error "cannot read options"?

When I run mvn javadoc:javadoc, I get the following error: [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] An error has occurred in JavaDocs report generation:Exit code: 1 - javadoc: error - cannot read options (The system cannot find the file specified) Command line was:"C:\P...

Which repository holds the Maven 2 Simian plugin?

Is there a Maven Simian plugin available for Maven 2.x? I can't seem to locate a repository which holds it. The earliest mention I could find was an unreleased version at: https://svn.codehaus.org/mojo/trunk/sandbox/simian-report-maven-plugin/ Perhaps I'm googling using the wrong terms... ...

Maven Exec Plugin not reading configuration

I'm trying to execute my project using the Maven exec:exec goal and I've tried to configure it with this snippet: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1.1</version> <configuration> <executable>java</executable> <arguments> <argumen...

How to resolve Maven exec plugin: classpath too long error?

I have a large Java project with a large number of jar file dependencies. When I try to run the project (using exec) from Eclipse or Netbeans, Maven throws an exception which turns out to be a too large number of entries on the classpath (only 2/3 of the needed entries are included). Does anyone know a workaround for this? (Except from...

Maven: Java classes don't compile after Ant task

My project generates source code using the Rats! parser generator. Rats! doesn't have a Maven plugin that I'm aware of, so I'm trying to build the parser using an Ant Java task, like so: <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>generate-sources</phase> <configuration...

Maven2 how to run some goal before plugin?

I have maven-plagin and need to run goal, that should automatically run before plugin. It possible? ...

maven-jar-plugin and transitive dependencies

I'm using both the assembly and jar plugins to deploy my application. I'm also using the jar plugin to help me generate the classpath in the manifest file using <addClasspath>true</addClasspath> While that seems to work, the problem comes when I try executing the jar (it has a proper main class specified) - it will fail to locate a li...

maven javaee application client plugin

I am pretty new to maven. Is there any plugin or packaging type suitable for building application client jar file ? I want to add the application-client.xml file to the META-INF folder inside the jar. The normal jar packaging doesn't include the file. ...

Maven Eclipse unit test configuration

I use Eclipse and for some of my unit tests, I need to set some JVM args for the test to work, -Djava.library.path in particular. I set it in my POM file as follows: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <argLine>-Djava.library.path=target/dll</argLi...

Multiple antrun tasks in maven

How would you execute ant tasks at different phases in a maven build cycle? ...

mvn release:prepare doesn't catch that I have modified files?

Running on a Windows system, against a locally hosted VisualSVN server instance. I have C:\Program Files\VisualSVN Server\bin on my PATH variable so that I can simply run svn commands from the command line. I'm attempting to prepare and perform a release on my Windows workstation, and I've noticed that release:prepare seems to miss the ...

How do you import main classes in test classes in Maven?

I have generated a new Scala project with Maven and it created a folder structure with a src/main/scala and a src/test/scala folder. I have some code in src/main/scala and wanted to write some tests, the problem is that I can't import the classes from src/main/scala. How do I do that? ...

maven classpath container refresh job

I get stuck with m2eclipse and maven. After adding some dependency (hibernate 3.4, but I guess that doesn't really matter) eclipse got stuck with a message like in the title. Removing the dependency from pom file didn't help either. Restarting eclipse, checking out this as a clean project from repo neither. Alwyas gets stuck on refreshin...

Integrating Maven reporting plugins

I need to setup Maven plugins. I have downloaded the JARs. Can anyone please tell me what do I do next in order to integrate or setup the plugins with Maven? Should I copy the JARs into the parent directory or do I need to edit any file? The plugins are: Java2HTML JDepend Checkstyle Clover Cobertura EMMA Findbugs JavaNCSS PMD QALab Xr...

Maven 2 Assembly plugin - how to split main artifacts and dependencies into separate folders

I am using Assembly plugin for maven to create an installation package. For my packaging requirement, I need to split artifacts generated during the build and all dependencies into separate folders. My current Assembly manifest is as follows: <moduleSets> <moduleSet> <includes> <include>test:test</include> </includes> ...

Maven javadoc plugin - how can I include only certain classes?

Using the Maven javadoc plugin you can exclude certain packages - but I have lots of packages and only a handful of classes I want to produce Javadoc for. Is there a way to include rather than exclude? I would also like to do things on a class level rather than a package level as I have some classes in a package which need javadoc ...