Why does maven need to generate a pom-transformed.xml ?
In a maven webapp project, I noticed that there is a file in the target directory called pom-transformed.xml. How does maven use this file ? ...
In a maven webapp project, I noticed that there is a file in the target directory called pom-transformed.xml. How does maven use this file ? ...
In pom.xml I have set o profiles like this: <profile> <id>profileId1</id> <build> <filters> <filter>src/main/filters/profileId1.properties</filter> </filters> // rest of the profile </profile> <profile> <id>profileId2</id> <build> <filters> <filter>src/main/filters/profileId2.prop...
Trying to get Maven, Java, and OS X to play nice together - something I've done multiple times without issue on Linux and Windows machines. I assumed all I needed to do was download Maven, setup my environment variables and I'd be good. So here's a snippet from my .bash_profile... export JAVA_HOME=/Library/Java/Home/ export M2_HOME=/u...
Even after wiping out my settings.xml, I still get this error when trying to use this snapshot dependency. Given the dependency: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>tomcat-maven-plugin</artifactId> <version>1.0-SNAPSHOT</version> <configuration> <path>/licensin...
Hi, I'd like to have a way in which 'mvn install' puts files in a repository folder under my source (checkout) root, while using 3rd party dependencies from ~/.m2/repository. So after 'mvn install', the layout is: /work/project/ repository com/example/foo-1.0.jar com/example/bar-1.0.jar foo src/main/java ...
Summary: I'm looking for a way to instruct maven to search for dependencies in target/classes instead of jar in the local repository Say I have 2 modules, A and B where A depends on B. Both are listed in a module S. Normally I need to run 'mvn install' in S. I'm looking for a way to run 'mvn compile' so that when A is compiled its class...
For some reason I cannot get Maven 2 Surefire plugin to execute JUnit 4 test class. public class SimpleTest { @org.junit.Test public void simple() { System.out.println("foo"); } } However if I change this class to be JUnit-3 like, such as public class SimpleTest extends junit.framework.TestCase { public void testBar() {...
I'm relatively new to the maven mantra, but I'm trying to build a command-line runnable jar with maven. I've setup my dependencies, but when I run mvn install and attempt to run the jar, two things happen. First, no main class is found, which is correctable. When I've corrected this, I get errors on run stating that classes cannot be fou...
When you run Maven 2 with the -X flag, and you watch as it configures plugins, you might see output like this: [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-clean-plugin:2.3:clean' --> [DEBUG] (f) directory = e:\projects\foobar\target [DEBUG] (f) excludeDefaultDirectories = false [DEBUG] (f) failOnError = true [DEBUG] ...
On maven deploy maven attempts to retrieve the previous metadata form the repository. If it is corrupt maven issues a warning, calls the build successful but doesn't upload my artifact. This was caused by corruption in my repository and I'd like to either avoid it in future or make it more obvious with a build failure. Can I alter my ...
I have a Maven project that derives the path to a native library using properties which can be set in local profiles. For example: <project> ... <build> ... <plugins> <plugin> <artifactId>maven-surefire-plugin</artifactId> <configuration> <environmentVariables> <LD_LIBRARY_PATH>${f...
I'm retrofitting bunch of existing Java projects with unified Maven build. Since each project is mature and has established Ant based build all I'm using maven-antrun-plugin to execute existing build.xml as follows: <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execut...
My Maven 2 project consists of several sub-modules. It s structured containing and EJB, WAR and Jar sub modules.. Now i want to instrument the packaged EAR that contains all submodules as mentioned. Example: Interface Maven Project consists of several modules: - InterfacePOM --> parent pom - InterfaceEAR --> EAR module which does not a...
I am using apt-maven-plugin to process some Beehive Netui annotations before building a war. The output of the apt processing is a _pageflow directory which contains struts config files (xml text) and the like. The problem is that it is being output in whatever directory I run maven from, not in the ${project.build.directory}/classes d...
I have lately become a big fan of Maven for controlling the build cycle for my application. However I've encountered some rough edges with Maven's dependency management. I'm wondering if these are limitations of the tool and paradigm, necessary evils of dependancy management, or if I"m just using the tool incorrectly. First is the ...
I have a project A which has a dependency X. Dependency X has an optional dependency Y which doens't get included in A by default. Is there a way to include Y in my POM without explicitly including it? In Ivy they have a way to essentailly say include all optional dependencies of X, does Maven have a way to do this? ...
Hi there, when i instrument my classes using Maven 2 using the command mvn cobertura:instrument The output (the instrumented classes) are put in \target\generated-classes. Is there a way to change the output location to \target\classes? I checked the instrumentation tasks of the cobertura-maven plugin but this does not give me a ...
Hello, I have a maven gwt project, and I'm using ClientBundle to package my image resources within the project. I would like to place the images in /src/main/resources as should be done in maven instead of src/main/java/com/mycompany/myproject/client as gwt wants. Is there any way I can achieve this? Thank you, Sammy ...
Hi. We are using maven to manage our idea projects but I'm having a problem excluding a directory from the idea project. Using idea, I would just go to Project Settings | Modules | Sources and select the folder I wanted to exclude and click on the "Excluded" button. When loading the project from the pom, target is excluded automatically...
I have a Maven POM file with a plugin that runs on the test phase. What command line arguments do I have to pass mvn in order to execute just that plugin rather than all of the plugins for that phase? I am also trying to execute a specific ant-run plugin, that looks like the following: <plugin> <groupId>org.apache.maven.p...