Maven release plugin fails : source artifacts getting deployed twice

Try running mvn -Prelease-profile help:effective-pom. You will find that you have two execution sections for maven-source-plugin The output will look something like this: <plugin> <artifactId>maven-source-plugin</artifactId> <version>2.0.4</version> <executions> <execution> <id>attach-sources</id> <goals> <goal>jar</goal> </goals> </execution> <execution> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> To fix this problem, find everywhere you have used maven-source-plugin and make sure that you … Read more

How to get a command-line property to overwrite a maven property

Put parameters directly to pom from command line for example: mvn clean install -Dtestng.version=6.3.1 Example: <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/maven-v4_0_0.xsd”> <modelVersion>4.0.0</modelVersion> <groupId>com.test</groupId> <artifactId>test</artifactId> <version>1.0.0</version> <name>test</name> <properties> <testng.version>6.4</testng.version> </properties> <dependencies> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>${testng.version}</version> <scope>test</scope> </dependency> </dependencies> </project> If you run it normally testng version 6.4 will be used. But if you run it like: mvn … Read more