maven-2

Maven test failure xml FileNotFoundException

My Maven build is failing on Hudson with a FileNotFoundException, I do not get the same failure through NetBeans. The FileNotFoundException is for some xml files in the same packages as my test classes themselves. It would appear these are not getting copied as part of the build in the same way the class files are. Do I have to add somet...

Maven Embedder - getting a list of profiles

Hi all, How do I get a list of all the profiles for a project in maven inside of a maven plugin? Would it be: MavenEmbedder.readModel(new File("path to pom.xml")).getProfiles(); Walter ...

how to use BaseTokenStreamTestCase classe with maven

I want to unit test my lucene filter (which extends TokenFilter). I use maven. The "BaseTokenStreamTestCase" class looks perfect but I have no idea in which maven artifactId I can find it ? Any idea ? ...

How to conditionalize GUI tests using Netbeans/Maven vs maven on command line invocation

I'd like to have a single project pom but have my GUI tests always run when I'm invoking JUnit on Netbeans, but have them conditional (on an environment variable?) when building on the command line (usually for production build - on a headless machine, but sometimes just for build speed). I don't mind instrumenting my JUnit tests for th...

Maven 2 build Java web services? Help

Has anyone built Java web services using Maven-2. I've read about the jax-ws plugin, but I haven't found any clear documentation or examples on how to use it. I tried building a few following instructions of some bloggers, but most instructions seem old or incomplete. Does anyone have any advice on using Maven to build Java web servic...

Can we start the maven build from the point where it failed

Suppose, I am doing a full build on my large project which has 7 modules and on the 6th module, the build failed because a test failed. Is there any way by which I can start the build from the point it failed? ...

springTestContextBeforeTestMethod failed in Maven spring-test

I try to setup a project with spring-test using TestNg in Maven. The code is like: @ContextConfiguration(locations={"test-context.xml"}) public class AppTest extends AbstractTestNGSpringContextTests { @Test public void testApp() { assert true; } } A test-context.xml simply defined a bean: <bean id="app" class="or...

hunting maven dependencies

I want to start using maven in code I distribute but I can't find an efficient way to work with dependencies. Every new dependency takes me far too long to add. As a simple example, I need to add Tomcat for compilation. Do I really have to manually trawl the repo in my browser to find the group-id, artifact-id and version number? In ev...

Maven does not resolve a local Grails plug-in

My goal is to take a Grails web application and build it into a Web ARchive (WAR file) using Maven, and the key is that it must populate the "plugins" folder without live access to the internet. An "out of the box" Grails webapp will already have the plugins folder populated with JAR files, but the maven build script should take care of...

How can I export a FULL war file from eclipse that bundles maven dependencies ?

I have an eclipse WTP app using the M2 plugin. I exported it and it runs fine on my machine, but I believe this is because it references my local maven repo. How can I get it to bundle the jars from the maven repo into the war file ? Is there a simple way to do this in eclipse with the M2 plugin >? Im afraid that if I muck with the ...

How to get an Artifact download URL via Maven API?

I'm trying to create a maven plugin to generate a file with the URL to all the dependencies in a project. I have been able to get the dependencies and their artifact, but I'm having trouble getting the download URL. Using ArtifactResolver and ArtifactMetadataSource I get some of the artifact information. However I fail to get all the in...

Spring 3, Jersey (JSR-311) and Maven dependencies

Hola guys! im currently struggling to integrate a REST Service based on Jersey and Spring. I'm using Spring 3.0.2-RELEASE and jersey-spring 1.2. But jersey-spring adds a dependency to Spring 2.5.6 to my project which of cause conflicts with the 3.0.2-RELEASE to give me thefollwing error: 11:58:25,409 ERROR org.springframework.web.cont...

Custom assembly descriptor to create a jar with dependencies

I would like to generate a .jar application from a project made in Maven. I am working in Eclipse, and I made: run as/Maven assembly:assembly This is the error message: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-4:assembly (default-cli) on project FeelIndexer: Error reading assemblies: No as...

Make Eclipse use src/test/resources instead of src/main/resources

Hi! I'm writing a little Maven application in Eclipse. I store some property files and my application context in the directory src/main/resources. I now want to make Eclipse use properties in the directory src/test/resources. So when I run and debug the program in Eclipse, these test properties should be used. Do you know how I could ...

maven plugin site

Hi, It appears that that you can generate a standard documentation website (like this one) from a Maven plugin project. I tried executing mvn site in a plugin project but it doesn't generate the expected documentation (a page that shows the Mojo goals, parameters, etc). Is there some other goal that must be invoked to generate these web...

Unpacking an assembly inside of a war

Hi all, I have another project which contains static content (css, images, JS, etc.), and I need that to be copied to the web root directory of jetty for testing. In that project, I output a zip file packaging up all of the images, CSS, etc. I have several of those virtualhost projects for different clients and my question is, how do ...

Source folders for a maven project in eclipse

Hello all, I have a that uses maven... and I want to put it in my working environment with eclipse(Galileo)... the project is in a svn server, and I can create check out the project and everything looks OK. I even can run the unit test and everything is working there. However, now that everything is there I wanted to work in the code, ...

Maven. Transitive dependencies.

This is a novice question. My project P depends on dependency A which depends on dependency B. My project's pom.xml file includes A as a dependency, and its jar is included in P's classpath. However, there is a NoClassDefFoundError thrown at runtime of P, which stems from missing B jars. Shouldn't Maven have downloaded these dependen...

How do I make the manifest available during a Maven/Surefire unittest run "mvn test" ?

How do I make the manifest available during a Maven/Surefire unittest run "mvn test" ? I have an open-source project that I am converting from Ant to Maven, including its unit tests. Here's the project source repository with the Maven project: http://github.com/znerd/logdoc My question pertains to the primary module, called "base". Thi...

How might maven's buildNumber metadata become inconsistent across multiple build agents?

We recently added a second build machine to our build environment and began experiencing very odd occasional build failures. I have two separate Maven build machines, A and B, each running Maven 2.2.1 and communicating to a shared Nexus 1.5.0 repository manager. My problem is that builds on B will occasionally fail because it refuses to...