gitgabrio opened a new issue, #1467:
URL: https://github.com/apache/incubator-kie-issues/issues/1467

   Fix the reproducible-build profile so that
   
   1. build/test `artifact_0` and install it on local repository
   2. clean the target directory
   3. build `artifact_1` without installing it in repository
   4. compares `artifact_0` with `artifact_1`
   
   The flow should be
   1. the normal build/test/installation are executed
   2. the clean verify artifact:compare phases are re-executed
   3. the artifact:compare refers to artifact from local .m2/repository (and 
not from central).
   
   
   Reference 
[here](https://maven.apache.org/guides/mini/guide-reproducible-builds.html#how-to-test-my-maven-build-reproducibility)
   
   
   
   
   Notes:
   at point 2, probably is not important to execute exactly "verify", but just 
to recompile/repackage
   
   This could a possible approach (to be verified):
   
   ```xml
   <profile>
               <id>reproducible-build</id>
               <activation>
                   <property>
                       <name>reproducible</name>
                   </property>
               </activation>
               <build>
                   <plugins>
                       <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-clean-plugin</artifactId>
                           <version>3.3.2</version>
                           <executions>
                               <execution>
                                   <id>pre-compare-clean</id>
                                   <goals>
                                       <goal>clean</goal>
                                   </goals>
                                   <phase>install</phase>
                               </execution>
                           </executions>
                       </plugin>
                       <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-compiler-plugin</artifactId>
                           <version>3.13.0</version>
                           <executions>
                               <execution>
                                   <id>pre-compare-package</id>
                                   <goals>
                                       <goal>compile</goal>
                                   </goals>
                                   <phase>install</phase>
                               </execution>
                           </executions>
                       </plugin>
                       <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-jar-plugin</artifactId>
                           <version>3.4.2</version>
                           <executions>
                               <execution>
                                   <id>pre-compare-package</id>
                                   <goals>
                                       <goal>jar</goal>
                                   </goals>
                                   <phase>install</phase>
                                   <configuration>
                                       <skipIfEmpty>true</skipIfEmpty> <!-- 
needed to avoid jar creation out of a pom module !-->
                                   </configuration>
                               </execution>
                           </executions>
                       </plugin>
                       <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-artifact-plugin</artifactId>
                           <executions>
                               <execution>
                                   <id>check-buildplan</id>
                                   <goals>
                                       <goal>check-buildplan</goal>
                                   </goals>
                                   <phase>validate</phase>
                               </execution>
                               <execution>
                                   <id>compare</id>
                                   <goals>
                                       <goal>compare</goal>
                                   </goals>
                                   <phase>install</phase>
                                   <configuration>
                                       
<referenceRepo>file:~/.m2/repository</referenceRepo>
                                   </configuration>
                               </execution>
                           </executions>
                       </plugin>
                   </plugins>
               </build>
           </profile>
   ```
   
   @baldimir @mariofusco @yesamer @jstastny-cz @porcelli @elguardian 
   
   
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to