Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package buildnumber-maven-plugin for
openSUSE:Factory checked in at 2026-05-11 16:57:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/buildnumber-maven-plugin (Old)
and /work/SRC/openSUSE:Factory/.buildnumber-maven-plugin.new.1966 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "buildnumber-maven-plugin"
Mon May 11 16:57:23 2026 rev:5 rq:1352396 version:3.3.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/buildnumber-maven-plugin/buildnumber-maven-plugin.changes
2025-09-26 22:25:28.936437879 +0200
+++
/work/SRC/openSUSE:Factory/.buildnumber-maven-plugin.new.1966/buildnumber-maven-plugin.changes
2026-05-11 17:07:51.362746721 +0200
@@ -1,0 +2,17 @@
+Mon May 11 06:16:34 UTC 2026 - Fridrich Strba <[email protected]>
+
+- Update to upstream version 3.3.0
+ * Changes
+ + #237 useLastCommittedRevision on git returns Revision
+ + #208 property failTheBuild=false also ignore general scm
+ failure
+ + Upgrade maven-scm to 2.2.1 and add compatibility fixes
+ * Dependency updates
+ + Bump org.codehaus.mojo:mojo-parent from 85 to 95
+ + Bump org.codehaus.mojo:extra-enforcer-rules from 1.8.0 to
+ 1.11.0
+ + Bump com.google.code.gson:gson from 2.11.0 to 2.13.2
+ + Bump actions/stale from 9 to 10
+ + Bump org.codehaus.plexus:plexus-utils from 4.0.1 to 4.0.2
+
+-------------------------------------------------------------------
Old:
----
buildnumber-maven-plugin-3.2.1-source-release.zip
New:
----
buildnumber-maven-plugin-3.3.0-source-release.zip
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ buildnumber-maven-plugin.spec ++++++
--- /var/tmp/diff_new_pack.KjI2wu/_old 2026-05-11 17:07:51.966771574 +0200
+++ /var/tmp/diff_new_pack.KjI2wu/_new 2026-05-11 17:07:51.966771574 +0200
@@ -1,7 +1,7 @@
#
# spec file for package buildnumber-maven-plugin
#
-# Copyright (c) 2025 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: buildnumber-maven-plugin
-Version: 3.2.1
+Version: 3.3.0
Release: 0
Summary: Build Number Maven Plugin
License: Apache-2.0 AND MIT
++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.KjI2wu/_old 2026-05-11 17:07:52.022773878 +0200
+++ /var/tmp/diff_new_pack.KjI2wu/_new 2026-05-11 17:07:52.026774042 +0200
@@ -1,6 +1,6 @@
-mtime: 1758881761
-commit: 135fdfa41362bece4630fe82813e75b6e251e1fe062b567a3c5eb3d5bbb1f405
-url: https://src.opensuse.org/java-packages/buildnumber-maven-plugin.git
-revision: 135fdfa41362bece4630fe82813e75b6e251e1fe062b567a3c5eb3d5bbb1f405
+mtime: 1778480431
+commit: 7a3d4cc70012a04589c555457a14a38899599c424f9e5622d9793fca0d38783e
+url: https://src.opensuse.org/java-packages/buildnumber-maven-plugin
+revision: 7a3d4cc70012a04589c555457a14a38899599c424f9e5622d9793fca0d38783e
projectscmsync: https://src.opensuse.org/java-packages/_ObsPrj
++++++ build.specials.obscpio ++++++
++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore 2026-05-11 08:20:31.000000000 +0200
@@ -0,0 +1 @@
+.osc
++++++ buildnumber-maven-plugin-3.2.1-source-release.zip ->
buildnumber-maven-plugin-3.3.0-source-release.zip ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/buildnumber-maven-plugin-3.2.1/.gitignore
new/buildnumber-maven-plugin-3.3.0/.gitignore
--- old/buildnumber-maven-plugin-3.2.1/.gitignore 2024-09-03
00:19:14.000000000 +0200
+++ new/buildnumber-maven-plugin-3.3.0/.gitignore 1970-01-01
01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-target
-.settings
-.classpath
-.project
-*.iml
-.idea/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/buildnumber-maven-plugin-3.2.1/pom.xml
new/buildnumber-maven-plugin-3.3.0/pom.xml
--- old/buildnumber-maven-plugin-3.2.1/pom.xml 2024-09-03 00:19:14.000000000
+0200
+++ new/buildnumber-maven-plugin-3.3.0/pom.xml 2026-01-18 22:07:42.000000000
+0100
@@ -5,11 +5,11 @@
<parent>
<groupId>org.codehaus.mojo</groupId>
<artifactId>mojo-parent</artifactId>
- <version>85</version>
+ <version>95</version>
</parent>
<artifactId>buildnumber-maven-plugin</artifactId>
- <version>3.2.1</version>
+ <version>3.3.0</version>
<packaging>maven-plugin</packaging>
<name>Build Number Maven Plugin</name>
@@ -71,7 +71,7 @@
<scm>
<connection>scm:git:https://github.com/mojohaus/buildnumber-maven-plugin.git</connection>
<developerConnection>scm:git:https://github.com/mojohaus/buildnumber-maven-plugin.git</developerConnection>
- <tag>3.2.1</tag>
+ <tag>buildnumber-maven-plugin=3.3.0</tag>
<url>https://github.com/mojohaus/buildnumber-maven-plugin/tree/master</url>
</scm>
@@ -81,14 +81,14 @@
</issueManagement>
<properties>
- <maven.scm.version>2.1.0</maven.scm.version>
+ <maven.scm.version>2.2.1</maven.scm.version>
<mojo.java.target>8</mojo.java.target>
<maven.it.version>${mavenVersion}</maven.it.version>
<takari.plugin.testing.version>3.0.0</takari.plugin.testing.version>
<takari-lifecycle-plugin.version>2.0.8</takari-lifecycle-plugin.version>
<test.excludes>**/it/**</test.excludes>
<scmpublish.content>target/staging/${project.artifactId}</scmpublish.content>
-
<project.build.outputTimestamp>2024-09-03T00:19:13Z</project.build.outputTimestamp>
+
<project.build.outputTimestamp>2026-01-18T22:07:42Z</project.build.outputTimestamp>
</properties>
<dependencies>
@@ -178,7 +178,7 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
- <version>4.0.1</version>
+ <version>4.0.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
@@ -216,7 +216,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
- <version>2.11.0</version>
+ <version>2.13.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
@@ -290,7 +290,7 @@
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
- <version>1.8.0</version>
+ <version>1.11.0</version>
</dependency>
</dependencies>
<executions>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/buildnumber-maven-plugin-3.2.1/src/main/java/org/codehaus/mojo/build/AbstractScmMojo.java
new/buildnumber-maven-plugin-3.3.0/src/main/java/org/codehaus/mojo/build/AbstractScmMojo.java
---
old/buildnumber-maven-plugin-3.2.1/src/main/java/org/codehaus/mojo/build/AbstractScmMojo.java
2024-09-03 00:19:14.000000000 +0200
+++
new/buildnumber-maven-plugin-3.3.0/src/main/java/org/codehaus/mojo/build/AbstractScmMojo.java
2026-01-18 22:07:42.000000000 +0100
@@ -286,7 +286,10 @@
// It seemed the case that for git getLastChangedRevision()
// returns null instead of the last revision in contradiction
// to the above code: scmResult.getInfoItems().get(0);
- return info.getLastChangedRevision();
+ String lastChangedRevision = info.getLastChangedRevision();
+ if (lastChangedRevision != null) {
+ return lastChangedRevision;
+ }
}
return info.getRevision();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/buildnumber-maven-plugin-3.2.1/src/main/java/org/codehaus/mojo/build/CreateMojo.java
new/buildnumber-maven-plugin-3.3.0/src/main/java/org/codehaus/mojo/build/CreateMojo.java
---
old/buildnumber-maven-plugin-3.2.1/src/main/java/org/codehaus/mojo/build/CreateMojo.java
2024-09-03 00:19:14.000000000 +0200
+++
new/buildnumber-maven-plugin-3.3.0/src/main/java/org/codehaus/mojo/build/CreateMojo.java
2026-01-18 22:07:42.000000000 +0100
@@ -34,6 +34,7 @@
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
+import java.util.TimeZone;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.MojoExecutionException;
@@ -610,18 +611,22 @@
try {
return this.getScmRevision();
} catch (ScmException e) {
+ String warnMessage = "Cannot get the revision information from the
scm repository";
if (!StringUtils.isEmpty(revisionOnScmFailure)) {
- getLog().warn("Cannot get the revision information from the
scm repository, proceeding with "
- + "revision of " + revisionOnScmFailure + " : \n" +
e.getLocalizedMessage());
+ getLog().warn(warnMessage + ", proceeding with " + "revision
of " + revisionOnScmFailure + " : \n"
+ + e.getLocalizedMessage());
setDoCheck(false);
setDoUpdate(false);
return revisionOnScmFailure;
}
+ if (!failTheBuild) {
+ getLog().warn(warnMessage, e);
+ return "";
+ }
- throw new MojoExecutionException(
- "Cannot get the revision information from the scm
repository : \n" + e.getLocalizedMessage(), e);
+ throw new MojoExecutionException(warnMessage + " : \n" +
e.getLocalizedMessage(), e);
}
}
@@ -687,4 +692,8 @@
public void setShortRevisionLength(int shortRevision) {
this.shortRevisionLength = shortRevision;
}
+
+ public void setFailTheBuild(boolean failTheBuild) {
+ this.failTheBuild = failTheBuild;
+ }
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/buildnumber-maven-plugin-3.2.1/src/site/site.xml
new/buildnumber-maven-plugin-3.3.0/src/site/site.xml
--- old/buildnumber-maven-plugin-3.2.1/src/site/site.xml 2024-09-03
00:19:14.000000000 +0200
+++ new/buildnumber-maven-plugin-3.3.0/src/site/site.xml 2026-01-18
22:07:42.000000000 +0100
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/DECORATION/1.8.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0
https://maven.apache.org/xsd/decoration-1.8.0.xsd">
+<site xmlns="http://maven.apache.org/SITE/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0
https://maven.apache.org/xsd/site-2.0.0.xsd">
<body>
<breadcrumbs>
@@ -16,4 +15,4 @@
<item name="FAQ" href="faq.html" />
</menu>
</body>
-</project>
+</site>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/buildnumber-maven-plugin-3.2.1/src/test/java/org/codehaus/mojo/build/TestCreateMojo.java
new/buildnumber-maven-plugin-3.3.0/src/test/java/org/codehaus/mojo/build/TestCreateMojo.java
---
old/buildnumber-maven-plugin-3.2.1/src/test/java/org/codehaus/mojo/build/TestCreateMojo.java
2024-09-03 00:19:14.000000000 +0200
+++
new/buildnumber-maven-plugin-3.3.0/src/test/java/org/codehaus/mojo/build/TestCreateMojo.java
2026-01-18 22:07:42.000000000 +0100
@@ -26,7 +26,9 @@
import java.util.Date;
import java.util.List;
import java.util.Locale;
+import java.util.Optional;
+import org.apache.maven.scm.CommandParameters;
import org.apache.maven.scm.ScmBranch;
import org.apache.maven.scm.ScmException;
import org.apache.maven.scm.ScmFileSet;
@@ -174,222 +176,7 @@
File file = new File(folder.getRoot(),
"target/buildNumber.properties");
file.delete();
mojo.setRevisionOnScmFailure("scmrevision");
- mojo.setScmManager(new ScmManager() {
-
- public ScmRepository makeScmRepository(String string)
- throws ScmRepositoryException, NoSuchScmProviderException {
- throw new ScmRepositoryException("No SCM for testing.");
- }
-
- public ScmRepository makeProviderScmRepository(String string, File
file)
- throws ScmRepositoryException, UnknownRepositoryStructure,
NoSuchScmProviderException {
- throw new ScmRepositoryException("No SCM for testing.");
- }
-
- public List<String> validateScmRepository(String string) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public ScmProvider getProviderByUrl(String string)
- throws ScmRepositoryException, NoSuchScmProviderException {
- throw new ScmRepositoryException("No SCM for testing.");
- }
-
- public ScmProvider getProviderByType(String string) throws
NoSuchScmProviderException {
- throw new NoSuchScmProviderException("No SCM for testing.");
- }
-
- public ScmProvider getProviderByRepository(ScmRepository sr)
throws NoSuchScmProviderException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public void setScmProvider(String string, ScmProvider sp) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public void setScmProviderImplementation(String string, String
string1) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public AddScmResult add(ScmRepository sr, ScmFileSet sfs) throws
ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public AddScmResult add(ScmRepository sr, ScmFileSet sfs, String
string) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public BranchScmResult branch(ScmRepository sr, ScmFileSet sfs,
String string) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public BranchScmResult branch(ScmRepository sr, ScmFileSet sfs,
String string, String string1)
- throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public ChangeLogScmResult changeLog(
- ScmRepository sr, ScmFileSet sfs, Date date, Date date1,
int i, ScmBranch sb) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public ChangeLogScmResult changeLog(
- ScmRepository sr, ScmFileSet sfs, Date date, Date date1,
int i, ScmBranch sb, String string)
- throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public ChangeLogScmResult changeLog(ChangeLogScmRequest
changeLogScmRequest) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public ChangeLogScmResult changeLog(ScmRepository sr, ScmFileSet
sfs, ScmVersion sv, ScmVersion sv1)
- throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public ChangeLogScmResult changeLog(
- ScmRepository sr, ScmFileSet sfs, ScmVersion sv,
ScmVersion sv1, String string)
- throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public CheckInScmResult checkIn(ScmRepository sr, ScmFileSet sfs,
String string) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public CheckInScmResult checkIn(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv, String string)
- throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public CheckOutScmResult checkOut(ScmRepository sr, ScmFileSet
sfs) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public CheckOutScmResult checkOut(ScmRepository sr, ScmFileSet
sfs, ScmVersion sv) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public CheckOutScmResult checkOut(ScmRepository sr, ScmFileSet
sfs, boolean bln) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public CheckOutScmResult checkOut(ScmRepository sr, ScmFileSet
sfs, ScmVersion sv, boolean bln)
- throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public DiffScmResult diff(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv, ScmVersion sv1)
- throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public EditScmResult edit(ScmRepository sr, ScmFileSet sfs) throws
ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public ExportScmResult export(ScmRepository sr, ScmFileSet sfs)
throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public ExportScmResult export(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public ExportScmResult export(ScmRepository sr, ScmFileSet sfs,
String string) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public ExportScmResult export(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv, String string)
- throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public ListScmResult list(ScmRepository sr, ScmFileSet sfs,
boolean bln, ScmVersion sv)
- throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public MkdirScmResult mkdir(ScmRepository sr, ScmFileSet sfs,
String string, boolean bln)
- throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public RemoveScmResult remove(ScmRepository sr, ScmFileSet sfs,
String string) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public StatusScmResult status(ScmRepository sr, ScmFileSet sfs)
throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public TagScmResult tag(ScmRepository sr, ScmFileSet sfs, String
string) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public TagScmResult tag(ScmRepository sr, ScmFileSet sfs, String
string, String string1)
- throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public UnEditScmResult unedit(ScmRepository sr, ScmFileSet sfs)
throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs)
throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs,
boolean bln) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv, boolean bln)
- throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs,
String string) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv, String string)
- throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs,
Date date) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv, Date date)
- throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs,
Date date, String string)
- throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv, Date date, String string)
- throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public BlameScmResult blame(ScmRepository sr, ScmFileSet sfs,
String string) throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public BlameScmResult blame(BlameScmRequest blameScmRequest)
throws ScmException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
- });
+ mojo.setScmManager(new ScmManagerMock());
mojo.setUrlScm("http://nonexistent");
mojo.execute();
@@ -397,4 +184,238 @@
assertEquals("1-scmrevision-2", rev);
}
+
+ @Test
+ public void test() throws Exception {
+ CreateMojo mojo = new CreateMojo();
+ mojo.setBuildNumberPropertiesFileLocation(new File(folder.getRoot(),
"target/buildNumber.properties"));
+ mojo.setFormat("{0}-{1}-{2}");
+ mojo.setItems(asList("buildNumber0", "scmVersion", "buildNumber0"));
+ mojo.setFailTheBuild(false);
+ mojo.setScmManager(new ScmManagerMock());
+ mojo.setUrlScm("http://nonexistent");
+
+ mojo.execute();
+ String rev = mojo.getRevision();
+
+ assertEquals("1--2", rev);
+ }
+
+ private class ScmManagerMock implements ScmManager {
+
+ public ScmRepository makeScmRepository(String string)
+ throws ScmRepositoryException, NoSuchScmProviderException {
+ throw new ScmRepositoryException("No SCM for testing.");
+ }
+
+ public ScmRepository makeProviderScmRepository(String string, File
file)
+ throws ScmRepositoryException, UnknownRepositoryStructure,
NoSuchScmProviderException {
+ throw new ScmRepositoryException("No SCM for testing.");
+ }
+
+ public Optional<ScmRepository> makeProviderScmRepository(File file) {
+ return Optional.empty();
+ }
+
+ public List<String> validateScmRepository(String string) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public ScmProvider getProviderByUrl(String string) throws
ScmRepositoryException, NoSuchScmProviderException {
+ throw new ScmRepositoryException("No SCM for testing.");
+ }
+
+ public ScmProvider getProviderByType(String string) throws
NoSuchScmProviderException {
+ throw new NoSuchScmProviderException("No SCM for testing.");
+ }
+
+ public ScmProvider getProviderByRepository(ScmRepository sr) throws
NoSuchScmProviderException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void setScmProvider(String string, ScmProvider sp) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void setScmProviderImplementation(String string, String
string1) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public AddScmResult add(ScmRepository sr, ScmFileSet sfs) throws
ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public AddScmResult add(ScmRepository sr, ScmFileSet sfs, String
string) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public BranchScmResult branch(ScmRepository sr, ScmFileSet sfs, String
string) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public BranchScmResult branch(ScmRepository sr, ScmFileSet sfs, String
string, String string1)
+ throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public ChangeLogScmResult changeLog(
+ ScmRepository sr, ScmFileSet sfs, Date date, Date date1, int
i, ScmBranch sb) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public ChangeLogScmResult changeLog(
+ ScmRepository sr, ScmFileSet sfs, Date date, Date date1, int
i, ScmBranch sb, String string)
+ throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public ChangeLogScmResult changeLog(ChangeLogScmRequest
changeLogScmRequest) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public ChangeLogScmResult changeLog(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv, ScmVersion sv1)
+ throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public ChangeLogScmResult changeLog(
+ ScmRepository sr, ScmFileSet sfs, ScmVersion sv, ScmVersion
sv1, String string) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public CheckInScmResult checkIn(ScmRepository sr, ScmFileSet sfs,
String string) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public CheckInScmResult checkIn(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv, String string)
+ throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public CheckInScmResult checkIn(ScmRepository sr, ScmFileSet sfs,
CommandParameters commandParameters)
+ throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public CheckOutScmResult checkOut(ScmRepository sr, ScmFileSet sfs)
throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public CheckOutScmResult checkOut(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public CheckOutScmResult checkOut(ScmRepository sr, ScmFileSet sfs,
boolean bln) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public CheckOutScmResult checkOut(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv, boolean bln)
+ throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public DiffScmResult diff(ScmRepository sr, ScmFileSet sfs, ScmVersion
sv, ScmVersion sv1) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public EditScmResult edit(ScmRepository sr, ScmFileSet sfs) throws
ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public ExportScmResult export(ScmRepository sr, ScmFileSet sfs) throws
ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public ExportScmResult export(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public ExportScmResult export(ScmRepository sr, ScmFileSet sfs, String
string) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public ExportScmResult export(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv, String string)
+ throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public ListScmResult list(ScmRepository sr, ScmFileSet sfs, boolean
bln, ScmVersion sv) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public MkdirScmResult mkdir(ScmRepository sr, ScmFileSet sfs, String
string, boolean bln) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public RemoveScmResult remove(ScmRepository sr, ScmFileSet sfs, String
string) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public StatusScmResult status(ScmRepository sr, ScmFileSet sfs) throws
ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public TagScmResult tag(ScmRepository sr, ScmFileSet sfs, String
string) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public TagScmResult tag(ScmRepository sr, ScmFileSet sfs, String
string, String string1) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public UnEditScmResult unedit(ScmRepository sr, ScmFileSet sfs) throws
ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs) throws
ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs,
boolean bln) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv, boolean bln)
+ throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs, String
string) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv, String string)
+ throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs, Date
date) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv, Date date) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs, Date
date, String string) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public UpdateScmResult update(ScmRepository sr, ScmFileSet sfs,
ScmVersion sv, Date date, String string)
+ throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public BlameScmResult blame(ScmRepository sr, ScmFileSet sfs, String
string) throws ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public BlameScmResult blame(BlameScmRequest blameScmRequest) throws
ScmException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+ }
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/buildnumber-maven-plugin-3.2.1/src/test/java/org/codehaus/mojo/build/it/BuildNumberMojoTest.java
new/buildnumber-maven-plugin-3.3.0/src/test/java/org/codehaus/mojo/build/it/BuildNumberMojoTest.java
---
old/buildnumber-maven-plugin-3.2.1/src/test/java/org/codehaus/mojo/build/it/BuildNumberMojoTest.java
2024-09-03 00:19:14.000000000 +0200
+++
new/buildnumber-maven-plugin-3.3.0/src/test/java/org/codehaus/mojo/build/it/BuildNumberMojoTest.java
2026-01-18 22:07:42.000000000 +0100
@@ -86,6 +86,27 @@
}
@Test
+ public void basicItGitTestWithLastCommittedRevision() throws Exception {
+ File projDir =
resources.getBasedir("basic-it-git-lastCommittedRevision");
+
+ MavenExecution mavenExec = maven.forProject(projDir);
+ MavenExecutionResult result = mavenExec.execute("clean");
+ result.assertErrorFreeLog();
+ File testDir = result.getBasedir();
+ FileUtils.copyDirectoryStructure(new File(testDir, "dotGitDir"), new
File(testDir, ".git"));
+ result = mavenExec.execute("clean", "verify");
+ result.assertLogText("Storing buildNumber:
6d36c746e82f00c5913954f9178f40224497b2f3");
+ result.assertLogText("Storing scmBranch: master");
+
+ File artifact = new File(testDir,
"target/buildnumber-maven-plugin-basic-it-1.0-SNAPSHOT.jar");
+ JarFile jarFile = new JarFile(artifact);
+ Attributes manifest = jarFile.getManifest().getMainAttributes();
+ jarFile.close();
+ String scmRev = manifest.getValue("SCM-Revision");
+ Assert.assertEquals("6d36c746e82f00c5913954f9178f40224497b2f3",
scmRev);
+ }
+
+ @Test
public void basicItClearcaseScmTest() throws Exception {
File projDir = resources.getBasedir("basic-it-clearcase-scm");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/HEAD
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/HEAD
---
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/HEAD
1970-01-01 01:00:00.000000000 +0100
+++
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/HEAD
2026-01-18 22:07:42.000000000 +0100
@@ -0,0 +1 @@
+ref: refs/heads/master
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/config
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/config
---
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/config
1970-01-01 01:00:00.000000000 +0100
+++
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/config
2026-01-18 22:07:42.000000000 +0100
@@ -0,0 +1,5 @@
+[core]
+ repositoryformatversion = 0
+ filemode = true
+ bare = false
+ logallrefupdates = true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/description
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/description
---
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/description
1970-01-01 01:00:00.000000000 +0100
+++
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/description
2026-01-18 22:07:42.000000000 +0100
@@ -0,0 +1 @@
+Dummy repository to check buildnumber-maven-plugin for Git SCM.
Binary files
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/index
and
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/index
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/info/exclude
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/info/exclude
---
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/info/exclude
1970-01-01 01:00:00.000000000 +0100
+++
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/info/exclude
2026-01-18 22:07:42.000000000 +0100
@@ -0,0 +1,6 @@
+# git ls-files --others --exclude-from=.git/info/exclude
+# Lines that start with '#' are comments.
+# For a project mostly in C, the following would be a good set of
+# exclude patterns (uncomment them if you want to use them):
+# *.[oa]
+# *~
Binary files
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/objects/0a/129e164de5b62edb46d1aa0feef56a34941ac2
and
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/objects/0a/129e164de5b62edb46d1aa0feef56a34941ac2
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/objects/6d/36c746e82f00c5913954f9178f40224497b2f3
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/objects/6d/36c746e82f00c5913954f9178f40224497b2f3
---
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/objects/6d/36c746e82f00c5913954f9178f40224497b2f3
1970-01-01 01:00:00.000000000 +0100
+++
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/objects/6d/36c746e82f00c5913954f9178f40224497b2f3
2026-01-18 22:07:42.000000000 +0100
@@ -0,0 +1,2 @@
+x��� �0P�3�]@�O�MAD���� ���q��p��kjd�
+PtA�ۑ���Ě�M�z�Ѱ�G֬§ͥ�5G�ɂ<�� ��Kx�q(�y&�u�7�e���V�+�����聺����:,
\ No newline at end of file
Binary files
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/objects/d3/a01ee82b5e7da3c2193fe952858d152ceb6505
and
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/objects/d3/a01ee82b5e7da3c2193fe952858d152ceb6505
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/refs/heads/master
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/refs/heads/master
---
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/refs/heads/master
1970-01-01 01:00:00.000000000 +0100
+++
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/dotGitDir/refs/heads/master
2026-01-18 22:07:42.000000000 +0100
@@ -0,0 +1 @@
+6d36c746e82f00c5913954f9178f40224497b2f3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/pom.xml
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/pom.xml
---
old/buildnumber-maven-plugin-3.2.1/src/test/projects/basic-it-git-lastCommittedRevision/pom.xml
1970-01-01 01:00:00.000000000 +0100
+++
new/buildnumber-maven-plugin-3.3.0/src/test/projects/basic-it-git-lastCommittedRevision/pom.xml
2026-01-18 22:07:42.000000000 +0100
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.codehaus.mojo.it</groupId>
+ <artifactId>buildnumber-maven-plugin-basic-it</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <scm>
+
<developerConnection>scm:git:https://github.com/mojohaus/buildnumber-maven-plugin/tree/master/src/it/basic-it-git.git</developerConnection>
+ </scm>
+
+ <build>
+
+ <defaultGoal>package</defaultGoal>
+
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
+ <version>${it-plugin.version}</version>
+ <executions>
+ <execution>
+ <id>useLastCommittedRevision</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <useLastCommittedRevision>true</useLastCommittedRevision>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>timestampFormat</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <useLastCommittedRevision>true</useLastCommittedRevision>
+ <timestampFormat>yyyy-MM-dd</timestampFormat>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ <manifestEntries>
+ <SCM-Revision>${buildNumber}</SCM-Revision>
+ <Build-Date>${timestamp}</Build-Date>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+
+ </build>
+
+</project>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/buildnumber-maven-plugin-3.2.1/src/test/projects/git-basic-it-MBUILDNUM-66/.gitignore
new/buildnumber-maven-plugin-3.3.0/src/test/projects/git-basic-it-MBUILDNUM-66/.gitignore
---
old/buildnumber-maven-plugin-3.2.1/src/test/projects/git-basic-it-MBUILDNUM-66/.gitignore
2024-09-03 00:19:14.000000000 +0200
+++
new/buildnumber-maven-plugin-3.3.0/src/test/projects/git-basic-it-MBUILDNUM-66/.gitignore
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-target/