maven-3

Exclude jar from war Maven 3

梦想的初衷 提交于 2019-12-11 00:41:44
问题 We need to exclude few jars from war ...we are using maven 3 in weblogic. I tried <packagesourceexludes>...and <warsournceexludes..> but didn't work. Any other way to do this. Thanks Vijay 回答1: <dependency> <groupId>xerces</groupId> <artifactId>xerces</artifactId> <version>2.4.0</version> <scope>provided</scope> </dependency> So doesn't need to exclude from every dependency.. This solved my problem...Thanks for all your answer... 回答2: You need to use <packagingExcludes> as documented here.

Maven pom inheritance ands overriding in parent child module

守給你的承諾、 提交于 2019-12-10 22:43:09
问题 I was curious how to decide whether our element in child pom will override the parent pom detail or just get added along with the parent pom inherited elements in child pom. Let us take an example to understand : For example, each dependency is uniquely identified by maven coordinates. In child pom, if a dependency has maven coordinate different from dependencies in parent pom, then no overriding happens and parent dependencies are added into child pom too. Here we had a criteria of unique

Maven archetype generate with custom properties

﹥>﹥吖頭↗ 提交于 2019-12-10 22:39:36
问题 Newbie question here, I have a maven archetype that I'm creating from a java project using a .properties file. I want to be able to generate dynamic values for variables within the archetype and I'm not sure how to do that. Currently I'm following this maven guide and but I can't seem to reproduce what they've done. Specifically at the bottom of the guide where they replace the String value with a new value. Here's the properties file I'm using: archetype.groupId=com.mycompany archetype

Dependency convergence error

落花浮王杯 提交于 2019-12-10 22:02:21
问题 After updating Firefox I changed versions of libraries to higher ones. Following errors appeard: [ERROR] Dependency convergence error for commons-collections:commons-collections:3.2.2 paths to dependency are: [ERROR] +-net:serenity.pom.gradle:0.0.1-SNAPSHOT [ERROR] +-net.serenity-bdd:serenity-core:1.1.29-rc.3 [ERROR] +-org.seleniumhq.selenium:htmlunit-driver:2.20 [ERROR] +-commons-collections:commons-collections:3.2.2 [ERROR] and [ERROR] +-net:serenity.pom.gradle:0.0.1-SNAPSHOT [ERROR] +-net

Sharing Maven local repository

戏子无情 提交于 2019-12-10 21:37:03
问题 Maven stores all jars under local repository ~/.m2/repository/ . It occupies a lot of space when there are many users. So, Is it possible to share this local repository by multiple users, perhaps under a different directory structure? 回答1: Of course you can share the local repository. You just need a folder that all of you have write permission. e.g.: /local/.m2/repository . And to share this folder, you all can change the settings.xml with new local repository as below: <localRepository>

Download parent pom from remote repository

北城余情 提交于 2019-12-10 21:25:10
问题 Is it possible (and how) to download the parent pom from a remote repository? Why? I have a project setup with many modules. The parent pom specifies dependencies to third-party jars. If one of the modules needs a new feature in a later version of one of the jars, I'd like to: update the parent pom with reference to the new jar update the single module pom referring to the new parent pom. However, this breaks the build for all other modules depending on the older parent pom. I get the error

Pom.xml project build error

不打扰是莪最后的温柔 提交于 2019-12-10 20:32:15
问题 I have imported maven projects in my eclipse, but I am getting the following error in pom.xml- Project build error: 'dependencyManagement.dependencies.dependency.systemPath' for jdk.tools:jdk.tools:jar must specify an absolute path but is ${JAVA_HOME}/lib/tools.jar I am kind of new to maven, any help will be appreciated. 回答1: You've specified a dependency on jdk.tools:jdk.tools:jar with a <systemPath> of ${JAVA_HOME}/lib/tools.jar . ${JAVA_HOME} isn't a valid Maven property. The syntax to

Maven build error

自古美人都是妖i 提交于 2019-12-10 19:04:43
问题 I want to build a spring mvc project by maven,I got the following error: The following artifacts could not be resolved: org.aopalliance:com.springsource.org.aopalliance:jar:1.0.0, org.hibernate:hibernate-validator:jar:4.2.0.Beta1: Could not find artifact org.aopalliance:com.springsource.org.aopalliance:jar:1.0.0 in central (http://repo1.maven.org/maven2) I use eclipse and m2eclipse plugin. I don't know how to add local repository. And I found for different versions of eclipse,the result is

maven tomcat7:deploy fails with status code:403, ReasonPhrase:Forbidden

空扰寡人 提交于 2019-12-10 17:38:51
问题 I'm using a tomcat maven plugin to deploy my java web app. Now everythings work when i use tomcat 7.0.32, this is my plugin configuration <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.1</version> <configuration> <url>http://localhost:8080/manager/text</url> <server>my-tomcat</server> <path>/myapp</path> </configuration> </plugin> my settings.xml configuration <servers> <server> <id>my-tomcat</id> <username>manager</username>

Maven archetype + Velocity: how to show the date

a 夏天 提交于 2019-12-10 17:33:25
问题 I have a maven archetype project. When I use this archetype I want that some files report the actual date. I tried with $date but Velocity does not recognize it. I found something called DateTools but I don't know how can I use it. It's the first time I use Velocity. 回答1: Unfortunately, the Maven Archetype plugin doesn't come bundled with Velocity Tools. I've added it by modifying the Maven Archetypes Plugin. Follow these steps, presuming you're using Maven 2.2.1: svn co -q http://svn.apache