Uploaded image for project: 'Maven Build Cache Extension'
  1. Maven Build Cache Extension
  2. MBUILDCACHE-76

pom project version change not detected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1.0
    • 1.2.0
    • None

    Description

      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>

      ```

          

      Attachments

        Issue Links

          Activity

            People

              olamy Olivier Lamy
              davidmoten2 Dave Moten
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: