maven-2

Maven: Multiple class with the same path implemented in different jar

試著忘記壹切 提交于 2019-12-01 02:14:00
问题 I'm running into trouble with having multiple class with the same path (i.e. same name, same package!!!). For some reason, gwt-dev comes with its own version of org.apache.xerces.jaxp.DocumentBuilderFactoryImpl and javax.xml.parsers.DocumentBuilderFactory . At the same time, spring also depends on these classes but from different jar. I don't know what should be, but look like xalan & xml-api are the two dependencies that spring depends on (these dependency are optional) Funny thing is that

How to skip lifecycle phase in multi maven module

流过昼夜 提交于 2019-12-01 02:12:38
问题 I have a maven multi module project which call two sub modules. please note that this child module do not use the parent markup tag. Now I need to have the deploy phase executed only on one child module but not the other one. Could someone provide any advice on the best way of doing this ? Thanks 回答1: As mentioned in this FAQ for maven deploy plugin , as well as in this SO discussion, you should add the following in the pom of the module you do not want to deploy. <plugin> <artifactId>maven

Maven antrun with sequential ant-contrib fails to run

我的未来我决定 提交于 2019-12-01 02:03:32
问题 We have a special routine to explode files in a subfolder into extensions, which will be copied and jared into single extension files. For this special approach I wanted to use the maven-antrun-plugin , for the sequential iteration and jar packaging through the dirset, we need the library ant-contrib. The upcoming plugin configuration fails with an error. What did I misconfigured? Thank you. Plugin configuration <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun

Including non-Java sources in a Maven project

痴心易碎 提交于 2019-12-01 01:40:01
问题 I'm starting on a project that I expect will include a substantial amount of non-Java code (mostly shell and SQL scripts). I would still like to manage this project with Maven. What are the best practices wrt non-Java source code and Maven? Where should the source go? What happens to them during the different lifecycle phases? Any pointers or links to more information would be greatly appreciated. 回答1: You must not put the non-Java code into resources, if you don't want to include these files

Why maven ignores my JAVA_HOME?

百般思念 提交于 2019-12-01 00:49:10
This is what I'm getting when mvn is executed from CruiseControl: Unable to locate the Javac Compiler in: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/../lib/tools.jar Please ensure you are using JDK 1.4 or above and not a JRE (the com.sun.tools.javac.Main class is required). In most cases you can change the location of your Java installation by setting the JAVA_HOME environment variable. At the same time, starting it from command line gives correct result. Why mvn is going into this tools.jar ? Why it is ignoring my JAVA_HOME ? And how can I fix it? I don't know what are the values of

monitoring nexus repo

烂漫一生 提交于 2019-12-01 00:35:24
问题 Does anyone know of a nexus plugin or APIs that allows the monitoring of mvn artifacts deployments to a nexus repo? my issue is that developers are uploading all kind of jars to a nexus repo and i have no way of knowing who did what and why? How do i enforce a rule on them so that they have to type in a comment before uploading any jars to nexus? Is there a way of doing this in mvn/nexus??? Jenny 回答1: There are several RSS feeds for broadcasting notifications of events within Nexus. To

Java: How do I build standalone distributions of Maven-based projects?

馋奶兔 提交于 2019-12-01 00:32:11
问题 I often encounter distributions of Java applications or libraries which use Maven as their build tool. Some of them, sadly, don't provide standalone (or redistributable) jars. Is it possible to build Maven-based applications in such a way, that the build result contains all dependencies and can be redistributed to work out-of-the box? I tried to build Jackrabbit's OCM module. For some very "intelligent" reasons there is no downloadable standalone version. So I built Jackrabbit with Maven (the

Include Maven dependencies in the assembly war?

馋奶兔 提交于 2019-12-01 00:20:47
I am creating an assembly with packaging=war . I need to include few of the jars, which have been declared as project dependencies in pom.xml in my war ( web-inf/lib ) How can I do this? Edited on 15/10- My project creates few assemblies, one of which is supposed to give packaging of type-war. Some jar files, which are dependencies for the project(and have been declared in pom.xml)need be included in war under WEB-INF. How can I include them or how can i point out their paths to my local nexus repository path? Can you be more precise? By default, when you run the mvn clean install command on a

properties-maven-plugin: Error loading properties-file

血红的双手。 提交于 2019-12-01 00:11:16
问题 I want to extract all the properties from my pom.xml into a properties-file. These are the common properties like dependency-versions, plugin-versions and directories. I'm using the properties-maven-plugin, but its not working as i want it to. The essential part of my pom.xml: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>properties-maven-plugin</artifactId> <version>1.0-alpha-1</version> <executions> <execution> <phase>initialize</phase> <goals> <goal>read-project-properties<

What is the format of svn-settings.xml for use with Maven SCM plugin?

情到浓时终转凉″ 提交于 2019-12-01 00:05:57
I'm trying to externalize my username and password but it seems the format of svn-settings.xml is incorrect. I can't find any resources on the web except this post here and following that gives an error. In my pom.xml I got <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-scm-plugin</artifactId> <version>1.4</version> <executions> <execution> ... <configuration> <connectionUrl>scm:svn:http://my_hostname/im-tools-repos/trunk</connectionUrl> <checkoutDirectory>${project.build.directory}/checkout/im-tools</checkoutDirectory> </configuration> </execution> </executions> <