maven-2

Maven won't use public key to deploy

I'm using SSH to deploy my Java artifacts to a server. I have the keys set up so that I can interactively SSH to the server without requiring a password, but when I try to run the "mvn deploy" or "mvn release:perform" commands, it hangs (at what I assume is the password prompt). My ~/.m2/settings.xml file contains the username for the s...

Howto create dynamic named folders with Maven2 Archetype?

I try to build an archetype structure like this, a webapp with some custom folders for our web-framework. Especially some dynamic folders which also will contain some files brought by the archetype. └───src └───main └───webapp └───WEB-INF ├───cfg │ ├───log4j │ └...

Maven: Re-use a POM file in every project.

My goal is pretty simple actually but since there are multiple (and seemingly complex ways to do this) I wonder what I need to do... So I have certain runtime libraries (ADF libraries in particular) that are needed to be added to every project. This parent pom file will just have JAR dependencies in it. How can I use this pom file from a...

With Maven2, how would I specify a custom directory to which a dependency should be copied?

Basically, I have a multi-module project consisting of 5 different modules. One of the modules is kind of the parent module to the other 4, meaning the other 4 need to be built before the 5th, so you could say that each of the 4 modules is a dependency of the 5th. Thus, I've made dependency entries for each of the modules in the 5th modu...

JEE6 Global JNDI Name and Maven Deployment

I'm having some problems with the global JNDI names of my EJB resources which is (or at least will) cause my JNDI look ups to fail. The project is being developed on Netbeans and is a standard Maven Web Application. When my application is deployed to GF3.0 the application name is set to something like: com.example_myapp_war_1.0-SNAPSHOT...

Bash completion for Maven escapes colon

I added bash completion for Maven following the docs: http://maven.apache.org/guides/mini/guide-bash-m2-completion.html Everything works well except for goals that use a colon. For instance, instead of mvn eclipse:eclipse completion escapes the colon mvn eclipse\:eclipse Any suggestions how this can be fixed? I'm using Ubuntu 8.1...

Maven archetype for basic spring hibernate struts2 application

Hello I am looking for a basic maven archetype which can help me create a spring hibernate struts2 application. I have tried using appfuse but it sucks. It took more than half an hour to download n number of dependencies and the project it created was having errors also. if you know anyother maven archetype please tell me. Thanks...

Newbie question about maven

Is it true that the only configuration file I need to bother with is pom.xml ? It seems to me that Java guys live xml more than any other stuff,is that true? ...

How to execute maven tasks in eclipse (Sonatype plugin)

Hi all I know it must be something simple, but I just can't figure it out.. I'm using the Sonatype maven plugin on eclipse. When I want to build a war file for a webapp project, the only way I know to do it is to use the command line and type mvn package. I've looked all through the right click menu and I can't find any way to do it fr...

How to: database versioning with maven2?

I am finding any maven plugin for versioning database changes. ...

Copy dependencies maven war

When I try to use the plugin "maven-war-plugin", it copies all libraries to / WEB-INF/lib, how to copy to another directory? Example: "/ libtest" ...

portlet-mvc 3.0 + maven for websphere portlet: examples?

I'm trying to develop a websphere portal portlet using java, maven and spring-portlet-mvc 3.0.2.RELEASE but so far I'm not having a lot of luck. The problem that I'm having is that a lot of the tutorials are either outdated, incorrect, contradict eachother or a combination of all the above. Also I have to use RAD but the tutorials also c...

Why maven requires so many options to create a hello world project,can you recommend a more dedicated build tool for Java?

Quoted from here: mvn archetype:generate -DgroupId=org.sonatype.mavenbook.simple \ -DartifactId=simple \ -DpackageName=org.sonatype.mavenbook \ -Dversion=1.0-SNAPSHOT And I also have to specify an archetype number...

Eclipse m2eclipse getting dependancies from local repository

I have dependancies installed local on my machine (~/.m2/repository/blah/blah/blah) and m2eclipse is not recognizing them as there - I think m2eclipse is using its own maven instance. Is there any way to force m2eclipse to use the local maven installation in osx? ...

Load properties file in JAR?

I'm having trouble when one of the jars that my web app depends on tries to load a properties file from within the jar. Here is the code in the jar. static { Properties props = new Properties(); try { props.load(ClassLoader.getSystemResourceAsStream("someProps.properties")); } catch (IOException e) { ...

execute build.xml with maven

Is it possible to execute build.xml script with maven? This script checksout all my projects and subprojects and I've just got used to using maven, didn't really use much of an ant before and I know ant can be used with maven so my question is how ? ...

Maven animal sniffer plugin

Hi, I'm trying to use the animal sniffer Maven plugin to verify that code is compatible with JDK1.4. The following configuration works: <plugin> <groupId>org.jvnet</groupId> <artifactId>animal-sniffer</artifactId> <version>1.2</version> <configuration> <signature> <groupId>org.jvnet.animal-sniffer</group...

Maven SVN checkout example

Concerning my previous question -> http://stackoverflow.com/questions/2622191/is-there-a-svn-maven , I went trough usage page -> http://maven.apache.org/scm/maven-scm-plugin/usage.html didn't found quite what I was looking for, here what I would like to do : Checkout list of projects which I specify for ex : http://mysvnurl/myproject...

Java heap space

I get this message during build of my project java.lang.OutOfMemoryError: Java heap space How do I increase heap space, I've got 8Gb or RAM its impossible that maven consumed that much, I found this http://vikashazrati.wordpress.com/2007/07/26/quicktip-how-to-increase-the-java-heap-memory-for-maven-2-on-linux/ how to do it on li...

eclipse/maven/sonatype war build problem

Hi all My (simple) war project builds fine using mvn:package at the command line, but fails to build in eclipse using maven via the sonatype plugin. The error I'm getting is: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1-alpha-1:war (default-war) on project shoploops_webapp: Execution default-war of goal o...