maven-2

Setting the generated source directory for annotation processors in Maven

若如初见. 提交于 2019-12-09 06:09:47
问题 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 ${project.build.directory}/target/generated-sources/annotation-processing</compilerArgument> </configuration> </plugin> </plugins> But javac fails with [INFO] Compilation failure

how to prevent maven from checking foreign repositories?

▼魔方 西西 提交于 2019-12-09 06:05:52
问题 When I build using maven I see it checking all sort of foreign repositories for artifacts which only my local build should produce. How can I tell it that the com.myorg group can only be found in the local repository? Basically I want to do what m2eclipse does with workspace resolution but on the command line. [INFO] snapshot com.myorg:core:0.0.1-SNAPSHOT: checking for updates from sun-jms [INFO] snapshot com.myorg:core:0.0.1-SNAPSHOT: checking for updates from hibernate [INFO] snapshot com

building cocoa project with maven

元气小坏坏 提交于 2019-12-09 05:55:03
问题 i have a cocoa project and i'd like to build it with maven. is there any maven plugin for building objective-c code? 回答1: I have used the exec plugin to run command line cocoa to good affect. <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1</version> <executions> <execution> <phase>${cocoa.phase}</phase> <goals> <goal>exec</goal> </goals> </execution> </executions> <configuration> <executable>xcodebuild</executable> <workingDirectory>$

Example of a multi-module web application with the rpm-maven-plugin?

谁说我不能喝 提交于 2019-12-09 05:35:01
问题 Does anyone know of any web applications that are built with Maven to an RPM? The RPM Maven Plugin provides the functionality to build to an RPM, but it's documentation is lacking. Specifically, I'm looking for an example that would include multiple modules, i.e. Chapter 8. A Multi-module Project, from the "Maven by Example" series. An example with only a single module would be: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi

Create a GWT Maven Project

孤人 提交于 2019-12-09 05:08:03
问题 I'm trying to create a new project with Eclipse in order to create GWT application under maven 2 system. I have create the project with the follow mvn command mvn archetype:generate -DarchetypeRepository=repo1.maven.org -DarchetypeGroupId=org.codehaus.mojo -DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.3.0 I have installed the follow eclipse plugins: * m2eclipse * egit * gwt plugin Here my POM file: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org

Is there a way to make Maven download snapshot versions automatically?

我们两清 提交于 2019-12-09 04:41:15
问题 So I have a project that depends on a snapshot version of another project. The dependency is: <dependency> <groupId>org.oop</groupId> <artifactId>oop</artifactId> <version>0.9.9-SNAPSHOT</version> </dependency> For the oop project, I did do a 'mvn clean deploy', so the snapshot version should be somewhere in the maven central repository. But when I do a mvn clean install, the snapshot dependency above cannot be resolved and I get this: Missing: 1) org.oop:oop:jar:0.9.9-SNAPSHOT Try

How to programmatically call a Maven-task

六眼飞鱼酱① 提交于 2019-12-09 04:38:54
问题 I'm using Maven in the context of another build-tool (leiningen for Clojure, but this should not matter), and I would like to know how I would call a plugin like dependency:build-classpath programmatically (i.e. via the Maven-API, not via the mvn -command). 回答1: See how org.apache.maven.plugin.testing.AbstractMojoTestCase from maven-plugin-testing-harness is implemented. Here's a code snippet from some of my tests which may be helpful. public abstract class JAXBGenerateTest extends

run maven exec-maven-plugin as last step

两盒软妹~` 提交于 2019-12-09 02:51:39
问题 I want to execute a command line script with exec-maven-plugin after "mvn test" How do I set this up under pom.xml? 回答1: You can just take the example from the project website and have to add a phase to the execution. I've just tested with this pom below and it works fine. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0

How to handle sub projects dependencies in Maven

情到浓时终转凉″ 提交于 2019-12-08 19:46:17
问题 My project is made of 5 sub projects. One is a War, and the other 4 are jars. Basically the war project needs all 4 jar projects, and their dependencies. I can strip down the dependencies to have something like war->A->B->C->D. Every sub project add their share of external dependencies (spring, struts, hibernate) so that in the end the war gets everything needed to run. This looks pretty well organised and square, but then I ask myself if this is very practical to make changes. Imagine I have

Maven 2 checkstyle plugin version 2.5 - Problem with configLocation

你说的曾经没有我的故事 提交于 2019-12-08 18:49:12
问题 I am using checkstyle plugin in maven 2. I now want to switch my config file, from the default one to a) an online file, or b) a local file. I tried the following two things, which both didnt work. Any suggestions? A) Local file, which is directly in my project folder next to the pom.xml <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <configuration> <configLocation>checkstyle.xml</configLocation> </configuration> </plugin> B) Remote file,