jira-importer opened a new issue, #306:
URL: https://github.com/apache/maven-build-cache-extension/issues/306

   **[Dave 
Moten](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=davidmoten2)**
 opened 
**[MBUILDCACHE-76](https://issues.apache.org/jira/browse/MBUILDCACHE-76?redirect=false)**
 and commented
   
   When I run `mvn versions:set -DnewVersion=BLAH`, the build cache extension 
does not detect this and skips all modules in a multimodule project (and fails 
when it encounters a module that depends on one of the other modules (a maven 
plugin)).
   
   What should happen is that every module gets rebuilt.
   
   To duplicate
   
   ```
   git clone [https://github.com/davidmoten/openapi-codegen.git]
   cd openapi-codegen
   mvn clean install
   mvn versions:set -DnewVersion=1.2.3.4-SNAPSHOT
   mvn clean install
   ```
   
   Output:
   
   ```
   [ERROR] Invalid plugin descriptor for 
com.github.davidmoten:openapi-codegen-maven-plugin:1.2.3.4-SNAPSHOT 
(/home/dave/.m2/build-cache/v1/com.github.davidmoten/openapi-codegen-maven-plugin/ad4e1e854d87f274/local/openapi-codegen-maven-plugin.jar),
 Plugin's descriptor contains the wrong version: 0.1.15-SNAPSHOT -> [Help 1]
   ```
   
   Here is my maven-build-cache-config.xml:
   
   ```
   
   <cache xmlns="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
          xsi:schemaLocation="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0 
[https://maven.apache.org/xsd/build-cache-config-1.0.0.xsd]";>
       <configuration>
           <enabled>true</enabled>
           <!-- activated via cli -->
           <!-- to disable it just use -Dmaven.build.cache.enabled=false -->
       </configuration>
       <input>
           <global>
               <glob>{{*}.java,{*}.xml,{*}.properties,{*}.mod,*.adoc}</glob>
               <excludes>
                   <exclude>{*}Jenkinsfile{*}</exclude>
                   <exclude>./idea/*</exclude>
               </excludes>
           </global>
           <plugins>
               <plugin groupId="org.apache.maven.plugins" 
artifactId="maven-surefire-plugin">
                   <effectivePom>
                       <excludeProperties>
                           
<excludeProperty>systemPropertyVariables</excludeProperty>
                       </excludeProperties>
                   </effectivePom>
               </plugin>
           </plugins>
       </input>
       <executionControl>
           <runAlways>
               <goalsLists>
                   <goalsList artifactId="maven-install-plugin">
                       <goals>
                           <goal>install</goal>
                       </goals>
                   </goalsList>
                   <goalsList artifactId="maven-deploy-plugin">
                       <goals>
                           <goal>deploy</goal>
                       </goals>
                   </goalsList>
               </goalsLists>
           </runAlways>
           <reconcile>
               <plugins>
                   <!-- workaround for 
https://issues.apache.org/jira/browse/MBUILDCACHE-56 -->
                   <plugin artifactId="maven-enforcer-plugin" goal="enforce">
                       <nologs>
                           <nolog propertyName="commandLineRules"/>
                       </nologs>
                   </plugin>
                   <plugin artifactId="maven-surefire-plugin" goal="test">
                       <reconciles>
                           <reconcile propertyName="skip" skipValue="true"/>
                           <reconcile propertyName="skipExec" skipValue="true"/>
                           <reconcile propertyName="skipTests" 
skipValue="true"/>
                           <reconcile propertyName="testFailureIgnore" 
skipValue="true"/>
                       </reconciles>
                       <nologs>
                           <nolog propertyName="systemPropertyVariables"/>
                       </nologs>
                   </plugin>
               </plugins>
           </reconcile>
       </executionControl>
   </cache>
   
   ```
   
       
   
   
   ---
   
   **Affects:** 1.1.0
   
   **Issue Links:**
   - [MBUILDCACHE-73](https://issues.apache.org/jira/browse/MBUILDCACHE-73) Add 
project version as additional property for reconcilation
    (_**"duplicates"**_)
   
   **Remote Links:**
   - [GitHub Pull Request #117
   ](https://github.com/apache/maven-build-cache-extension/pull/117)
   


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

Reply via email to