maven-2

Can I use the path to a Maven dependency as a property?

I have a maven dependency in my pom.xml as such: <dependency> <groupId>com.foo</groupId> <artifactId>Bar</artifactId> <version>1.2.3</version> </dependency> And I would like to use the system path to the binary as a property (so I can pass it to an external process that is kicked off by maven). I can do this in an awkward...

How do I get Maven to use the correct repositories?

Hi all, I just checked out some projects and need to build them, however I installed Maven quite some time ago (6 months maybe?) and really haven't used it since - the pom.xml for the project I have doesn't have this "http://repo1.maven.org/myurlhere" anywhere in it - it has the absolute url where the maven repo is for the project, but m...

What is the difference between console and eclipse maven

I mean is there any difference between the maven you download and manually install/run from the one eclipse has embedded as an eclipse plugin? The reason why I ask is that, my project builds successfully in eclipse, but I get this annoying error when building from console mvn install, here is the error Reason: Cannot find parent: n...

Excluding classes in maven 2 checkstyle plugin reports

Hi, I have a maven 2 project and I want to configure my Checkstyle report plugin so that only some of my classes are analysed. I have found the maven.checkstyle.excludes property, but despite passing this as a command line parameter (using "-D=maven.checkstyle.excludes=...") I can't get it to work. I can't find anything on the Plugin ...

How can I fail Maven build if exec:java goal fails?

We're using the Maven exec:java goal to run a custom java application that configures a database for use with our integration tests. We want to use exec:java over exec:exec to be able to use the project dependencies in the classpath of the main class to be used. A few times the application has failed for valid reasons, but the Maven buil...

How to stop Maven renaming installed jars

I am installing to Maven repository our internal files using mvn install:install command. All Jars installed in such way have version name added automatically as a suffix. Since we have many batch scripts with the Jars names it is very inconvenient for us. How this auto-renaming can be switched off? ...

Maven easyb plugin java heap space settings?

Hi, I attempted to change my heap size for maven easyb plugin http://www.easyb.org/maven-easyb-plugin/. In my easyb test I added standard code to print the heap size using the code Runtime.getFreeMemory() and Runtime.getTotalMemory(). I tried setting the MAVEN_OPTS=-Xmx1024m -Xms1024m and also set the maven opts in Maven surefire ...

Add Maven Classpath

My project requires some external libraries to build in in Eclipse. They live in /trunk/lib whereas my project is in /trunk/projectA. To get Eclipse to find the libraries on all machines we set a variable PROJECT_A_HOME. Now I'm trying to get some builds going with maven and I can not figure out how to add that path (be it environmenta...

Maven cannot exec a jar project because the mess with transitive dependency

I have 5 maven projects: simple-model, simple-weather, simple-persist, simple-webapp and simple-console. (They are from the Maven Definitive Guide book). The simple-console depends on simple-weather and simple-persist. simple-persist and simple-weather both depend on simple-model: simple-console ---> simple-weather ----> simple-model ...

hot deploy in embedded jetty

Hi, I have a Spring Roo project and I use mvn jetty:run to run my app. The only problem is changes to the *.java classes do not hot deploy, while changes to *.jspx hot deploy fine. So how can I configure mvn jetty to hotdeploy for java classes ? Thanks ...

Maven jetty download dependencies

Hi, Why does every time I do "mvn jetty:run", maven tries to download some dependencies (apache poi and ojdbc jars) ? How can I disable this? [INFO] Scanning for projects.. [INFO] Searching repository for plugin with prefix: 'jetty'. [INFO] ------------------------------------------------------------------------ [INFO] Building inf...

Cannot use Spring LDAP with Spring Security

Hi, I want to authenticate users against our AD so I understand that I need spring security and spring ldap. Here is what is in my POM: <groupId>org.springframework.security</groupId> <artifactId>org.springframework.security.core</artifactId> <version>3.0.0.RELEASE</version> </dependency> ... <dependency> <groupId>org.springframew...

Enable debug logging in maven jetty 7 plugin

I'm running a java webapp with a simple mvn jetty:run, using the latest jetty plugin, but I can't seem to find a way to tell jetty to output DEBUG messages to console (for the embedded jetty instance, not the plugin itself). It's currently outputting only WARN and INFO messages. I've tried setting -DDEBUG and -DVERBOSE, but they don't do...

maven use @component to inject a mojo

Hi, i've a maven plugin composed of some mojos. Suppose there is myproject.FirstMojo declared as @goal first and myproject.SecondMojo declared as @goal second what I want to do is inject first mojo as property of second mojo. What I've tried is declare it the following way : /** * @component role="myproject.FirstMojo" */ private Fir...

How to unpack artifact and filter resources?

I am finding a way how to copy any files to my web server using maven. I have a maven project which contains a sets of html, js, properties and configuration files. I would like pack my stuff and deploy to repository. After that in another maven project I would like to unpack files from artifact, filtering resources and copy to the spec...

Invalid URI with Maven

I am new to maven, while using mvn install I've got this error, any idea? thanks in advance java.lang.IllegalArgumentException: Invalid uri 'http://maven.mysite.com:9999/repository/npg/data-recovery/${applicationVersion}/data-recovery-${applicationVersion}.pom': escaped absolute path not valid at hidden.org.apache.commons.h...

Hosted Continuous Integration

I'm currently looking for a (cheapish!) hosted continuous integration service for my private projects and they seem a bit thin on the ground. Does anyone have any experience of using one? ...

multi-module maven project

If I have 6 modules in my project is it possible to build only one out of six ? without commenting out others ? EDIT Submodule will not work itselft because or parent tags. I need to install the parent first to make it build. how can I do it without installing parent ...

Simple Mavenization of existing Ant build files

If you have an existing ant file, what is the best way to convert the project to Maven. I've checked out things like fAnt, but if I'm going to mess with this stuff, I might as well go full-bore for Maven. I expected something to exist that can just start the pom.xml for me based on the existing build.xml, but I haven't found anything yet...

Maven2 cannot find parent from relative path

I'm trying to use Maven2 but my child projects cannot find the parent project. Directory structure is as follows: --parent --pom.xml --child --pom.xml Child pom.xml file looks like: <parent> <groupId>com.mycompany.app</groupId> <artifactId>myapp</artifactId> <version>${app.version}</version> <relativePath>.../par...