1、windows
而在cmd脚本中实现的同样功能的连接符是“^”
mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate ^
-DarchetypeCatalog=http://ip:port/nexus/content/repositories/releases/ ^
-DarchetypeGroupId=com.xxx ^
-DarchetypeArtifactId=common-template-archetype ^
-DarchetypeVersion=1.0.0.RELEASE ^
-DgroupId=com.test ^
-DartifactId=demo.project ^
-Dversion=1.0.0.RELEASE
2、Linux
而在sh脚本中实现的同样功能的连接符是“\”
mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate \
-DarchetypeCatalog=http://ip:port/nexus/content/repositories/releases/ \
-DarchetypeGroupId=com.xxx \
-DarchetypeArtifactId=common-template-archetype \
-DarchetypeVersion=1.0.0.RELEASE \
-DgroupId=com.quxueyuan \
-DartifactId=dyw \
-Dversion=1.0.0.RELEASE