Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(pom.xml) cleanup markups to allow preparation of incremental builds #17

Merged

Conversation

dduportal
Copy link
Contributor

Ref. jenkins-infra/helpdesk#3711 and closes jenkinsci/incrementals-tools#73

This PR cleans up the pom.xml to allow enablement of incrementals which requires an initial top-level version markup to be set following the (.+)-SNAPSHOT pattern.

It also removes duplicated markup in the properties section (as it will be updated by the initial incrementalify call).

Verification

From the HEAD of this PR, I was able to successully run the mvn incrementals:incrementalify command (using JDK11 and Maven 3.9.4) with the following result:

$ git status
On branch chore/fix-pom-to-enable-incremental
Your branch is ahead of 'upstream/main' by 1 commit.
  (use "git push" to publish your local commits)

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   pom.xml

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        .mvn/

no changes added to commit (use "git add" and/or "git commit -a")
$ git diff
diff --git a/pom.xml b/pom.xml
index 3da9837..05f8e6e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,10 +11,13 @@
 
   <groupId>com.aq</groupId>
   <artifactId>accelq-ci-connect</artifactId>
-  <version>1.8-SNAPSHOT</version>
+  <version>${revision}${changelist}</version>
   <packaging>hpi</packaging>
 
   <properties>
+    <revision>1.8</revision>
+    <changelist>-SNAPSHOT</changelist>
+    <gitHubRepo>jenkinsci/accelq-ci-connect-plugin</gitHubRepo>
     <gitHubRepo>jenkinsci/accelq-ci-connect-plugin</gitHubRepo>
     <jenkins.version>2.401.3</jenkins.version>
     <java.level>11</java.level>
$ cat .mvn/extensions.xml 
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
  <extension>
    <groupId>io.jenkins.tools.incrementals</groupId>
    <artifactId>git-changelist-maven-extension</artifactId>
    <version>1.7</version>
  </extension>
</extensions>
$ cat .mvn/maven.config 
-Pconsume-incrementals
-Pmight-produce-incrementals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

incrementals:incrementalify fails with NPE when <version> missing
2 participants