maven-2

Up to date gwt-incubator jars for Maven

I want to use the latest gwt-incubator drop - gwt-incubator-july-14-2009.jar - in a Maven project. The most recent version published on central is 1.5-Dec_28. Is there a more up-to-date maven repo for the gwt-incubator jar? ...

Maven offline - problem with mvn-plugins

Hi all. I'm using maven in my project and I need to run the build in a non-internet-access machine. When I test my project build everything is working, but when I run the build in a future moment, the maven try to update the mvn-plugins and this sht* is broking my build. My config file: settings.xml from mvn. <profile> <id...

maven yui compression on war:war

I'm trying to automatically compress both CSS and JS using maven and this plugin. I want to compress when the goal war is executed but I'm not figuring how: <build> <finalName>${artifactId}-${version}-production</finalName> <plugins> <plugin> <groupId>net.sf.alchim</groupId> <artifactId>yuicompressor-maven-plugin</ar...

How do I use Maven through a proxy?

Hi dear community, I wanna share with you my experience of using maven through proxy. You would most likely face exceptions and messages like: repository metadata for: 'org.apache.maven.plugins' could not be retrieved from repository: central due to an error: Error transferring file: Connection refused: connect See my answer below. ...

How do I stop my command-line arguments being escaped in a maven plugin?

I have a plugin that uses the Plexus Commandline to invoke some external process and capture the output. One of the arguments is in a funny format with spaces and quotes, e.g. --range:"25 Aug 2008"-"04 Aug 2009". I have no way to change the required format of the argument, but Plexus detects the spaces in the argument and wraps the whole...

Deploy Maven site using FTP Ant task

Hi, I am trying to deploy a Maven site to an FTP server. I am using the following code in my pom.xml: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>ftp</id> <phase>post-site</phase> <configuration> <tasks> <ftp action="del" server="nexu...

Externalising SCM credentials with Maven

Is there a method to externalize my SCM credentials so they are not stored in the project's POM? The problem being if they're contained in the project's POM, they will be visible to all when the project is deployed. ...

Best practices creating Java service or daemon scripts

I'm looking for a tool to run java server processes as daemon services in Linux (and potentially on Windows and other OS's). I'm looking for the best practices when it comes to how to build production capable scripts and launch configuration. I'm familiar with best practices when it comes to a project's build, using Apache Maven, or som...

Static code analysis tool to detect code duplication in Maven projects

After I found out that there's no plugin for Simian in Maven 2, we turned to CPD, but it doesn't perform as well as Simian (observed in our Ant projects that use both Simian and CPD). I know that developers in my team have been checking in redundant code but CPD isn't flagging anything. I wanted to try out another code duplication analys...

which Maven settings.xml files?

How do I use maven command line to determine which settings.xml file Maven is picking up? ...

Maven findbugs:check - Output Summary Of Bugs

Does anybody know how to configure the maven findbugs plugin to output a summary of the bugs to the console (similar to the pmd plugin)? At present findbugs:check just prints out how many bugs there are in total and I need to check the individual modules target/findbugs directory and each findbugs.xml file to fix the issues. <plugin> ...

Maven2 - problem with pluginManagement and parent-child relationship

from maven documentation pluginManagement: is an element that is seen along side plugins. Plugin Management contains plugin elements in much the same way, except that rather than configuring plugin information for this particular project build, it is intended to configure project builds that inherit from this one. However, this only...

Maven configuration of dependency (jar)

Hi I have a java application "app" which has a dependency of "dep.jar". "dep.jar" has a configuration file - "conf.properties" which is copied and packaged into dep.jar. The problem is that during running of "app", "conf.properties" cannot be found. how should I specify the path to "conf.properties" (in the code of "dep.jar") so that i...

How can I merge multiple OSGi bundles with BND / Maven-BND-plugin?

I'm using some off-the-shelf OSGi bundles in my application and would like to repackage them together with additional packages that are not yet OSGi compatible into a new bundle. Case in point is EclipseLink, which is available as several OSGi bundles, most of which are optional, depending on what you want to do. I want to pick those bu...

package com.sun.xml.internal.bind.v2.model.annotation does not exist

I'm trying to use a solution for serializing exceptions using jaxb. (http://forums.java.net/jive/thread.jspa?messageID=256122) The class I need to implement for that solution requires referencing the following com.sun classes. import com.sun.xml.internal.bind.v2.model.annotation.AbstractInlineAnnotationReaderImpl; import com.sun.xml.in...

Maven repository for Eclipse BIRT runtime

I'm trying to find a maven repo to allow me to add BIRT reporting dependencies to a Eclipse Dynamic Web project. The closest I've found is http://repository.jboss.org/maven2/org/eclipse/birt/, but when that repo is added to the m2eclipse indexes, the BIRT artifacts are not found. As per http://dev.eclipse.org/newslists/news.eclipse.tech...

How can I prevent Maven from checking for updates from repositories that I don't list in my settings.xml file?

In my settings.xml file I have listed repositories that I want Maven to use (see the file below). These repositories are located in the build machine and I am working this way to prevent a build fail when there's is no Internet connection in the build machine. The problem is that Maven automatically looks for updates in the central repo...

Trouble Configuring JPA in Jetty

I am trying to get JPA (Toplink) configured to run in Jetty being run from the maven plugin and am getting a javax.naming.NameNotFoundException. The specifics. web.xml: <persistence-unit-ref> <persistence-unit-ref-name>persistence/mod</persistence-unit-ref-name> <persistence-unit-name>ModPU</persistence-unit-name> </persistence...

How to force Maven to download maven-metadata.xml from the central repository?

What I want to do is to force Maven to download the 'maven-metadata.xml' for each artifact that I have in my local repository. The default Maven behaviour is to download only metadata from remote repositories (see this question). Why I want to do that: Currently I have a remote repository running in a build machine. By remote reposit...

Unknown Dependency Coming up in Maven Build

I've been trying to use Maven to build a project. The project builds fine on a few computers I tried but on one machine, I'm having a random issue. Essentially, maven is searching for a dependency that is not included in the pom.xml file or the in the settings.xml file at all. I have tried mvn dependency:purge-local-repository but stil...