maven-2

Convert files to UNIX format using Maven

I have an application that is developed in a Windows environment. The application itself gets deployed to a Linux environment. Each time I deploy this application I have to convert executable files to UNIX format using dos2unix. I originally thought this was caused by the Windows CP1252 encoding, so I updated Maven to encode the files to...

How could I get an .ear's filesize at runtime?

I started out attempting to do this with the Length ant task, but realized that that would be done before the ear is packaged. Packaging the ear, then checking the file size, and then placing it in the ear would effect the size of the ear. Is there a way to get the ear's size programmatically at run-time? Or perhaps an MBean that woul...

In Maven, can I specify a relative path above my current project?

I'm learning maven on the fly while doing work on a project with a large set of projects to build. Currently a line in the main build uses an absolute path to specify a directory that is part of the subversion repository but "above" it's directory. as in: "C:/work/project/eclipse" where "project" is the checked-in directory, and the po...

update location scm url for maven multi module project

Hi, I have a maven multi module project. If I need to branch, I use the maven-versions plugin to go through my project and update the parent version number rather easily. Is there a similar plugin to update my scm location in all of my poms? ...

Maven GAE Plugin - Unable to run gae:debug

I'm having trouble running the gae:debug goal of the Maven GAE Plugin. The error I'm receiving is below. Any ideas? I'm running it with "mvn gae:debug". [INFO] Packaging webapp [INFO] Assembling webapp[test-gae] in [C:\development\test-gae\target\test-gae-0.0.1-SNAPSHOT] [INFO] Processing war project [INFO] Webapp assembled in[56 msecs...

has anyone got the animal sniffer plugin to work?

The maven-animal-sniffer plugin promises to tell me if my code has any references to Java 1.6 (or newer) APIs. This is important to those of us who develop on MacOSX Snow Leopard (which has only an official 1.6) but need to deliver to 1.5 environments. Sadly, when trying to use it, I get all Java API calls reported as violations. I'm n...

Maven archetype for integrating Struts 1 and Spring 2.5

Hi all, I have a project that integrates Struts 1 with Spring. I now wish to port it under Maven 2. I have searched for the proper maven archetype but can't seem to find a proper match. Any suggestions? Thanks! ...

Adding classpath to jetty running in maven integration-test

I'm trying to set up integration tests for a Maven project that produces a war file. (As seen here http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin/.) However I the war file requires a bunch of .properties files on the classpath, that I don't want to bundle in the war. Is there a way (preferably through plugin configuration) t...

Missing dependencies

i get suddenly an error message, that 3 dependencies are missing: gwt-user.jar, gwt-dev.jar and gxt.jar. All jars are in my local repo: dage [~/.m2/repository] $ ls -l com/google/gwt/gwt-user insgesamt 12 drwxr-xr-x 2 dage Domain Users 4096 2010-01-13 14:55 1.5.3 drwxr-xr-x 2 dage Domain Users 4096 2010-01-13 11:10 1.6.4 drwxr-xr-x 2 da...

Best way to create a maven artifact from existing jar

I'm mavenizing some projects. These projects all depend on a number of libraries, most of them are available in the maven repo. For the other libraries, I'd like to create a maven artifact, so I can use it as an dependency. The problem is, I only have jar files of these libraries. What is the best way to create artifacts from existing ...

Surefire is not picking up Junit 4 tests

I cannot get Maven Surefire to execute my JUnit 4 tests even after I tried all the advices from another post. My POM: <project> <modelVersion>4.0.0</modelVersion> <groupId>maven-test</groupId> <artifactId>maven-test</artifactId> <version>0.0.1-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.junit</group...

Publishing POMs via Maven and inserting build version info

I'm building Maven projects via TeamCity/Git and trying to insert the TeamCity build numbers in the pom.xml that gets published to my repository upon a successful build. Unfortunately I can't determine how to publish a pom.xml with the substitutions inserted. My pom.xml contains info like: <version>${build.number}</version> where bui...

maven dependencies in profiles during release build

Hi, I have a maven module which has several dependencies that are contained in profiles. When preparing a release build using the release plugin (i.e. mvn release:prepare), the versions of those dependencies do not get replaced, instead they remain the SNAPSHOT dependencies, even though the profiles are active (we run mvn release:prepar...

Need help with maven example

Hello all, I'm trying to learn maven ASAP as its required for my current work place. I found this great book which pretty much explains everything about maven. I'm using eclipse for java development and I installed maven eclipse plugin, in the book I mentioned above there is example(which may or may not be relevant) 4.2.1. Yahoo! Weath...

How to use Continuum to build from multiple branches

I've got a project which is built using Maven and Continuum. We've got several release branches, most of which are in retirement but any could conceivably be resurrected if an issue comes up. My problem is that adding branches to Continuum is very heavyweight; the best method I've found so far is to add each branch as a separate projec...

Two build profiles are active, but Maven executes antrun plugin tasks in one profile only

Our application can be built for several application servers, and used in several environments. Type of application server and target environment should be specified using Maven profiles. One and only one of each profile type should be present when compiling the code. All profiles cause execution of one or several mavent-antrun-plugin c...

Running integration tests with Cobertura Maven plugin

I am having trouble getting the Cobertura plugin to run integration tests in Maven. The closest answer to this question I have found is http://jira.codehaus.org/browse/MCOBERTURA-86. However, the issue remains an open bug. I tried the configuration suggested by Stevo on 03/Apr/09, it didn't work. My POM <reporting> <plugins> ...

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 <plugin>maven-jar-plugin</plugin> I tried to <exclude> ** / * < / exclude> I tried to <skip>true</skip> None worked ...

GWT Maven and web.xml

I'm using the GWT Maven plugin from Codehaus with m2eclipse. Where is my web.xml file supposed to end up? Isn't the Maven build supposed to copy it to the /war directory? I can't see it there. Or does Jetty pick it up automatically from src/main/webapp/WEB-INF/? Here's a relevant section from my pom.xml. <plugin> <groupId>org.apache....

How to start and stop an Tomcat container with Java?

I have a Maven project that starts a tomcat container for pre-integration-tests (jUnit Tests). Most of my tests require that the web-application under tests is restarted. So I'd like to restart the Tomcat container before each jUnit test is executed. As for now I use the cargo-maven2-plugin to configure the tomcat container. So, is it...