maven-plugin

Using Java 7 with official Google Appengine Maven plugin

你说的曾经没有我的故事 提交于 2019-12-10 19:12:52
问题 I'm having trouble using the official Maven Plugin and Java 7 with Google Appengine. Configuration My project configuration pom.xml is quite simple: In the properties section I configure: <gae.version>1.7.4</gae.version> And later on I use the plugin: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> <plugin> <groupId>com.google

maven-surefire-plugin ignores plugins order in pom.xml

≡放荡痞女 提交于 2019-12-10 18:54:43
问题 I have multimodule maven project. This project contains self written maven plugin and test project for this plugin. I want to run my plugin in test phase before maven-surefire-plugin I put maven-surefire-plugin after my plugin in pom.xml <build> <plugins> <plugin> <groupId>com.my.group</groupId> <artifactId>validator-maven-plugin</artifactId> <version>${project.version}</version> <executions> <execution> <phase>test</phase> <goals> <goal>validate</goal> </goals> </execution> </executions> <

Is there a maven plugin that can diff files and output the result to file?

天涯浪子 提交于 2019-12-10 18:15:08
问题 I've been working on integration-tests for a Java web service. The integration test now sends SOAP-requests to the server which are asserted via the SoapUI-plugin and for each of the SOAP-requests an xml file is produced and saved (a part of the integration-test phase). Is there a plugin that allows me to diff the xml files that has been output and saved against a similar set of xml files that were produced in an earlier run? The idea is to diff xml files output from the previous release

how to use properly mvn release:prepare

偶尔善良 提交于 2019-12-10 18:13:21
问题 I try this command (with dryrun to test) on my maven project : mvn release:clean release:prepare -DdryRun=true -DgenerateBackupPoms=false -Dtag=solocal-refentreprive-2.1-RC02 -DreleaseVersion=2.1-RC02 -DdevelopmentVersion=2.1-SNAPSHOT at the end, the build is success, but i have (in my commit) many pom.next / pom.tag and pom.backUp.... i don't when then (-DgenerateBackupPoms=false), if i use without dryrun i dont want push this pom... Thx, 回答1: Assuming you accept the defaults release:prepare

Maven Get Specific Classes

瘦欲@ 提交于 2019-12-10 17:26:59
问题 Is there a way that I can get maven to only include specific .class files when importing dependencies into uber jar (shade). I'm looking for a way to get files that contain "Client" in their name to be pulled out of the dependency jars and added to the final jar. Any help would be wonderful. 回答1: You should be able to use the maven-dependency-plugin like this: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.10<

Maven dependency versioning and java.lang.NoClassDefFoundError

喜你入骨 提交于 2019-12-10 16:28:07
问题 I have a Java project X has dependency (in pom file) on project Y. I was modifying in Y and build X,Y with Maven tool then runing X (on JBoss) without problems. When I added new class in Y then building with Maven (without problems), then running X, it throws java.lang.NoClassDefFoundError for the new class. I think its a Maven dependency versioning or something like that ... I searched mainly at Google but nothing has effect... How to resolve this problem?? 回答1: Moro, you wrote in a comment

Enable maven3 extension only on specified profile(s)

こ雲淡風輕ζ 提交于 2019-12-10 15:26:05
问题 I have an extension I use in my Maven 3 build that outputs build information for me. It's a bit verbose so I would like to run it only in some build profiles. But <extensions> are only allowed in the main <build> and not in the profiles. So my question is two fold. First, is there already a way to limit the extension to run only in specific profile(s) with something I can do in the pom.xml ? Second, if not, then how should I implement this? My initial thought was to call mavenSession

Share data between Mojo through Maven plugin execution

北慕城南 提交于 2019-12-10 14:54:56
问题 I am working on a Maven plugin, composed of 3 mojos inheriting AbstractMojo . Long story short, these 3 mojos are used to : compile some groovy scripts generate SQL scripts with data extracted from compilation load these scripts to a database Previously, my 2nd mojo inherited the 1st, and the 3rd inherited the 2nd, and they all called super.execute() in their execute() method, so that they could cascade from each other. I am rewriting the plugin in order to make it cleaner and better designed

maven: How to load tools.jar/classes.jar in an OS independent way?

≯℡__Kan透↙ 提交于 2019-12-10 11:38:02
问题 I am using a maven plugin that requires a class that is contained in the jdk's (windows) tools.jar (mac it's in classes.jar). I add this as an explicit dependency of the plugin as follows: <dependencies> <dependency> <groupId>sun.jdk</groupId> <artifactId>classes</artifactId> <version>1.6.0</version> <scope>system</scope> <systemPath>${java.home}/../Classes/classes.jar</systemPath> </dependency> </dependencies> This works if I'm using OS X. However, it does not work if I'm developing on a

updating jsp script tag during maven build phase

心不动则不痛 提交于 2019-12-10 11:24:45
问题 I want to update content inside all script tags in jsp files present under src/main/webapp/jsp. How to do this during maven build phase? I am using java+spring+maven stack. Ok here is example of what I want to achieve: Source code: <%@ page contentType="text/html; charset=utf-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@ taglib prefix="s" uri="/struts-tags" %> <script type="text/javascript" src="js/core/validator.js"></script>