maven-2

Compiling Test classes:not working

Hi I wanted to package the class files under target/test-classes(ie src/test/java) as one assembly. When I am running the maven command,i am getting the error: Reason: Failed to create assembly: Error creating assembly archive : You must set at least one file. My assembly desciptor is : <assembly> <id>stress-client</id> <formats> <...

How to get access to Maven's dependency hierarchy within a plugin.

In my plugin I need to process the dependency hierarchy and get information (groupId, artifactId, version etc) about each dependency and if it was excluded. What is the best way to do this? ...

Convert Maven Site Software Documentation to PDF

I am currently working on a project written in Java and I am using Maven and the maven-site-plugin to generate a website containing all the relevant JavaDoc, reports, etc. I am needing at the same time to be able to convert the same documentation into a readable, book-like format. Are there any scripts or tools out there designed to ta...

Credentials ignored with maven scmchangelog-plugin

When I configure the scmchangelog-plugin, as written in the examples/tutorial, and run the site-generation, the username and password I have set are ignored. The documentation says that username and password which should be used to access the SCM can be configured in the plugin-configuration. This looks like this: <reporting> <plugins...

Maven circular dependency?

If I add this to a POM will it create a circular dependency? I've tried it and that what seems to happen. There is something I'm not understanding here. Isn't the war file created at the end of the build. <dependency> <groupId>${project.groupId}</groupId> <artifactId>mywebapp</artifactId> <version>${project.version}</version> ...

Getting Maven exec:java plugin to use project module dependencies

Hi, I'm using Maven's exec:java to run jline for one of my projects (current POM attached below). The project used to be a single component, so all dependencies were in the same POM as the exec:java plugin definition. This worked great and all the dependencies were picked up and put on the classpath when I ran 'mvn exec:java'. Howeve...

Help with Selenium Maven Cargo

I am trying to use cargo to deploy and start my container (which works fine), and then use selenium to execute some UI tests. Whenever I try to run (mvn clean integration-test), I get to the point where it says Launching Selenium Server Waiting for Selenium Server... [INFO]Redirecting output to [INFO]User extensions But then my integ...

install war file at server deploy directory

Hello all, I'm want to have the war file deployed in the server deploy directory (or any directory of my choice) along with the one deployed in the repository. Also, can I control the name of the war file deployed like, I don't want the war file to be projectname-1.0.war I just want the name of the war file be projectname.war. Thanks, ...

Maven creating flat zip assembly

To Maven gurus out there: I'm trying to package non-java project artifacts (.NET) into a single zip file. I'm having 2 problems: If I change packaging in my POM to zip <packaging>zip</packaging>, I get this error message: [INFO] Cannot find lifecycle mapping for packaging: 'zip'. Component descriptor cannot be found in the component rep...

Maven - skip parent project build

I know it's mauvais ton to ask twice in a single day but here's another Maven puzzler: I have a parent POM which defines 5 modules (5 subprojects). Since each module is executed in exactly the same way I pull <profile><build> section into the parent POM to get rid of the duplicate code. Now - if I execute build individually from each mo...

Different JUnit-result starting from Eclipse vs. mvn test

Hi all, I've got a JUnit-test which is successfull when starting with mvn test but fails when starting from Eclipse (see stack trace below). What I'm trying to do is inserting new elements into the database with entityManager.persist() and entityManager.flush() (when calling flush, I get the error). My config.properties looks the follo...

Trigger a maven install command from another maven install command

Hi, Is there a way to trigger a maven install command from another maven install command? In other words, I would like to be able to execute a maven install command on a maven project (in eclipse) and I want that this will automatically cause an install command on another maven project. Is that possible? ...

Maven - activate child profile based on property

Scenario: Given Parent POM which defines a profile and a child (as module) Child project(s) that will be using the profile by referring to the parent POM. The intent is to skip profile execution in the parent and execute it in the child only Profile has activation section <activation><property><name>foo</name></property><activation...

Small java project growing (maven and junit)

I'm working on a growing java project and I'm probably going to cooperate with somebody else to improve some features. I'd like to use some tools to improve the quality of my work keeping in mind that: I don't have too much time to spend on this project it's a small project but it's really important for me I don't want to buy software...

How to patch a subcomponent in a maven-managed framework?

I need to patch the mule-transport-jms subcomponent of mule for this bug (http://www.mulesoft.org/jira/browse/MULE-3983). The "fix" is straightforward but what is vexing me is deploying the patched component to my local maven repo (managed by Nexus) and having it continue to play nicely with all the other components of mule. What I w...

Maven - how can I add an arbitrary classpath entry to a jar?

I have an unusual situation where I need to add an arbitrary classpath entry (that points to a jar file) into the manifest of an executable jar. (This is for a Swing desktop application.) The maven-jar-plugin generates the "Class-Path" entry for the jar manifest using the maven dependencies, and there doesn't appear to be any way of add...

How do I tell JBehave META-INF to configure it for JPA using the Maven plugin?

I'm trying to get JBehave, JPA and Maven to play nicely together. I can run the test via eclipse and everything works just fine. I run it via maven, and JPA can't find the persistence.xml file. However a unit test I have finds the persistence.xml file just fine, but JBehave is not involved. Clearly I need to tell JBehave to look in src...

Is there a simple way to remove unused dependencies from a maven pom.xml?

I have a large Maven project with numerous modules and pom.xmls. and the project has changed that much that I'm sure the pom's must have some unnecessary dependencies in them. does anyone know if there is a command you can run to remove any pointless dependencies from a pom? ...

Issue with assembly creation

Hi In my project, I m creating many assemblies(4-5) and they are output to target.1/2 of these assemblies are not taking their final names(or assembly id) , but as per the format artifactID-version.jar..This is very confusing Why is this so? Extracts from my pom.xml -- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns...

using quartz in a web app with spring

Hello good fellas! I've created a small console application to see how quartz work and it was easy to create an applicationcontext object inside the main method to get the cron run. OK now I'm in a real project managed by maven and which is using cron jobs defined in some of the modules. Each of the module has his own spring config file...