maven-2

Problem when importing Maven2 project in Eclipse

In my project, I have a resources directory (src/main/resources) that contains properties and XML files. I want to filter only the properties files, but not any others kind of files (XML for example). Thus, I've set this in my pom.xml: <build> <resources> <resource> <directory>src/main/resources</directory> ...

Is it fair to be held up to mockery for preferring to run "mvn clean install" as 2 commands ?

One of my team mates was held up for mockery by the team leads for preferring to run maven as: $ mvn clean $ mvn install The discussion by the team leaders was about efficiency and speed of work & someone brought up the issue that person X is continuing to split $ mvn clean install into 2 separate commands. I know, I know that lif...

Sourceforge org property for Ivy and Nexus

When trying to use the following settings: <dependency org="net.sourceforge.artifact" name="artifact" rev="2.0"/> and: <artifact pattern="http://localhost/nexus/content/repositories/releases/[module]/[artifact]/[revision]/[artifact]-[revision].[ext]" /> Nexus expects http:// ... net/sourceforge/artifact/artifact/revision/artifact....

How do I avoid having to manually tweak Import-Package headers with Maven bundle-plugin?

I'm happily using the Maven bundle-plugin to create OSGi manifest headers for my modules. However, when there are configuration files that pull in classes which aren't referenced directly in the code, the plugin can't tell which packages it's going to need. One example is a bundle with domain models that constitute a Persistence Unit fo...

Using Jython with M2Eclipse

I currntly use M2Eclipse for the majority of my Java development and Pydev for Python/Jython development within Eclipse. I would like to use Jython to prototype and test classes within my Java projects. The M2Eclipse plugin manages all the dependencies defined in the Maven pom.xml file automatically. Is there anyway for Pydev to utilis...

Maven FTP distribution problem

maven release:perform is failing to distribute via FTP. The first thing I checked is that I can access the target server with the given credentials from the command line. I can with passive FTP but not with active FTP (known firewall restriction). What I can see from googling is that Maven uses passive FTP by default. Is that correc...

Multi-platform multi-module builds with Maven

I have a large project which uses SWT on several different platforms like windows (32 and 64 bits), linux-gtk (32 and 64 bits) etc. The project has several modules in a simple structure: project-parent +- core +- swt-bridge (uses SWT) +- module1 (uses swt-bridge module) +- module2 +- ... +- module17 (uses swt-bridge module) I w...

Getting -bash: mvn: command not found

Hi. I tried setting the Maven PATH in .profile file as well using export commands in terminal(Mac OSX). But, on running mvn commands, getting -bash: mvn: command not found Please help. ...

How can I merge resource files in a Maven assembly?

I'm using Maven and its assembly plugin to build a distribution package of my project like this: one project assembles a basic runtime (based on Felix), with the appropriate directories and bundles, in a ZIP file. third-party libraries are collected in one project each and either converted to OSGi bundles or, if they are already OSGi c...

Build Maven Project Without Running Unit Tests

How do you build a Maven project without running unit tests? Currently restructuring some code I have for a Servlet and would like to try it out in my web browser (which means running mvn install to get the .war to upload to Tomcat). I'm fully aware my UNIT test are failing and I'm fine with that because I will fix it once I have the co...

Detecting cyclic dependencies with Maven

In my application I'm using an external library (Batik 1.7) that is made up of several modules. The modules have multiple cyclic dependencies between themselves. This doesn't influence the build, but some tools (e.g. the M2Eclipse Dependency Graph, or the Dependencies report) will not work anymore. Is there a good way to diagnose what c...

How can I add a calculated property to a Maven project using a plugin?

I have written a Maven plugin to grab the machine IP address and would like to be able to create a property so that the IP address gets filtered into a file (via ${ipaddress}) when archetype generation happens. I have not been able to find how to do this. Does anyone know? ...

Build single module from multimodule pom

Is it possible to do? The environment: Multimodule pom consists of 3 modules: mm1, mm2, mm3. Module mm2 has mm1 as dependency. It is possible to build parent pom without any errors. The question: Is it possible to build single module mm2 (i.e., run maven from mm2 base directory) without installing mm1 into local repository? Thanks. ...

Is there a Maven Report showing Ohloh statistics?

Does anybody know if there is a Maven 2 plugin for including Ohloh statistics/widgets as a report? ...

Is there a Maven build for eclipselink that makes the OSGi bundles run in Felix and others?

The Eclipselink OSGi bundles seem have trouble working in some OSGi containers, notably Felix, because they fail to import packages (and that are exported by the system) that they actually require. One example is the missing import of javax.xml.namespace in the core bundle of the current 1.1.3 release. The eclipselink team has targeted ...

Why doesn't Maven's mvn clean ever work the first time?

Nine times out of ten when I run mvn clean on my projects I experience a build error. I have to execute mvn clean multiple times until the build error goes away. Does anyone else experience this? Is there any way to fix this within Maven? If not, how do you get around it? I wrote a bat file that deletes the target folders and that works ...

JSON-Taglib library not working w/ SDK 1.6 ??

Hi guys, I'm currently working on a project that uses the json-taglib-0.4.1.jar library to do some json communication between front and back end. That library use to work fine until we migrated to Java 1.6 recently, we were compiling against 1.5 before that. On top of not working anymore, I read it's not available in public reposito...

"Cannot get the revision information from the scm repository"

I get maven error : "Cannot get the revision information from the scm repository" Any idea how to solve this ? Thanks. ...

Integrating Maven & Non-maven projects

I'm currently working on two projects simultaneously: My main project (built with maven) A spike of an open source project, which my main project depends on (not build with maven) How do I set up maven to use the OSS project as a dependency with the least amount of friction, given that I'm often developing the two in tandem? ...

How to check licence of third-party jars

We distribute a number of third-party jars with our product. Is there any way I can analyse or perform a lookup on each jar in order to determine its license - e.g. CDDL v1.0, Apache License Version 2.0? I thought maven might provide an answer, but a quick search of the repositories shows that many projects do not provide their licens...