代理
<proxies> <proxy> <id>xxxxxx.proxy</id> <active>true</active> <protocol>http</protocol> <username>someone</username> <password>ask someone</password> <host>inetproxy3.ldn.xxxxxx</host> <port>8080</port> <nonProxyHosts>xxxxxx*</nonProxyHosts> </proxy> </proxies>
镜像
<mirrors> <mirror> <id>ssts mr</id> <name>Internal Mirror of Central Repository</name> <url>http://xldn3162vdap.ldn.xxxxxx:8080/archiva/repository/internal</url> <!--<url>http://xxxxxx-build:9090/maven-repo/</url>--> <mirrorOf>central</mirrorOf> </mirror> </mirrors>
仓库
<profiles> <profile> <id>default</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>ssts</id> <name>Internal Mirror of Central Repository</name> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> <checksumPolicy>ignore</checksumPolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>never</updatePolicy> <checksumPolicy>ignore</checksumPolicy> </snapshots> <url>http://xldn3162vdap.ldn.xxxxxx:8080/archiva/repository/internal</url> </repository> <repository> <id>ssts-fusa</id> <name>Internal Mirror of Central Repository</name> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> <checksumPolicy>ignore</checksumPolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>never</updatePolicy> <checksumPolicy>ignore</checksumPolicy> </snapshots> <url>http://xxxxxx-build:9090/maven-repo/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>ssts</id> <name>Internal Mirror of Central Plugins Repository</name> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> <checksumPolicy>ignore</checksumPolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>never</updatePolicy> <checksumPolicy>ignore</checksumPolicy> </snapshots> <url>http://xldn3162vdap.ldn.xxxxxx:8080/archiva/repository/internal</url> </pluginRepository> </pluginRepositories> </profile> </profiles>
编译插件
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.5.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin>
打包Jar - 包含main方法
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.5.1</version> <excutions> <excution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>com.xxx.xxx.Class</mainClass> </transformer> </transformers> </configuration> </excution> </excutions> </plugin>