maven-2

How to wrap an Ant build with Maven?

We use maven for our large-ish product. All of our artifacts are deployed to a shared archiva repository using the maven deploy goal. I am now integrating a third party product that has an ant build. I know how to call ant targets from maven using the antrun plugin, but I'm not sure how to setup the pom in this instance. I don't want...

Excluding "provided" dependencies from Maven assembly

I am trying to use the Maven assembly plugin to build a jar-with-dependencies, except those that have provided scope. I have copied the jar-with-dependencies into an assembly.xml file and configured its use in my pom. Here it is for reference: <?xml version="1.0" encoding="UTF-8"?> <assembly> <id>injectable-jar</id> <formats> <...

So I compiled something with maven, now what do I do with it?

This is probably simple for someone experienced with it, but this is my first JVM adventure. I just compiled this scala library (per the instructions on that page) and all it appeared to do was give me a bunch of .class files. What do I have to do to use these in my project? I'm using netbeans if that matters. ...

Automated Deployment solution for multiple Java web-apps

I'm looking for solutions, preferably open source, that can manage deployments of multiple interdependent java web-applications. The solution requires an ability to create and store a release specification containing multiple items for release - specific versions of each application and relevant other artifacts (database config, apache ...

Can I update the HTML files using Wicket and Eclipse without recompiling the classes?

I'm using Eclipse and Maven-2 and I'd like to be able to edit my HTML files without "it" (not sure if it's Eclipse or Maven) recompiling my application. I understand that usually Eclipse tries to do a hot replace of new compiled Java classes with Eclipse and Tomcat. Can I use something like this? getResourceSettings().setResourcePollFr...

Unable to publish web app: SpringSource Tool Suite problem?

I have an existing, fully functional Spring web application based on Spring 2.5.6 - developed using SpringSource Tool Suite 2.1.0.SR1. Because I'd like to use REST I decided to upgrade to Spring 3.0.0.M4. After editing the dependencies in pom.xml and changing my code to reflect the API changes in Spring 3.0 I tried to publish my web app...

How to declare a before and after execution of a maven plugin around another plugin execution

Hi, I would like to create an execution order in my plugin which surrounds a maven plugin with a before and after execution of another maven plugin. All 3 executions are part of the deploy phase. Here is an example of what I want to do: phase:deploy url:get: execution-before dependency:unpack url:get: execution-after Note: url:get...

How to teach Eclipse to include Maven source packages on the source path?

How can I teach Eclipse with m2eclipse to include all source .jar in my local Maven repository in the source path when looking up library source files while debugging? ...

mvn exec:java on aggregate pom

Hi. Does anyone know whether it is possible to run mvn exec:java on mvn aggregate POM? Currently I get: 2009-09-24 02:24:14.404 :bash: karolrvn@karolrvn-laptop : ~/adfadf/programming/verknowsys/codadris/ide_projects $ mvn exec:java -e -Dexec.mainClass=codadris.coviob2.App_Coviob2 + Error stacktraces are turned on. [INFO] Scanning for...

Set properties from .properties file in .jar on JVM startup

How can I setup the JVM to automatically load a .properties file in .jar on the classpath on JVM startup? I do not want to configure the properties on the commandline (with -D) but have them in a .properties file. Is there a way to configure this with the help of Maven? ...

How to exclude pom.xml from Maven generated war?

Using Maven war plugin, I generate WAR which includes following directory: META-INF -- maven -- com.abc.def -- myServlet -- pom.xml -- pom.properties In release, I want to exclude this maven directory. How can I do that? I tried latest maven-war-plugin (2.1-beta-1), it has configuration "packagingExcludes"...

Can Nexus/Artifactory store a copy of an internet Maven artifact?

I would like to have Nexus (or Artifactory, we're not decided yet) store a copy of an artifact when it is downloaded from a public repository on the internet (like Maven Central). Basically, if you don't have the jar in your local repo and the repo manager doesn't have it either, I want to ask the repo manager for the jar, have it send ...

Symbol not found: when running selenium with maven

Hi I'm getting a symbol not found error, when running mvn -e integration-test. Why could this happen if the package is in my repository? I have tried downloading it and installing it manually but it does not make a difference. Is this a common error in maven? I'm using vista home edition, Error message [INFO] ------------------------...

Setup Java 6 annotation processing configuration for eclipse compiler with maven

What's the best way to setup the eclipse project compiler configuration for Java 6 annotation processors? My solution is to setup the org.eclipse.jdt.apt.core.prefs and factorypath files manually. This is a bit cumbersome: Reference the processor jar in the factorypath file Configure the eclipse annotation processor output directory (...

Complex Maven2 with Flex4 Setup

Hi. I have been struggling to get Maven2 to cooperate with me, and was wondering if anyone out there had any ideas on how to get this working.... I am working on a Flash project, and we are considering switching from our hybrid Flex4/FlashCS4 to a pure Flex4 solution. We would like to use the Maven2 build system, so that our developers d...

Maven assembly include problem

Context We have this application, using about 60 coding projects. We have several products that are realized using this same code base, so we follow the maven best-practices : we assemble each product using an assembly project, using the assembly plugin. We have an historical assembly using Ant, that need many improvements. In a firs...

Calling Maven goals from Java

Is it possible to call Maven goals from Java, for instance, can I do the equivalent of: mvn clean package from a Java class? thanks, Nick ...

How to generate JUnit sources using maven-gunit-plugin

I have maven configured to run gunit (an ANTLR grammar unit testing tool) through the maven-gunit-plugin. gunit, however, has two different modes. The first mode causes gunit to act as an interpreter, reading through the *.gunit (or *.testsuite) file, interpreting it, and displaying the results. It can be configured as such: <plugi...

How to get project version from Mavens's pom in Ant

Hello. I have maven project and ant task for it. In ant task i want to get version property from pom.xml. How to get it? In pom.xml: <version>2.03.010</version> ...

Specifying Java path for properties file

I have a Java Spring project, configured with Maven. As the amount of unit tests and their configuration files is adding up rapidly, I'm trying to centralize the test configurations to one properties file (the same one, which is used in building the project). The unit tests are located (relative to the project path, of course) in tree s...