maven

speed up java maven compile on amazon clustering

just a wild idea. wonder is it possible to compile maven build on amazon clustering machines to speed up build processes? any reference or guide on this? reference ...

Running jar, setting classpath

Hi guys, I've got a project I've made with Maven. I compile a JAR, with "mvn package", and now I want to run it, preferably without setting some insane classpath, as it depends on Spring and half the internet or something. Is there any way I can run it easily? Something like "mvn run" would be great, or an option to throw in all depende...

Is there a Java Class that generates a POM.xml file?

Hello! In my job project I have recently been asked to generate POM files via a java class. The problem is that I am very, very new to Maven (like since last December). What I need is a somehow code that generates a xml file (a pom file, but if I can configure any xml creating code that will be fine) given all the necesary data, so the...

ant to maven - multiple build targets

I have an ant build that is currently being converted to maven. However, the ant build has 2 build targets - one that builds the entire app, and one that builds a jar from some of those files (only a few). In ant, it's easy to have multiple build targets to handle this, but I'm trying to determine the best way to handle this in maven. I...

What is the best way to parameterise a Maven script to switch between Spring configurations?

What is the best way to parameterise a Maven script to switch between Spring configurations? I have Maven building a WAR file for a web app. I have alternative spring configurations - one for integration testing with mock objects, one for live production use with real objects. Ideally, I would like to have one Maven build script th...

Java APT how to break a maven1 build when some apt condition are true

I have an APT processor that display warnings on some conditions. My project is using a maven1 build calling ant:apt How to make maven fails when warning conditions are met ? (the processor can be modified) Thanks. ...

How to configure maven multi-module project in Eclipse or Netbeans to reduce deploy time

I have the following project structure project-parent: All the parent configuration is here project-ear: Assemblying the ear file from the ejb, war and core projects project-ejb: EJB module depends on core project-war: Web module depends on EJB and core project-core: no dependencies I was able to use able to use Eclipse or Netbeans a...

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...

Deploying a mavenised seam project, noClassdefFound org.jboss.el.util.ReflectionUtil

Hi, While deploying a mavenized application consisting of a parent project, ejb jar project and a web project I have following stack trace in Jboss As ,5.1.0.GA. I checked that I have the dependency for jboss-el-1.0_02.CR4.jar and the library also contains the class org/jboss/el/util/ReflectionUtil. Any ideas ? If required, I will ...

A Java web project created with Maven is not recognized as such by Eclipse

I created a web project with maven like this: mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp Then I run mvn eclipse:eclipse so that an eclipse project is built. Eclipse recognizes all the features of the project but it doesn't recognize it as a web project. Therefor...

com.sun.org.apache.xerces.internal.dom.DocumentImpl cannot be cast to org.codehaus.plexus.util.xml.Xpp3Dom

Afetr using the Model library (see this) for my Maven pom.xml during this weeks I jumped on this error while attempting to write a ConfiguratonContainer into the pom.xml. The javadoc for Model says: public void setConfiguration(Object configuration) Set the configuration as DOM object. Parameters: configuration - So I mad...

Maven maven-exec-plugin multiple execution configurations

Is it possible to invoke a maven-exec-plugin (or any other plugin's) execution by its id from the command line? Let's say my pom.xml file looks like this: <project> [...] <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> <execution> <id>foo</id> ...

Maven: full search and replace of strings in source files when copying resources

I have some java source files that use a package prefix (they are emulating some JDK classes). I use these files with the prefix to run against some unit tests. If the tests pass I want to produce a jar that contains the source files but with the package prefix removed from all the java files. I am using maven for builds. Does any one...

Maven compile mixed Java + Groovy 1.7 project, using gmaven-plugin

Hey all, As per the top two answers here I'm trying to compile a mixed Java 6 + Groovy project with Maven, using the GMaven-plugin from org.codehaus.gmaven. Up untill yesterday we were using the old 1.6.0 version of Groovy (never changed it after we finally got it working), but since 1.7.0 is now stable I thought we'd switch to that. ...

Starting an H2 Database Server from Maven?

Sorry if this question is nonsensical, I'm still wrapping my head around new concepts. Suppose I want to create and use an H2 database for my integration tests. Maven has a command to run tests: mvn test. Is there a way to tell maven to start an H2 database server for the tests and stop it when it's done? I imagine this working simil...

Question about maven

Hello everyone, I read some useful posts here on SO about previous maven questions, I'm currently very interested in learning maven(cause I like it and because my boss requires me to). I'm currently reading [this][1] book and I'm working my way trough examples. Its a straightforward book but its has some errors inside(trivial ones), yet ...

Implementing an installer, which is maven-based

Something similar has been asked in maven user list but I have the situation, similar to that. I have some service, packaged as .WAR, which is build by maven. However, this .WAR file requires customization: I need to package it in different ways, depending on user input. Basically, user should himself select the components, he would lik...

Why is no one using make for Java?

Just about every Java project that I've seen either uses Maven or Ant. They are fine tools and I think just about any project can use them. But what ever happened to make? It's used for a variety of non-Java projects and can easily handle Java. Sure you have to download make.exe if you use Windows, but Ant and Maven also don't come w...

Config Maven 2 to print out javac commands during compile phase

Is there any way to force Maven 2 (>2.0.10) to print the actual javac commands it's executing. We keep running out of memory even though we've bumped up the max using MAVEN_OPTS. I'd like to be able to see the actual command being executed that is running out of memory. I've tried using the verbose setting below in the pom file's plugin...

Maven - Auto Respond 'yes' on all user input

Hi, Currently I have a grails/maven project. Right now I'm upgrading my grails proj to 1.2.1. The problem is that the upgrade asks for user input, and if I my CI server tries to build it, it will stall asking the user if he wants to upgrade certain plugins. Is there a way to tell maven to respond 'y' on all user input? ...