<repositories> <repository> <id>taerepository</id> <url>http://mvnrepo.tae.taobao.com/content/groups/public/</url> <releases> <enabled>true</enabled></releases> <snapshots> <enabled>false</enabled></snapshots> </repository> <repository> <id>taesnapshots</id> <url>http://mvnrepo.tae.taobao.com/content/repositories/snapshots/</url> <releases> <enabled>false</enabled></releases> <snapshots> <enabled>true</enabled></snapshots> </repository> <repository> <id>taereleases</id> <url>http://mvnrepo.tae.taobao.com/content/repositories/releases/</url> <releases> <enabled>true</enabled></releases> <snapshots> <enabled>false</enabled></snapshots> </repository> </repositories>
<server> <id>taerepository</id> <username>用户名</username> <password>密码</password> </server> <server> <id>taereleases</id> <username>用户名</username> <password>密码</password> </server> <server> <id>taesnapshots</id> <username>用户名</username> <password>密码</password> </server>
<repository> <id>local-project-third-party</id> <name> Third Party Repository</name> <url>file://${project.basedir}/third-party</url> </repository>
<repositories> <repository> <id>local-project-third-party</id> <name> Third Party Repository</name> <url>file://${project.basedir}/third-party</url> </repository> </repositories>
<dependency> <groupId>com.taobao.sdk</groupId> <artifactId>taobao-sdk-java-online_standard</artifactId> <version>20140729</version> </dependency>
<repositories> <repository> <id>taerepository</id> <url>http://mvnrepo.tae.taobao.com/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>taesnapshots</id> <url>http://mvnrepo.tae.taobao.com/content/repositories/snapshots/</url> <releases> <enabled>false</enabled></releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> <repository> <id>taereleases</id> <url>http://mvnrepo.tae.taobao.com/content/repositories/releases/</url> <releases> <enabled>true</enabled></releases> <snapshots> <enabled>false</enabled></snapshots> </repository> </repositories>
<server> <id>taerepository</id> <username>用户名</username> <password>密码</password> </server> <server> <id>taereleases</id> <username>用户名</username> <password>密码</password> </server> <server> <id>taesnapshots</id> <username>用户名</username> <password>密码</password> </server>
<distributionManagement> <repository> <id>taereleases</id> <name>taereleases</name> <url>http://mvnrepo.tae.taobao.com/content/repositories/releases/</url> </repository> <snapshotRepository> <id>taesnapshots</id> <name>taesnapshots</name> <url>http://mvnrepo.tae.taobao.com/content/repositories/snapshots/</url> </snapshotRepository> </distributionManagement>
7、在发布jar包时,发布的jar的GroupId需要是申请的GroupId,并且在settings.xml文件中已经配置了server,配置详见“模板使用说明”的第二步。否则,如果发布不属于自己的GroupId的jar包,则发布会失败。同样,不能发布war包。
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.1.1</version> <configuration> <warName>ROOT</warName> </configuration> </plugin>