maven-2

Debugging Maven's "The artifact has no valid ranges"

We're using Maven at work at quite regularly we get the error message "The artifact has no valid ranges". After a long time of Googling and experimenting I realised what this error message means: The artifact does have valid ranges, just too many of them. For example, my master POM has a dependency on superframework v.1.0 only, but the...

src/main/webapp directory not recognized by Eclipse

I use m2eclipse to import Maven Java projects in Eclipse. It fails to recognize src/main/webapp as a source directory. Graphically in the package explorer (or when I look into Java-Build-Path in the project's properties), this directory isn't in the list of sources folder (while src/main/java or src/main/resources do). To access it, I...

m2eclipse marking 'target' directory as 'Derived'

I have a Maven Java project, imported using m2eclipse. The target/ directory is not marked as 'Derived' by m2eclipse. Problems: It is validated, so any validation error appear twice. My example shows a JSP Problem, when I insert intentionally an error in a jsp. When I want to open a resource with Ctrl-Shift-R, all files appear twic...

How to Deploy my Open Source Projects using Maven's Central Repository?

Is there anything I could do to get my own open source stuff into Maven's Central repository? I've wondered many times how I could get my own projects into Maven's Central repository. I was asking this myself, especially as I've seen some well known projects hosting their own repository, requiring users to add dependency and repository....

Resin's `pomegranate' - auto-magical-loading maven jar dependencies for a project - but how to generate jars with pom.xml for them?

Hi. Resin java server has a neat feature they call pomegranate ( http://www.caucho.com/projects/pomegranate/ ) which allows to just put various jar dependencies in server's directory (project-jars/) and then it loads them for a web-app from its pom.xml file. Question is: how should I put the jars to resin's project-jars ? (just copying...

How can I clean _svn folders/files from 'src/main/webapp' folder when maven2 builds webapp project in netbeans 6.7?

I have created a webapp using maven2 archetype in netbeans 6.7. when I do plain build(removing all the plugin configuration), it copies all the required files including the '_svn' folders. But I don't want those files, how can I clean _svn folders/files from the *.war file and from the exploded target folder which contains the 'src/main...

Execute Maven plugin goal on parent module, but not on children

We have a multi-module maven project that uses a profile that defines a buildnumber-maven-plugin to increment a build number and then check it into source control. If I define the plugin in the parent pom.xml it executes for all the child builds as well. Here's my parent pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns...

Maven assembly Plugin with Maven Jar Plugin

Hi, I'm trying to use the maven assembly plugin for the first time. Essentially, I want to combine the output of the maven assembly plugin with that of the maven jar plugin into the target/classes directory so I can still run the app within Eclipse. I couldn't find a way to tell the maven jar plugin to collect the output of the maven ...

[Maven] How to display a list of available goals?

I'm rather new to Maven and I often find myself wanting to see what's actually there in terms of goals. So, is there a command which lists all available goals for e.g. a given prefix? ...

Maven doesn't recognize sibling modules when running mvn dependency:tree

I'm trying to set up a multi-module Maven project, and the inter-module dependencies are apparently not being set up correctly. I have: <modules> <module>commons</module> <module>storage</module> </modules> in the parent POM (which has a packaging-type pom) and then subdirectories commons/ and storage/ which define JAR poms with ...

What is the significance of the POM file that Maven places in a JAR file, is it used by anything?

When Maven builds a JAR file, it places the module's POM file inside (seemingly in the directory <groupid>/<artifactid>). When I build a JAR file from Ant to be deployed via the Maven Ant tasks, is the presence of this POM file (the one inside the JAR) important? It doesn't seem to be, but I just wanted to be sure that it is not being ...

start/stop tomcat using maven.

How can i start/stop remote tomcat using maven. I am using cargo plugin which helps me in deploying the application , but doesn't provides the functionality to start/stop the remote tomcat. ...

Child not finding parent pom in flat structured multi module maven build.

I'm setting up a multi module project with a flat structure, i.e. parent and child are in the same base directory. Parent is defined as <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&g...

maven snapshot repositories

My project depends on a 3rd party library that only has snapshots in its maven repository (no releases, which seems strange, but that's how it is). Every time I do a full build (and clean my local .m2 repository) maven will obviously go and grab the latest build. My repository proxies the one with the snapshots in it, is there anyway to...

Maven Assembly Problem

Hi, I have a maven multiple-module project, which is giving me headaches in the assembly:assembly phase. I have a module which has an assembly defined in it which works fine when I invoke mvn assembly:assembly using that pom. The problems start when I go up one level to the parent pom and invoke assembly:assembly ... everything goes f...

maven - is it a good / common practice to use it only for dependency mgmt and then let the ant do everything else..?

I am newbie with maven. Other than its use for managing dependencies, I am finding little use for it. It was getting so hard to write up a pom.xml, that I generated a ant build.xml from one of maven's tasks (which is a nice handy task...) I had to tweak the build.xml that was generated by maven. And now all my compiling, testing, et...

Getting Nexus to download dependencies from a repository with no .index file

I've just setup the latest version of Nexus for our company, and it's working great. We've added several 3rd party repositories, and one of them does not have an .index file present. So it appears that Nexus can't index it, nor can the local maven ask for deps in that repository. Definitely unfortunate. Is there any way around this a...

How do I get m2eclipse to recognize $M2_OPTS?

It appears m2eclipse is not recognizing my $M2_OPTS variable. I can run the same build outside of eclipse fine (with cranked up heapsize): [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total t...

Where can I find a complete Maven Cargo plugin example for EJB tests?

For tests of some small JBoss enterprise apps I would like to use JUnit, and the Maven Cargo plugin. (I know that there is also JSFUnit but first I would like to take a closer look at Cargo.) Is there a simple example available online which I could use as a reference for running a JUnit test which invokes a EJB operation using JBoss (4....

Eclipse + Tomcat = wrong docBase???

I am running Eclipse Galileo with Tomcat 6.0.18. Currently, I have a working application with the m2Eclipse plugin installed. It deploys to Tomcat and I am able to test my application. I am wanting to switch over to just using the Maven Eclipse plugin. The problem is that Tomcat is refusing to deploy my application. I have converted...