You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/10/29 02:30:35 UTC

[GitHub] [servicecomb-pack] RuthlessStar opened a new issue #679: Note the following points when compiling the code:

RuthlessStar opened a new issue #679:
URL: https://github.com/apache/servicecomb-pack/issues/679


   1 Compile the code and run the relevant unit tests. As there may be errors in the unit tests, the compilation may be terminated. You can ignore the test errors. Use the following method to add the following code to the pom project (I added it on line 843)
            <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
           <configuration>
             <testFailureIgnore>true</testFailureIgnore>
           </configuration>
         </plugin>
   If you don’t want to ignore the test error every time, you can add ignore in the run command, as follows
   mvn clean install -Dmaven.test.failure.ignore=true
   2 Pay attention to your jdk version, make sure it is 1.8
   3 Compile the software release package, do not run the test, maven will encounter problems with the release package generated in the distribution/target directory Cannot run program "gpg.exe"
   Can be solved in the following ways
   (1) Add compilation parameter -Dgpg.skip
   (2) Modify pom to delete gpg plugin and use package to compile <plugin>, the command is mvn clean package
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-gpg-plugin</artifactId>
     <version>1.6</version>
     <executions>
       <execution>
         <id>sign-artifacts</id>
         <phase>verify</phase>
         <goals>
           <goal>sign</goal>
         </goals>
       </execution>
     </executions>
   </plugin>
   (3) However, there are certain problems with the above processing methods. First, GPG signature is necessary, so it cannot be done by deleting the configuration. But we know that GPG signature is only necessary when the project is released, otherwise it will be time-consuming, so you can use the release-profile to add gpg attributes. At the same time delete the original gpg configuration.
       <profile>
           <id>release-sign-artifacts</id>
           <activation>
               <property>
                   <name>performRelease</name>
                   <value>true</value>
               </property>
           </activation>
           <build>
               <plugins>
                   <plugin>
                       <groupId>org.apache.maven.plugins</groupId>
                       <artifactid>maven-gpg-plugin</artifactid>
                       <version>1.0</version>
                       <executions>
                           <execution>
                               <id>sign-artifacts</id>
                               <phase>verify</phase>
                               <goals>
                                   <goal>sign</goal>
                               </goals>
                           </execution>
                       </executions>
                   </plugin>
               </plugins>
           </build>
       </profile>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org