maven-2

Carrying over dependencies in Maven

I am working on 3 maven projects. They're all separate projects, but they share a common base framework. Let's call the framework A and its dependencies B and C. There is a library L that A depends on. Any package that uses A will also need to use L, and it will need to use the same version of L that A does. For this reason, I would...

How to pass in credentials when connecting to sonatype nexus (anonymous login disabled) ?

In eclipse, the m2eclipse plugin will prompt me for my credentials when I'm building a maven2 project. And it compiles fine. But if I now try to run "mvn install" from the command line, I get an artifact not found error. How do I add the username/password into my pom.xml in order to solve this problem. Thanks ...

What are the benefits of sticking with maven's default project directory structure?

Simply put, if you're using maven, should you treat the maven layout as the gold standard, or should you convert your layout to fit your tooling (WASD, myEclipse, RAD, etc.)? Realizing that maven is configurable and you can override the defaults in the Super POM, I'm attempting to determine if I should change the layout to support spe...

Why does the maven-assembly-plugin puts the same dependency in my zip multiple times?

I put together an assembly descriptor <assembly> <id>all</id> <formats> <format>zip</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <moduleSets> <moduleSet> <includes> <include>org.openscada.atlantis:org.openscada.atlantis.core.common</include> <include>org.openscada.atlantis:org.openscada.atlantis.net.b...

How to make maven place all jars common to wars inside the same EAR to EAR root?

We have a solution with numerous wars. Wars are similar in the sense they all use hibernate and spring. This means that we have a number of same jars inside each war. This is becoming a problem, because the size of the ear is starting to grow out of proportion. I would like to use Maven to calculate dependencies and to place all jars co...

How to read an external properties file in Maven

Does anyone know how to read a x.properties file in Maven. I know there are ways to use resource filtering to read a properties file and set values from that, but I want a way in my pom.xml like: <properties file="x.properties"> </properties> There was some discussion about this: Maven External Properties ...

Unable to update snapshots or run the install goal with Maven

Does anyone have an idea how to resolve this Maven error? I get the following when I attempt to update my project's snapshots: Build errors for my-projects-name; org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-dependency-plugin:2.0:u...

Merge Spring and Grails projects

We are developing an backoffice application using Spring and Maven as configuration manager. The project is moreless divided in two parts, and one of this parts is just for manage the data in the DB tables. Now someone has discovered Grails, and with Grails this job is very easy, but we can't drop all the job and start a new project (th...

maven s3 wagon provider

How to deploy with wagon s3 provider? I've found several plugins, most of them are incomplete, some of them are not maintaned. There is also a sandbox plugin from official maven SVN repository but I'm figuring how to use it. Any hint? ...

Including a non-Mavenized dependency so it works with maven-shade-plugin

I want to include GData Client, which doesn't use Maven, as a dependency into my Maven project. It ships as a bunch of JAR files. Additionaly, I use Maven Shade Plugin to build an executable JAR without any external dependencies (with the default configuration, no renaming/including/excluding/transforming of dependencies). How can I do...

GWT 1.6.4 on FreeBSD?

Anyone have GWT 1.6.4 running on FreeBSD? Our build server is a FreeBSD box, and dies with the following when we try to compile: # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x0000000800d0c724, pid=4749[thread 34370233088 also had an error], tid=0xa02d80 # # Java VM: Diablo Java HotSpot...

Using maven to build/deploy/use projects with JNI.

I am trying to use maven to build a project that depends on a JNI wrapper around the OpenCV computer vision library. I've been able to "maven-ize" the OpenCV wrapper here: http://ubaa.net/shared/processing/opencv/ by using FreeHEP's NAR maven plugin, but the documentation for that plugin is somewhat lacking. I've been able to create ...

Can I use the maven ant tasks with a custom maven repository?

I need to specify a certain directory which the maven ant tasks should use as repository. maven.repo.local doesn't seem to work with that. Any other ideas? ...

Injecting Maven project information into Swing Application Framework resources?

I have a Maven project using the Swing Application Framework and would like to inject project information from the pom.xml into my application's global resources to avoid duplication. The base application (provided via netbeans) uses Application.title, Application.version, Application.vendor, Application.description resources etc for ...

Why does Maven have such a bad rep?

There is a lot of talk on the internet about how Maven is bad. I have been using some features of Maven for a few years now and the most important benefit in my view is the dependency management. Maven documentation is less than adequate, but generally when I need to accomplish something I figure it out once and then it works (for exam...

Running a groovy application under Maven

Hi! We have developed a Groovy application. Under development for starting it we use the following command line C:\myapp>mvn grails:run-app Without sending any request to the server one can see how the memory used by the java process in increasing and increasing. When it starts at about 100M are allocated and a couple of hours later...

Is it possible to read a properties file from all .war files deployed in a JBoss container.

Hi. I've managed to deploy a .war to the Jboss web container containing and read the pom.properties located under /META-INF/groupid-dir/artifactid-dir/ To access the file I've used the following code inside a JSP in the same war: ServletContext servletContext = getServletConfig().getServletContext(); InputStream in = servletContext....

Use an alternative Maven Profile during test phase

I'm trying to build an application starting from an Appfuse Archetype, but I get some strange problems. For once I'd like to use a hsqldb for automated unit tests and integration tests, and a mysql db for my manual testing so that I can easily manipulate the data when I need to, so it would be nice to automatically switch profiles during...

Is it possible to pass system properties to unit tests run by Hudson?

Hi, We're using Maven 2 and Hudson, and everything is working well. My question is it possible to have Hudson run all the unit tests in a particular project with a specific "-D" argument. For example, "mvn test -DlogConfig=qa". Thanks in advance. ...

Maven plugin can't load class

I'm trying to make a maven plugin that needs to use reflection. I want a project to run the plugin, and give it the full name of a class in the project, and the plugin will load it by reflection to get info from it. There's something strange with the classloader though, because it can't find the class when I use Class.forName("package....