maven-2

How do I set a dependency on Spring Web Services in my POM.xml

I get this on a lot of Maven dependencies, though current source of pain is Spring. I'll set a Spring version and include it like so: <spring-version>3.0.0.RELEASE</spring-version> <!-- Spring framework --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring-version...

Howto start Maven "compile" goal on save in Eclipse

I have a Maven project with JavaScript code. There is a special javascript compiler plugin connected to the compile goal in the pom.xml. So when I type "mvn compile" then the JavaScript sources in src/main/javascript are compiled (compressed and obfuscated) and saved into the target/classes directory. On the command line this works great...

Looking for a good dev environment for OSGi bundles

Hi, I'm currently investigating in the field of dev environment for OSGi bundles. My goal is to find a way to develop, test and debug with ease the bundles I'll be coding. Besides, I have some "cultural" requirements. I want to be able to use java continuous integration servers (typically, Hudson) As a consequence of that first requi...

How to include the packaged parent in the child (war) package

I have a parent pom whose packaging type is jar. Then I have a child pom whose packaging is war. I want to include the packaged parent jar in WEB-INF/lib of the packaged child. How do I achieve this? ...

Is JPA persistence.xml classpath located?

Here's what I'm trying to do. I'm using JPA persistence in a web application, but I have a set of unit tests that I want to run outside of a container. I have my primary persistence.xml in the META_INF folder of my main app and it works great in the container (Glassfish). I placed a second persistence.xml in the META-INF folder of my ...

Maven Assembly Plugin - install the created assembly

I have a project that simply consists of files. I want to package those files into a zip and store them in a maven repository. I have the assembly plugin configured to build the zip file and that part works just fine, but I cannot seem to figure out how to install the zip file? Also, if I want to use this assembly in another artifact,...

How do I build a J2EE EAR file in RAD using Maven?

Using Rational Application Developer to create a J2EE application, I create a project for my EAR and a project for my WAR - following the usual project structure created by RAD. So, how do I create a Maven build file that builds the EAR with the WAR inside, etc - ready to deploy. Build needs to work when kicked-off from Hudson. ...

Eclipse Maven web application - can not run on server anymore

I have an maven eclipse webapp project that I was able to right click and 'Run on server' and it would deploy on tomcat. I recently did a 'maven -> Update project conifgurations' and I now can NOT deploy and run the project as a webapp. Has anyone seen this before? The only output from tomcat is as follows - it doesnt even look like it...

How to access a XML file in a maven project so it stays available when packaged

I currently started working on a maven web-app project that needs to be launched with the jetty:run-exploded goal for development/debugging in eclipse. Now, I have an XML file which contents I need to access at runtime. My problem is: where to put the file so that the code that does the reading works both in "exploded" and packaged (i.e...

How to configure IntelliJ IDEA and/or Maven to automatically add directories with Java source code generated using jaxb2-maven-plugin?

In our project we are using jaxb2-maven-plugin to generate Java source code from XML Schema, which causes that our Maven module requires additional source code directory (in our case target/generated/main/java). Up to date I've been using Eclipse and maven-eclipse-plugin to import all the projects into Eclipse workspace. The plugin is (s...

Maven Repository proxies third-party repositories, does this produce traffic?

We have a public Sonatype Nexus Maven Repository which is a proxy for several third-party repositories, such as JBOSS or the Scala-Repo. Does the downloading of artifacts which are located in one of the proxied repositories (JBOSS for example) produce traffic on the sever which runs our repository? ...

create manifest without classpath entries in ejb-client jar, but have classpath entries in main ejb jar using maven-ejb-plugin

Hi, I am using maven-ejb-plugin to generate the ejb jar and the client jar. Also I am using archive to generate the manifest file. But the problem is I need the classpath entries in the ejb jar but not in the client jar. Is there any configuration available to addClasspath only in the main jar and in the client jar do not set the class ...

How to disable auto "Update Maven Dependencies" after saving a pom.xml?

How to disable auto "Update Maven Dependencies" after saving a pom.xml in Eclipse IDE with m2eclipse Plugin? 16.04.10 11:09:40 MESZ: Refreshing [/project/pom.xml] 16.04.10 11:09:40 MESZ: Maven Builder: AUTO_BUILD ...

how to create maven property

How can I create maven property with the classpath as part of it ? ...

Visual Studio C++ Solution in Maven2

A new project is coming up that will require interaction between Java and C++. It's been decided that the project will be built via Maven2. Unfortunately I don't know anything about Maven and the Java guys don't know anything about C++. They have their build chain all set up with various reports being emitted for each part related to ...

Add maven-build-classpath to plugin execution classpath

Hi All I am writing some coge-gen maven-plugin. I need my project classpath be injected in to my plugin execution classpath. I found this article. The solution there works but is quite long. Maybe someone of you know an out of the box solution. ...

Managing Java dependencies in a Grails application?

I'm trying to adopt my development from Spring/Maven2/Tomcat -> Grails, and I'm wondering if there's an easy way to manage dependencies in grails separate from maven. Maven does a lot of the magic that grails is doing automatically (unit testing/building/etc.), so I wonder if there's a need for maven at all in grails projects. So, then,...

maven-assembly-plugin and ar archives

In my maven project I want to assemble an ipkg file (This is like a Debian Package but for embedded systems). For this I need to create AR archives with the assembly plugin. In the plugin documentation I found this: "and any other format that the ArchiveManager has been configured for". But I can't find out how to "configure" the "Archiv...

properties-maven-plugin: Error loading properties-file

I want to extract all the properties from my pom.xml into a properties-file. These are the common properties like dependency-versions, plugin-versions and directories. I'm using the properties-maven-plugin, but its not working as i want it to. The essential part of my pom.xml: <plugin> <groupId>org.codehaus.mojo</groupId> <artifact...

How to customize $(project.compileClasspathElement) like expression in Maven?

When i try to run a maven plugin, i found that the default classpath defined in expression $(project.compileClasspathElement) is too long. So, i just want to customize a shorter classpath for this plugin. The default configuration is as follows: <plugin> <groupId>org.datanucleus</groupId> <artifactId>maven-datanucleus-plugin</artifactI...