maven-2

Maven2 life cycle help

I’ve built a custom Maven2 plug-in using Ant. I would like to call another maven plug-in in particular the Cargo Maven2 plug-in immediately after the custom Ant plug-in successfully completes. However, I do not want to attach the Cargo plug-in to another goal or phase. Is there a way to have them run consecutively without having to write...

Insert a dependent jar into an installer jar

I have a multi-module maven project with an installer sub-project. The installer will be distributed as an executable JAR. It will setup the DB and extract the WAR file to the app server. I would like to use maven to assemble this jar like so: /META-INF/MANIFEST.MF /com/example/installer/Installer.class /com/example/installer/......

WSDL2Code (Maven) auto-generates corrupt classes (packages)

Hello, I am currently in the process of replacing the IBM WebService framework with Axis2. When generating the code from the WSDL file, I use the Maven plugin WSDL2Code. However, the code created is always wrong. Or rather, the packagenames are always wrong, which in turn makes every method called uncallable (creating even more errors, ...

How can maven be used in a continuous integration situation to install versioned artifacts in the repository?

We are in the process of converting our main build process from ant to maven. We use TeamCity for our Continuous Integration server (CI). We'd like to use the CI server to kick off (nightly) builds whose version contain a build number, as in 1.0.0.build#. These builds would be installed in our local maven repository to be used by other ...

Building a scala app with maven (that has java source mixed in)

I have an application where I would like to have mixed Java and Scala source (actually its migrating a java app to scala - but a bit at a time). I can make this work in IDEs just fine, very nice. But I am not sure how to do this with maven - scalac can compile java and scala intertwined, but how to I set up maven for the module? Also...

How to resove this error "An unknown item is declared as the root of your MXML document. Switch to source mode to correct it." ?

I have only this in my mxml source code: <?xml version="1.0" encoding="utf-8"?> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:comp="components.*" width="770" height="330"> <mx:Label x="185.5" y="150" text="Placeholder for Future UI." fontSize="30" color="#93A8AD"/> </mx:Canvas> And when I try to use the ...

Attaching source to a system scoped dependency

I have a dependency which is scoped as "system". I'd like to know if there's a way to define the attached source and javadoc for the dependency. This seems like something that should've been taken care of, but I can't seem to fine any documentation on it or why it was neglected. I am specifically looking for the configuration solution...

How to get Maven to run war:exploded but not war:war

I have a Maven pom that uses <packaging>war</packaging>. But actually, I don't want build the war-file, I just want all the dependent jars collected and a full deployment directory created. So I'm running the war:exploded goal to generate the deploy directory: <plugin> <groupId>org.apache.maven.plugins</groupId> ...

Available Maven Profiles

Is there an easy way to figure out, preferably from the command line, what profiles are available for a particular project. I've got a big, multi-module project I'm trying to figure out. ...

Test class extending test class in dependency module

I've got a test class in a module that extends another test class in one of its dependency modules. How can I import the dependency's test code into the test scope of the dependent module? To illiterate, I've got two modules, "module-one" being a dependency of "module-two". SubTestCase is a subclass of TestCase. module-one \...

Setting up a Maven repository using SourceForge's file servers

Is it possible to host a Maven repository that serves the artifacts (at least the jar files) from SourceForge's file release system (since they are already there and SF provides download statistics and such)? All the repositories I have seen use the same directory layout, but is that a must? Download URLs would have to look more like h...

Can I add jars to maven 2 build classpath without installing them?

Maven2 is driving me crazy during the experimentation/quick and dirty mock-up phase of development. I have a pom.xml file that defines the dependencies for the web-app framework I want to use, and I can quickly generate starter projects from that file. However, sometimes I want to link to a 3rd party library that doesn't already have...

Should we use Nexus or Artifactory for a Maven Repo?

We are using Maven for a large build process (> 100 modules). We have been storing our external dependencies in source control, and using that to update a local repo. However, we are ready to graduate to a local repo that can cache central so that we don't have to proactively download all 3rd parties (but we can still have a local repo ...

How to create a distribution minus some packages in maven ?

I have a maven project with the following packages (for illustration only): Root: src/main/java /com/foo /com/foo/api /com/foo/impl Now I want to create a jar which includes only code in /com/foo/api and /com/foo/impl. How does one hack pom.xml to do this ? Thanks all. ...

mvn copy war to webapps

Is there anything I can add to pom.xml that will copy the generated war file from the target directory to my webapps directory? ...

Why do you subdivide into maven-modules for in-house projects ?

We have this constant discussion in our project as to the granularity of our maven modules. We have come to agree that there may be differences in the needs of a framework (like spring) and an in-house application that is always deployed monolithically. We also agree that it's fairly sensible to hide implementation details of adapters t...

Simple (standalone) Java SOAP web service client from WSDL using Maven

I'm looking to generate a simple standalone Java client which will make calls to a SOAP web service, given a wsdl. When I say simple and standalone I mean that once I'm done I want to be able to do something like import my.generated.nonsense; public static void main(String[] args) { Client client = new Client(); client.getSome...

With multi-module Maven projects, is it possible to make my root (pom-packaged) project available in Eclipse?

We have a fairly large group of Maven2 projects, with a root POM file listing 10+ modules and a lot of properties used by the modules (dependency version numbers, plugin configuration, common dependencies, etc). Some of the modules are, like the root project, parents to other sets of modules. To clarify, the root project and said paren...

Maven : OSGI, bundles and multi-modules projects

Hi all, I'm currently developing an OSGi based application (using Equinox) by trying to mavenize a web tutorial I've found on OSGi+Equinox. In this project, there are bundles depending on other bundles (quote-service depends on quote). The compile phase does succeed, but the package phase does not. Maven complains the following : [INFO...

maven-camel build problem

I have a simple application using netbeans for developing and maven for building et all. My application uses camel , spring XML configured. I wanted to build an executable jar with dependencies so i am using the maven-assembly plugin with 'jar-with-deps' descriptor. The jar is built ok but I think that since all the dependencies get unw...