maven-3

Maven profile properties are not “overriding”

半城伤御伤魂 提交于 2019-12-21 07:15:34
问题 I have Maven multi-module project with such structure: parent-pom-project -- module1 -- module2 At the parent-pom-project I have such pom.xml <modules> <module>module1</module> </modules> ... <profiles> <profile> <id>local</id> <properties> <prop>local_prop</prop> </properties> </profile> <profile> <id>test</id> <modules> <module>module2</module> </modules> <properties> <prop>test_prop</prop> </properties> </profile> </profiles> At all pom.xml files I have such tag: <build> <resources>

Return Code 401 with Maven 3 uploading SNAPSHOT to Artifactory

丶灬走出姿态 提交于 2019-12-21 06:26:09
问题 I am running the following: Apache Maven 3.0.5, Artifactory(Open-Source) 3.1.0 No Jenkins/Hudson, just the default Artifactory setup. Excerpt from pom.xml: <distributionManagement> <repository> <id>ServerA2</id> <name>ServerA2-releases</name> <url>http://192.168.1.16:8081/artifactory/libs-release-local</url> </repository> <snapshotRepository> <id>ServerA2</id> <name>ServerA2-snapshots</name> <url>http://192.168.1.16:8081/artifactory/libs-snapshot-local</url> </snapshotRepository> <

maven shaded jar: change output location

微笑、不失礼 提交于 2019-12-21 05:28:04
问题 I'm having difficulty using the Maven Shade Plugin because I would like to have my shaded jar be installed to the same folder as the Parent pom (instead of the local src/target directory). The layout: maven_project guide/ parent_pom.xml projA/ pom.xml projB/ pom.xml /target original-projB-0.0.3.jar projB-0.0.3.jar (shaded jar) I have to export the project and to make it easier for others to run the executable jar I want to relocate the shaded jar to the guide folder. Unfortunately, I tried

Manually attach main artifact if built by maven-assembly-plugin

a 夏天 提交于 2019-12-21 04:27:28
问题 I am having problems building a maven project. I have a requirement to produce deterministic jar files, which must be binary-consistent across different builds and versions, in case there are no source code changes in between these builds. For the purpose, I have used this article for guidance. I have successfully managed to build my jars and they are consistent up to my requirements. Here is my configuration: <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version>

Where is mvn.exe when using embedded maven 3 in eclipse indigo?

最后都变了- 提交于 2019-12-21 03:23:12
问题 I'm using the Indigo Release of eclipse. When I check Window -> Preferences, Maven -> Installations, it confirms that it's using the Embedded (3.0.2/...) installation of Maven. I want to be able to run maven commands from the command line (Windows Powershell), but when I type, e.g., PS C:\> mvn no executable is found. I did a search for "mvn.exe" and found no results. I suppose I could install a stand-alone version of Maven 3 and add that to my PATH, but I'd prefer to be using the same Maven

Maven archetype plugin doesn't let .resources in archetype-resources through

偶尔善良 提交于 2019-12-21 03:13:38
问题 Does anybody know how can I make resources like .gitignore be part of the resulting project ? create archetype with archetype-resources/.gitignore mvn install mvn archatype:generate resulting project doesn't contain .gitignore PS. I'm sure it isn't there. 回答1: This solution for upcoming maven-resources-plugin v3.0.0 (not yet released at the time of posting this; current is still 2.7) from https://issues.apache.org/jira/browse/MRESOURCES-190 seems better than holding back version upgrades:

How to programmatically list all transitive dependencies, including overridden ones in Maven using DependencyGraphBuilder?

一笑奈何 提交于 2019-12-21 02:21:09
问题 This is similar to other questions (like this), but I want to be able to do this with the latest API's. The maven-dependency-plugin:tree verbose option has been deprecated and does nothing in the latest (2.5.1) code, so there is no good example of how to do it. 回答1: I believe Aether utility class from jcabi-aether can help you to get a list of all dependencies of any Maven artifact, for example: File repo = this.session.getLocalRepository().getBasedir(); Collection<Artifact> deps = new Aether

Maven 3.0's “mvn release:perform” doesn't like a pom.xml that isn't in its git repo's root directory

帅比萌擦擦* 提交于 2019-12-20 20:11:09
问题 I have a question about Maven, the maven-release-plugin, git integration, pom.xml's, and having pom.xml's in subdirectories of the repo's local copy rather than in the root. Here's the setup: I have a github account with a limited number of private repositories I want to (am just learning to) use Maven to organize my builds/releases I might need to create many Maven "projects", several projects per git repository Each maven project requires a "pom.xml" to define its characteristics I can't,

How exactly mvn -U works?

大憨熊 提交于 2019-12-20 17:35:15
问题 I want to know what exactly Maven do in the -U phase. The argument ordering forced check for updates on remote repositories and if needed, updating the local maven repository with the updated dependencies used in our project. As described: -U --update-snapshots Forces a check for updated releases and snapshots on remote repositories But, how exactly is this done? Is maven first of all downloading all the remote repositories and locally decides that they need to get updated, or, deciding

Maven plugin for Tomcat 9

落爺英雄遲暮 提交于 2019-12-20 17:26:42
问题 I didn't find any tomcat-maven-plugin other than tomcat7-maven-plugin. Can I use it with apache-tomcat-9.0.0.M15? 回答1: Yes you can use it. I tried and it worked for me on tomcat 9 <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <url>http://localhost:8080/manager/text</url> <server>TomcatServer</server> <path>/myapp</path> </configuration> </plugin> Maven goals: mvn tomcat7:deploy mvn tomcat7:undeploy mvn