maven-2

Where do I put custom assembly descriptors for the Maven Assembly plugin?

Either I'm missing something obvious, or both the Maven book and the Maven Assembly Plugin's homepage, while describing how to write custom assembly descriptors, don't say anything about where that file has to go. Is it part of my project? Does it go into some central Maven configuration directory? Do I have to specify its location somew...

Why does a dependency with scope "provided" hide transitive dependencies in Maven?

I have three modules in my Maven project (this is slightly simplified): model contains JPA annotated entity classes persistence instantiates an EntityManager and calls methods on it application creates instances of the classes in model, sets some values and passes them to persistence model and persistence obviously depend on javax.pe...

Adding dynamic links to JavaDoc within Maven Site generated html

I am wondering if there is a way through the maven site plugin to have it automatically create a link to some JavaDoc structure (like a class) within the html it generates. As an example of what I mean, Doxygen provides a way to do this through using the doxy protocol. You can create an anchor like such: <a href="doxy://class/ExampleC...

Maven WAR plugin not reading configuration when running in <execution> tag

I'm trying to get Maven to perform several executions with the WAR plugin. It works fine as long as it's defined in the following way: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>1.0</version> <configuration> (...) </configuration> But not in the followi...

How can the output path of the generated JAR be set in a Maven build profile?

I have a Maven POM set up with multiple build profiles. For one profile, I want to copy, move, or build the JAR file that is generated in the target folder to another folder. How can this be achieved? ...

Integrate Protocol Buffers into Maven2 build

I'm experimenting with Protocol Buffers in an existing, fairly vanilla Maven 2 project. Currently, I invoke a shell script every time I need to update my generated sources. This is obviously a hassle, as I would like the sources to be generated automatically before each build. Hopefully without resorting to shameful hackery. So, my ques...

Maven Antrun and Dependencies

(See edits below.) The reason I can't just use the classpath, is because I need to manage some non-java libraries, and I'm compiling a non-java project. I'm trying to use maven dependencies in an antrun call, following the documentation on the maven site: http://maven.apache.org/plugins/maven-antrun-plugin/examples/classpaths.html At...

Migrating to maven from an unusual svn directory structure?

Contrary to a 'normal' svn directory structure I'm using the following structure: trunk/ project1/ project2/ project3/ ... branches/ project1-branch/ project1/ project2/ ... project2-branch/ project1/ project2/ ... tags/ project1/ V1 V2 ... As you see I don't have separate triples (tr...

New Maven snapshots for already released artifacts

Is there a good reason to continue deploying newer snapshots, if there's already a released artifact of the same version? Concretely: There's already xyz-1.0 There's projects continuing to have xyz-1.0-SNAPSHOT dependencies. It appears wrong to me, but maybe there is some reason behind this? ...

How do I deploy to nexus (hosted by secureci)?

Like recommended in a previous SO-Answer I'm running a VmWare image of secureci as a preconfigured development infrastructure containing maven, nexus, hudson, svn. Now I want to configure maven on my Windows XP machine to deploy its artifacts to nexus. But when I configure my pom.xml like this (taken from Deploying Artifacts to Nexus): ...

Call hierarchy and/or data flow tool for Scala.

Hi. Is there an IDE/Tool/script/something that can show call hierarchy and/or data flow in Scala+Java programs (preferably from source code). Or (as a backup plan) is there a tool that can show it using Java bytecode? (And preferably give the option to go to source code, if provided by user). All that, preferably integrated into an IDE a...

Setting the generated source directory for annotation processors in Maven

I'm trying to move a build which generates sources using an annotation processor to Maven. I've tried configuring the maven-compiler-plugin as follows: <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <fork>true</fork> <compilerArgument>-s $...

Clover+Maven+Eclipse

Hello, I am using eclipse + maven2 to build my applications. I need to start working with clover. My question is therefore: from your experience, what is the best way to combine these 3. I mean, I know there is a clover plugin for eclipse, there is also a clover plugin for maven2 and of course there is maven plugin for eclipse (m2eclip...

maven dependency problem compilation error

i have a wired problem. some class file cant able to read during maven build i have a project A and project B where project B depends on the project A target jar file. during the project B compilation it is not able to read lib in the {roject A jar file though i part directed to it is perfect. i have checked and verified the maven script...

maven compilation failure

I have a weird problem. Some class file couldn't be read during maven build. I have a project A and project B where project B depends on the project A target JAR file. During the project B compilation it is not able to read lib in the project A JAR file though the part directed to it is perfect. I have checked and verified the maven scri...

maven dependency unable to read lib from the dependency jar

I have projects A & B where Project B is dependent on A. When I run mvn clean install in the command prompt, Project A compiles well and it produces the dependent jar for Project B in the maven local repository. During the compilation of Project B, I am getting a compilation error for a dependency listed in project B's POM. I have check...

Maven repository location woes

I'm reconfiguring a build server that someone else setup a long time ago to use a new Maven repository. However, the old repository is still being referenced and I can't figure out where that reference is coming from. M2_HOME=/usr/share/maven2 /etc/maven2/m2.conf (usr/share/maven2/conf/m2.conf links here) main is org.apache.maven.cli...

How can I combine WAR packaging and OSGi bundle creation in Maven?

I want to deploy one of my OSGi bundles with a war package structure so it is recognized as a web application by Struts. I use Maven, so I get WAR packaging built-in and I have the Maven bundle-plugin to create the OSGi compatible manifest for me. The problem is, the two don't work together, so the bundle plugin is not aware that the cl...

Is it possible to ignore certain unit tests?

Hi, I'm currently working on a project which uses JUnit4 extensively throughout all the modules. We're using Maven2 to build the project and Hudson for continuous integration. The project is built and run under Java 1.5. We've recently added quite a large raft of unit tests which are needed at times, but don't want to be run during the ...

How do I deploy a webapp into Apache Felix?

What bundles do I need to install? At least, this would have to be a servlet container / web server such as Jetty, but will the basic org.apache.felix.http.jetty bundle do, or is there anything else needed to discover the web.xml in other bundles? Do I put the webapp in a standard WAR, add OSGi headers and am done? Or are there any weba...