mvn eclipse:eclipse -DdownloadSources -DdownloadJavadocs
or
mvn -Declipse.downloadSources=true eclipse:eclipse
mvn test -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9000 -Xnoagent -Djava.compiler=NONE"
on windows set MAVEN_OPTS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1234
on linux export MAVEN_OPTS="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1234"
http://nexus-host:8000/nexus/service/local/artifact/maven/content?r=public-snapshots&g=net.matlux&a=engine-services&v=LATEST&c=war
wget "http://repository.sonatype.org/service/local/artifact/maven/content?
r=snapshots&g=org.sonatype.nexus&a=nexus-utils&v=LATEST" --content-disposition
Where:
r = the id of the repository or group to search (Required) g = the groupId of the file (Required) a = the artifactId of the file (Required) v = the version of the file, this may be "LATEST", "RELEASE", a version number like "2.0", or a snapshot version number like "2.0-SNAPSHOT". (Required) c = the classifier of the file (Optional) e = the type or extension of the file (Optional) p = packaging (Nexus will resolve known packaging types to the correct extension). (Optional) If the version is not a concrete version, then Nexus will look in the maven-metadata.xml in the same way Maven does to resolve the version. The filename will be set in the content-disposition header field, so if you are using wget, be sure to use the --content-disposition flag so the filename is correct.
There is an alternate form of the API that uses redirects to work around the content-disposition setting. This form is shown below:
wget "http://repository.sonatype.org/service/local/artifact/maven/redirect? r=snapshots&g=org.sonatype.nexus&a=nexus-utils&v=LATEST"
example of how to retrieve tomcat:
wget http://nexus-host/nexus/service/local/repo_groups/releases/content/net/matlux/packages/tomcat-runtime/unity-tomcat-runtime-assembly/7.32/unity-tomcat-runtime-assembly-7.32-package.tar.gz
mvn dependency:tree
mvn help:all-profiles
mvn help:active-profiles
mvn -P profile1,profile2
mvn -P !profile1,!profile2
mvn install -DskipTests
mvn clean integration-test -Dit.test=NewTest
mvn clean install -Pdeploy-artifacts -P%conf.DEPLOY_ENV%
or
mvn clean install -Dmyapp.url=http://host1:4280/
then add something like this to pom:
<properties>
<myapp.url>http://hostdefault:8080/</myapp.url>
<in-or-out-process.arg>-Dtest.type=out-process</in-or-out-process.arg>
<exclude.some.tests>**/none*</exclude.some.tests>
<soaktest.test>false</soaktest.test>
</properties>
mvn versions:set -DnewVersion=$release_version -DgenerateBackupPoms=false versions:commit
Example
mvn versions:set -DnewVersion=1.2.3 -DgenerateBackupPoms=false versions:commit
mvn deploy:deploy-file -DpomFile=fleet-0.9.5.pom -DrepositoryId=myrepo-releases -Durl=http://hostname/nexus/content/repositories/myrepo-releases -Dfile=fleet-0.9.5.jarmvn deploy:deploy-file -DgroupId=clj-http -DartifactId=clj-http -Dversion=0.4.1 -Dpackaging=jar -DrepositoryId=myrepo-releases -Durl=http://hostname/nexus/content/repositories/myrepo-releases -Dfile=clj-http-0.4.1.jarmvn install:install-file -DgroupId=clj-http -DartifactId=clj-http -Dversion=0.4.1 -Dpackaging=jar -Dfile=clj-http-0.4.1.jarmvn clean install -rf :my-last-module
mvn archetype:generate -DgroupId={project-packaging} -DartifactId={project-name} -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
Quick example:
mvn archetype:generate -B -DarchetypeGroupId=pl.org.miki -DarchetypeArtifactId=java8-quickstart-archetype -DarchetypeVersion=1.0.0 -DgroupId=net.matlux -DartifactId=java8-playpark -Dversion=1.0 -Dpackage=net.matlux -DcompilerMode=simple -DtestLibrary=junitMore general options:
mvn archetype:generate -B \
-DarchetypeGroupId=pl.org.miki -DarchetypeArtifactId=java8-quickstart-archetype -DarchetypeVersion=1.0.0 \
-DgroupId=com.example -DartifactId=project -Dversion=1.0 -Dpackage=com.example.project \
-DcompilerMode=[simple, test-only, retrolambda-main, retrolambda-all] \ #optional
-DtestLibrary=[junit, testng, none] #optionalReference: https://github.com/mikolak-net/java8-quickstart-archetype