发表于: 2017-09-15 23:21:33

1 625


今日完成:

前台接口调试完毕

学习打tag(未成功)


明日计划:

解决前端角色新增、编辑bug。postman测没问题

CodeReview问题修改

积分新平台项目开始了,内容很多,需要好好看下需求


问题:

按wiki上的两个教程打tag,打tag顺序core、service、web,我在打core就失败了

我的步骤:

1.修改主pom中项目版本如下图,原始版本号后边带有SNAPSHOT

<groupId>com.ptteng</groupId>
<artifactId>carrots.bangbang</artifactId>
<packaging>pom</packaging>
<version>1.0</version>

2.添加主pom配置

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-release-plugin</artifactId>
   <version>2.0-beta-7</version>
   <configuration>
       <tagBase>svn://120.92.4.210/student/carrots/trunk/bangbang/tags/carrots-bangbang-admin-web</tagBase>
       <!--<tagBase>svn://wx.ptteng.com/ptteng/uweiqian/tags/</tagBase>-->
   </configuration>
</plugin>

3.在主pom配置中配置maven-javadoc-plugin,防JDK1.8注释识别问题

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-javadoc-plugin</artifactId>
   <version>2.10.4</version>
   <configuration>
       <encoding>${chartset.UTF8}</encoding>
       <aggregate>true</aggregate>
       <charset>${chartset.UTF8}</charset>
       <docencoding>${chartset.UTF8}</docencoding>
   </configuration>
   <executions>
       <execution>
           <id>attach-javadocs</id>
           <phase>package</phase>
           <goals>
               <goal>jar</goal>
           </goals>
           <configuration>
               <additionalparam>-Xdoclint:none</additionalparam>
           </configuration>
       </execution>
   </executions>
</plugin>

4.配置私服指向

<!--3.配置snapshot、release的nexus私服指向-->
<distributionManagement>
   <repository>
       <id>nexus</id>
       <name>releases</name>
       <url>http://nexus.ptteng.com/nexus/content/repositories/releases</url>
       <uniqueVersion>true</uniqueVersion>

   </repository>

   <snapshotRepository>
       <id>nexus</id>
       <name>snapshots</name>
       <url>http://nexus.ptteng.com/nexus/content/repositories/snapshots</url>
   </snapshotRepository>
</distributionManagement>

主pom中配置就这些


配置子pom步骤:

1.修改版本号如下图,原始是带有SNAPSHOT

<parent>
   <artifactId>carrots.bangbang</artifactId>
   <groupId>com.ptteng</groupId>
   <version>1.0</version>
</parent>

2.添加release插件

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-release-plugin</artifactId>
   <version>2.0-beta-7</version>
   <configuration>
       <tagBase>svn://120.92.4.210/student/carrots/trunk/bangbang/tags/carrots-bangbang-admin-core</tagBase>
       <!--<tagBase>svn://wx.ptteng.com/ptteng/uweiqian/tags/</tagBase>-->
   </configuration>
</plugin>

3.配置私服指向

<!--3.配置snapshot、release的nexus私服指向-->
<distributionManagement>
   <repository>
       <id>nexus</id>
       <name>releases</name>
       <url>http://nexus.ptteng.com/nexus/content/repositories/releases</url>
       <uniqueVersion>true</uniqueVersion>

   </repository>

   <snapshotRepository>
       <id>nexus</id>
       <name>snapshots</name>
       <url>http://nexus.ptteng.com/nexus/content/repositories/snapshots</url>
   </snapshotRepository>
</distributionManagement>

4.配置svn路径

<scm>

   <connection>scm:svn:svn://120.92.4.210/student/carrots/trunk/bangbang/tags/carrots-bangbang-admin-core/carrots-bangbang-admin-core-1.0</connection>

</scm>

5.在svn创建相应目录

6.执行release:clean命令

   执行release:prepare 命令

一直提示让给个版本,这里写什么呢?我填写0 ,1都不行,然后我敲回车就报错了

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0-beta-7:prepare (default-cli) on project carrots-bangbang-admin-core: Can't release project due to non released dependencies :

[ERROR] com.ptteng:carrots.bangbang:pom:1.0-SNAPSHOT

[ERROR] in project 'carrots-bangbang-admin-core' (com.ptteng:carrots-bangbang-admin-core:jar:1.0-SNAPSHOT)

发现子pom中版本号变为了SNAPSHOT版本,本来我设置的是1.0

卡在这了,不知道怎么弄


进度:

下午17:00demo



返回列表 返回列表
评论

    分享到