pom

How do I reinstall Eclipse without losing my projects and plugins?

My Eclipse recently broke completely and I have upgraded to Galileo. I have created a fresh workspace (say foo/workspace) and created a trivial project. I have then copied an old project from (bar/workspace/myproject) to foo/workspace/myproject. It is mavenised and has a pom.xml. How do I tell Eclipse to build it (it does not seem to rec...

Maven warning "Overriding profile: 'null'..."

What are possible causes of the following maven warning: Overriding profile: 'null' (source: pom) with new instance from source: pom I've tried commenting out my entire default profile as the warning mentions "profile", but that didn't help. I've also tried commenting out my reporting options and the warning still shows up. I've r...

Is there an easy way to generate an Ant build script from a Maven POM?

Hi there, We have a project that uses Maven as its build/dependency management tool. But our code needs to be compiled at our client's site and our client demands that we deliver build scripts written for Ant. So, we would like to keep working with Maven and automatically generate the Ant scripts when we need to deliver the code to the...

Maven 2.2.1 project inheritance: necessary to use packaging 'pom' even without the use of project aggregation (multimodule)?

I want to inherit the dependencies of a (parent) pom.xml in a child project i.e. use Project Inheritance. It seems it is necessary to change the default packaging type from 'jar' to 'pom' in this case. But doesn't tell the Maven2 documentation that the packaging type 'pom' is necessary for Project Aggregation i.e. multimodule projects w...

How to tell M2Eclipse to install jar file as a maven dependency

I want to add jpoller.jar as a maven dependency, so I edited my pom.xml file to include it: <dependency> <groupId>org.sadun</groupId> <artifactId>jpoller</artifactId> <version>1.5.2</version> </dependency> Now, as expected, when I compile from the command line I get an error because jpoller isn't in any of the repositories...

Does maven reusable resource project possible?

Is there any ability to build maven artifact which will contain only resources but no sources and which can be reused by other projects? Motivation is the following. I have a library which contains only html/css/javascript code. This library must be packed as resources into war project. As for now I build web archive with resources by s...

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

maven-jar-plugin includes vs excludes

I've got an existing pom file that includes a maven-jar-plugin section. It runs for the test-jar goal and is currently excluding a few directories: <excludes> <exclude>...</exclude> <exclude>...</exclude> <exclude>somedir/**</exclude> </excludes> I need to include a file in the somedir directory but leave out the rest ...

Maven, how to add additional libs not available in repo

I have a maven project that has a set of library dependancies that are not available via any maven repository. How can I add those libraries to the pom? I want to do this so when I run 'mvn eclipse:eclipse' it doesnt remove those libraries from the eclipse classpath. ...

Specify JDK for Maven to use

Hi all. I am trying to build a Hudson plugin I've modified and it requires jdk1.6. This is fine, but I don't see how I can tell maven where the different jdk is. I've found few mentions on the internet but they don't seem to apply to me. Some suggest adding some config to .m2/settings.xml but I don't have a settings.xml. Plus, I don't wa...

Merge XML files with configurable rules (context: Maven POMs, Java)

Hi, I'm currently writing some kind of a Maven POM preprocessor that assembles a POM for a project from multiple input files (basically a template and a module specific file). The files are hierarchically ordered (template = most general, module specific = least general). The problem is now to merge these files into a single POM file. ...

Include XSD in Jar with Maven?

We have an XSD file along with some java src files. How can we instruct Maven to include the XSD in the jar file output? Currently it appears to ignore the file. ...

How to make jetty-maven-plugin deploy a war that is retrieved from a repository?

Hi there. I'm setting up an integration test module for a good sized web project. The integration test module is separated from the web project itself, and it has it's own pom. The idea is to use the maven-soapui-plugin to send requests and verify the response. Setting up the soapui-plugin is no hassle. However, I'm having trouble with...

If I package a web application with the maven goal war:exploded, why won't pom.xml and pom.properties be included?

Hi, I'm pretty new to Maven and I've noticed an interesting thing in the Maven WAR Plugin. When I package my Java web application with war:war, a zipped war is created. This war contains also the files pom.xml and pom.properties in the META-INF directory. But if I package my application with war:exploded and create an exploded war dire...

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

How to query Pom version using maven

Is there a goal one can execute that will just echo the version of a pom? I can think of a way to make it work using the maven-ant-plugin, but that requires me to have ant-plugin configuration in the pom and I would like a method that would work with any pom. ...

How can editing maven Pom at runtime?

I need editing POM at runtime. I used Dom4j for read pom and after that set some data. But i need know if exist another form for to do this. Exist a maven utilities for this? ...

Autoformat pom.xml without using m2eclipse plugin

I don't use the Eclipse maven plugin while developing in Eclipse. I generate my Eclipse classpath externally using the following command: mvn eclipse:eclipse This has worked fine for quite some time and I am not inclined to add a maven plugin. However, I would like to be able to "autoformat" my pom.xml file. My pom.xml is not showi...

Missing artifact error in Maven

I get a missing artifact error during Maven build because one of the dependencies declares it's parent artifact using a property for the version. Now the property itself is declared in the parent pom and my project's build fails giving this error: [ERROR] Failed to execute goal on project abc: Unable to get dependency information for xy...

Migrating from Maven to SBT

As you know, SBT is compatible with Maven in some way -- SBT recognizes simple Maven POMs and can use dependencies and repositories specified in them. However, SBT wiki says that, if inline dependency is specified in SBT project definition, POM will be ignored (so using both in this case is impossible): Maven and Ivy configurations (...