pom.xml

how to add the servlet api to my pom.xml

How do I add the servlets API to my project's pom.xml mvnrepository.com has lots of servlet api and similarly named projects, that I don't know which is the right one. Or are all of them ok? ...

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

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

"Cannot get the revision information from the scm repository"

I get maven error : "Cannot get the revision information from the scm repository" Any idea how to solve this ? Thanks. ...

Resin's `pomegranate' - auto-magical-loading maven jar dependencies for a project - but how to generate jars with pom.xml for them?

Hi. Resin java server has a neat feature they call pomegranate ( http://www.caucho.com/projects/pomegranate/ ) which allows to just put various jar dependencies in server's directory (project-jars/) and then it loads them for a web-app from its pom.xml file. Question is: how should I put the jars to resin's project-jars ? (just copying...

How can I clean _svn folders/files from 'src/main/webapp' folder when maven2 builds webapp project in netbeans 6.7?

I have created a webapp using maven2 archetype in netbeans 6.7. when I do plain build(removing all the plugin configuration), it copies all the required files including the '_svn' folders. But I don't want those files, how can I clean _svn folders/files from the *.war file and from the exploded target folder which contains the 'src/main...

Anonymize pom.xml on release

I've got artefacts which are built and released using Maven. The artefact's original pom.xml contains the usual project information (artifactId, name, etc.) and the dependencies. That's fine. But the pom.xml also includes private information such as the SCM URLs, the names of the developers or a parent-artefact. Is there any way to tell...

Implicitly including optional dependencies in Maven

I have a project A which has a dependency X. Dependency X has an optional dependency Y which doens't get included in A by default. Is there a way to include Y in my POM without explicitly including it? In Ivy they have a way to essentailly say include all optional dependencies of X, does Maven have a way to do this? ...

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

How to make maven site build the correct links to the project modules

I have a maven multimodule project when I try to build the site, it creates the links in the main page with the module name, but the href points to http://maven.apache.com How do I make either mvn site-deploy or mvn site:site site:deploy construct the right links? because the folder with the sub-site gets created the only issues is it i...

Maven2 applying filtering to the file under pom type packaging.

Hi all, I am new to maven. I want to use filtering in a multimodule project. The packaging type of the parent pom is set to pom. The structure of the project is as follows: pom.xml | |______MODULE1 | | | pom.xml | File1_needed_to_be_filtered | File2_needed_to_be_filtered Please note...

GoogleAppEngine : JAR for enhancer not found, yet ASM is on the classpath

When deploying my application to GoogleAppEngine I'm getting the following message after the upload Exception in thread "Thread-0" You have selected to use ClassEnhancer "ASM" yet the JAR for that enhancer does not seem to be in the CLASSPATH! org.datanucleus.enhancer.NucleusEnhanceException: You have selected to use ClassEnhancer "ASM"...

differences between dependencymanagement and dependencies of maven

Hi: What is the differences between dependencymanagement and dependencies? I have seen the docs at apache maven web site.However I got nothing. It seems that a dependency defined under the DependencyManagement can be used in its child modules without sepcify the version.For example: A parent project(Pro-par) define a dependency under th...

Is there anyway to exclude artifacts inherited from a parent POM?

Artifacts from dependencies can be excluded by declaring an <exclusions> element inside a <dependency> But in this case it's needed to exclude an artifact inherited from a parent project. An excerpt of the POM under discussion follows: <project> <modelVersion>4.0.0</modelVersion> <groupId>test</groupId> <artifactId>jruby</artifact...

XSLT Document function returns empty result on Maven POM

Greetings! I want to extract some properties from different Maven POMs in a XSLT via the document function. The script itself works fine but the document function returns an empty result for the POM as long as I have the xmlns="http://maven.apache.org/POM/4.0.0" in the project tag. If I remove it, everything works fine. Any idea how th...

Change properties in pom.xml at runtime with Maven Ant Tasks. Is it Possible?

I have the following use case: My application is started with an Ant Script, which asks the user several questions about the project configuration (database settings etc.). These settings are stored in a properties-file. Then i want to run Maven from within my Ant script by Maven Ant Tasks, which should replace the pre-defined properti...

How to use pom.xml/Maven to initialize a local thoughtsite (App Engine sample) project in Eclipse?

This sample app ("thoughtsite") for App Engine contains a pom.xml in its trunk: http://code.google.com/p/thoughtsite/source/browse/#svn/trunk But I don't know what command to run in Maven to set up the project locally. (The README doesn't mention anything about Maven.) I tried to just import the project code directly into Eclipse but ...

Maven 2 <resources> inheritance (parent -> child project)

(also posted on maven-users) Wondering if anyone can shed some light on inheritance of the elements in pom.xml as relates to resource processing and the WAR plugin. The documentation for the pom [1] has resources listed under "Elements in the POM that are merged". Some experimentation on my local poms against maven 2.2.1 don't appear ...

maven junit pom.xml

Hi, i have a following problem. I'd like ti test my JSF Application with JSFUnit.But JSFUnit supports inly junit3 (all our unit tests run with JUnit4). Is it possible to include in pom.xml two junit dependencies (junit4 and junit3) with e.g. different scopes? Please help and thanx in advance ...

Maven pom.xml - Project Aggregation

We have a aggregation .pom set up to include several, individual modules, similar to the Maven documentation: <project> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany.app</groupId> <artifactId>my-app</artifactId> <version>1</version> <packaging>pom</packaging> <modules> <module>my-module</module> <module>...