pom

How do you edit Maven pom files?

I have recently started exploring Maven, but I feel a bit overwhelmed of all xml configuration in all the pom files. Are there any good tools i can use? ...

With multi-module Maven projects, is it possible to make my root (pom-packaged) project available in Eclipse?

We have a fairly large group of Maven2 projects, with a root POM file listing 10+ modules and a lot of properties used by the modules (dependency version numbers, plugin configuration, common dependencies, etc). Some of the modules are, like the root project, parents to other sets of modules. To clarify, the root project and said paren...

How to deploy a WAR onto an existing Tomcat 6 instance using Cargo?

I installed Tomcat using the Windows installer ages ago and it runs fine as a service on my development laptop. Now I'm mavenising my project and would like to use Cargo (or something similar) to deploy updated WARs onto the local Tomcat. I can't find any fully worked examples of a POM file containing the right XML to do this and am str...

maven deploy additional jar file

I have an artifact which is being built and deployed in a particular way (not as a jar file). In the course of deployment, a war file is built. How can I configure the pom so that the artifact is also deployed as a jar file, to a different location? ...

mvn archetype:generate Error building POM (may not be this project's POM)

Hi all! I am trying to create a jsf+spring+hibernate from a spring project. Below are the steps i have taken. I have been successful in creating projects in the past using the same method. I have no idea where i am making the mistake. Looking for all the hints, where i am going wrong. NB: I have made the inputs and error messages as b...

Collapsing parent POM into the child

Given a maven project with a parent POM - including mostly plugin and dependency versions - how can I generate a POM which takes the information from the parent, places it into the child and removes the reference to the parent? Ideally this would be done with the maven-assembly-plugin. Update: I need this done automatically, since ma...

Maven Super POM

I'm new to Maven and working on creating a build for my company. We don't want to connect out to the Maven Central Repository, and we have a different directory structure for src and test code than specified in the super pom. I figured the best way to handle this is to create a customer super pom, but I'm wondering - where do I actually ...

LATEST version of parent project in Maven

Hi, I am using Maven2. I have created a parent POM for my organization. I want the various groups will use it as a parent for their project but I want them to use the latest version. for some reason, using it as a parent with version LATEST doesn't work, any idea? Thanks, Ronen. ...

adding additional resources to a maven pom

I have a super pom defined in which I specify a "resources" directory for resources. In one of my projects, my pom extends that super pom, and I would like to add an additional resource. I tried: <resources> <resource> <targetPath>/</targetPath> <directory>additionalDir</directory> </resource> </resources> But that res...

How can I use Maven to get the latest Hibernate release?

I am having trouble getting the latest release of Hibernate via Maven dependency. It appears that the latest I can fetch from a Maven central repository is 3.2.6.GA, and I am interested in using 3.3.2.GA, which is the latest release shown on the hibernate.org site. When I modify my hibernate dependency to this latest version in my proj...

Adobe Flex/AIR Maven integration

I am writing an Adobe AIR application that needs to build in a CI using maven and nexus. I tried to follow this article which is the most up to date article from the source, but I still don't understand these things: Are the first and second pom.xml examples in the article in the same pom.xml file? How do I get the Flex SDK dependenci...

Maven: Including jar not found in public repository

If I was to use a 3rd party library that was not in the maven public repository, what is the best way to include it as dependency for my project so that when someone else checks out my code it will still be able to build? i.e. My Application "A" depends on jar "B" which does not exist in the public repository. I, however, wish to add ...

find pom dependencies by classname

How can I found the dependency by classname? In particular, I want to include this class org.mortbay.jetty.testing.ServletTester in my project, how do I do that? And how did you find the answer? ...

Maven - Include Different Files at Build Time

I have ten WAR files, all of which have nearly identical code and markup. The only differences lie in the images, CSS and Messages. I hit on the concept of Profiles but I haven't quite groked it yet and I'm not sure if this can handle what I need it to do. Basically, I want a base project with different profiles for the 10 different WAR...

How can the output path of the generated JAR be set in a Maven build profile?

I have a Maven POM set up with multiple build profiles. For one profile, I want to copy, move, or build the JAR file that is generated in the target folder to another folder. How can this be achieved? ...

How do I exclude files/directories from the target directory using the maven war plugin?

I followed the instructions here, and it worked but only if it was mapped to a directory other than the default. Here's a sample that I tried: <configuration> <webResources> <resource> <directory>${basedir}/src/main/webapp/WEB-INF</directory> <!-- the below works when uncommented and does exclude...

What is the significance of the POM file that Maven places in a JAR file, is it used by anything?

When Maven builds a JAR file, it places the module's POM file inside (seemingly in the directory <groupid>/<artifactid>). When I build a JAR file from Ant to be deployed via the Maven Ant tasks, is the presence of this POM file (the one inside the JAR) important? It doesn't seem to be, but I just wanted to be sure that it is not being ...

Filtering Maven files into WEB-INF

I am trying to add some filtering to the application context file, which resides in the WEB-INF directory. I have the file which is to be filtered (xmlgateway-context.xml) in the folder /src/main/resources. I have the properties files (config-e05.properties) in the folder src/main/filters And I have the POM set up as follows: <!-...

Maven profiles basic datasource, jee:jndi-lookup

I have a project with spring and maven. I found that using profiles, maven could change the properties of the data source. But what if in production the datasource is with a lookup like this, how to do the profiles for this: one with a basic datasource and the other a jee lookup. <jee:jndi-lookup id="dataSourcejndi" jndi-name="jdbc/BGG...

In Maven2, what's the simplest way to build a WAR and the EAR to contain that WAR in a single POM?

Situation is pretty straightforward. I have a Java webapp that I'm converting to be built with Maven. At present, the app is built with Ant into a single WAR file, which is then bundled into an EAR with a very simple application.xml. maven-war-plugin and maven-ear-plugin both look pretty straightforward to me, and it appears they're set...