maven-2

which Maven(2) plugin to use with GWT 1.6?

There seems to be quite a lot of confusion regarding integrating Maven with GWT 1.6, as Google has changed the layout to "exploded war" format. Which plugin are you using? Does it have goals for hosted/compile? Does it work "in place", writing output to src/main/webapp/WEB-INF, or does it use an external dir? (I'm not a fan of having...

Adding the current date with Maven2 filtering

I have a Maven2 project, and I need to add, in a properties file, the current version and the current date. For the current version, I've used ${project.version}, which works correctly. My question is how can I set the current date (i.e. the date when the build is done by Maven2) in my properties file: client.version=Version ${project...

How do I set up m2eclipse to see the archetypes in repo1.maven.org?

As in the title. I can't find any archetype catalogues for repo1.maven.org For example, I want to use spring-ws-archetype. How do I set things up so I can see it in my options setting up a new Maven Project? ...

How to assign a keyboard shortcut to a run configuration in IntelliJ?

It seems you can assign a keyboard shortcut to almost everything else, but I can't see an option to do this for run/debug configurations? The "run configurations" are listed in the drop-down on the IntelliJ toolbar. I'd like to setup a run configuration that can perform two maven tasks sequentially (jetty:stop and then jetty:run if you ...

Maven and dependent modules

Colleagues have been touting the wonders of maven and its magical dependency stuff but I'm finding that it fails at what I would consider the obvious use. Suppose I have a root folder with a master POM. Then underneath I have some projects, call them A and B B requires A and so the POM in the B folder has the appropriate dependency en...

How to keep updated libraries in MAVEN?

On the development shop I work for, we have an internal MAVEN repository, to keep our libraries (proprietary & open-souce). A common problem that we face is that, sometimes, the open-source libraries in our local MAVEN repository gets obsolete. Is there an automatic way to keep all the open-source libraries I use in my MAVEN repository a...

Maven Release Plugin war stories

Hello, I have been given the task of exploring the maven-release-plugin before we try using it on our project. As of now, the releases are done manually on request. This process involves (skip this part if you're not interested, it's just to give you an idea): In the head, open the base POM file: Increment the numbering of the \proje...

Is Developing Maven war apps in MyEclipse worth it?

My organization has made an upper level decision to move to maven as the standard build tool for Java projects. I have been tasked with helping our local teams migrate projects over to maven. One of the core tools that is in play is the MyEclipse IDE. MyEclipse seems to have had a "fun" history with the maven team as evidenced in vari...

Spring online repository for Maven

I've just installed Maven2 for the first time. By default it pulls down a few useful jars into a local project: jakarta-commons, junit etc. I wanted to pull in the latest Spring release (2.5.6 at the time of writing). But the online repositories I looked at (iBiblio and Maven) only had much older versions of Spring libraries. Are the...

Maven: remove a single transitive dependency

My project includes a jar file because it is listed as a transitive dependency. However, I have verified not only that I don't need it but it causes problems because a class inside the jar files shadows a class I need in another jar file. I do how leave out a single jar file from my transitive dependencies? ...

How to get the name of goal in maven2's Mojo at runtime

For Maven2 how can I get the name of goal currently being executed in Mojo's execute method? Precisely I need value of @goal attribute inside Mojo's execute method. ...

What is the best way to utilize Subversive when sharing multi-module project in Eclipse?

I'm trying to share multi-module Maven project (using m2eclipse plug-in) from SpringSource Tool Suite 2.0.0 to Subversion server (Subversive plug-in for Eclipse). I've found that svn:ignore property is not propagated to submodules of the parent project: I need to right-click on the property and run "Apply recursively...". More, it won't ...

Maven 2.1.0 not passing on system properties to Java virtual machine

We use the command line to pass on system properties to the Java virtual machine when running our Hudson builds on a Linux box. It used to work quite well in 2.0.9 by since we upgraded to 2.1.0 it has stopped working altogether. The system properties just never make it to the Java virtual machine. I have created a small test projec...

Best practices for installing 3rd party libraries into your hosted Maven repository?

Let's say that you have a project which is using a 3rd party library, such as Google's Analytics Data API (gdata), which does not appear to be currently deployed into any well-known or popular Maven public repositories/indexes. This isn't much of a problem, as I can just deploy the artifact into my local hosted Nexus repository. But, ar...

How can I add maven dependencies to the flex build path in Flex Builder 3?

We're using maven to build a flex project using flex-mojo's, which is great. The problem is I can't add the swc dependencies specified in the pom to the flex build path. As far as I can see Flex Builder only lets you use an absolute path, so it can't see the maven dependencies even when using the m2eclipse plugin to add maven support. ...

Is there a way to skip only a single test in maven ?

I would like to skip only a single test while launching mvn install. Is there a way to do that ? ...

Ant replace in maven2?

I'm looking for some way to replace patterns in files with values, during build time. E.g. a configuration file may look the same except that different machines requires different hostnames in some setting. In that case i want to have a template file, where hostname is replaced with @@hostname@@ Then when building, I want to create sep...

Seeing actual maven invocations

Is there a way to get Maven to include in its logs the actual commands that were invoked to perform a particular operation? I'm having a problem where a javac invocation is failing and I'd like to see what maven was actually trying to do. ...

How to package a webapp as a deployable war?

I'm new to Maven but I'm hooked on what it offers. How do I take a webapp and have Maven package the webapp as a deployable WAR? Additionally, can I set up Maven to automatically version the builds? ...

m2eclipse Indexing 3rd-party jars from Maven repository

Hi, I am using Nexus repository. and using Eclipse 3.4 with m2eclipse plugin installed. sometimes I need to upload jars that are not located in the central repositories (Like Sun jars). so I upload them under the "3rd-Party" section in Nexus. The problem is that when trying to add those jars as dependencies, eclipse does not index them ...