We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
create
buildnumber-maven-plugin
buildIsTainted
git init
pom.xml
<packaging>jar</packaging> <scm> <developerConnection>scm:git:https://git.organisation.example/namespace/project.git</developerConnection> </scm> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>buildnumber-maven-plugin</artifactId> <version>3.2.0</version> <executions> <execution> <phase>validate</phase> <goals> <goal>create</goal> </goals> </execution> </executions> <configuration> <doCheck>true</doCheck> <getRevisionOnlyOnce>false</getRevisionOnlyOnce> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>3.3.0</version> <configuration> <archive> <manifest> <addDefaultImplementationEntries>true</addDefaultImplementationEntries> </manifest> <manifestEntries> <Implementation-Build-Number>${buildNumber}</Implementation-Build-Number> <Implementation-SCM-Branch>${scmBranch}</Implementation-SCM-Branch> <Implementation-Build-Is-Tainted>${buildIsTainted}</Implementation-Build-Is-Tainted> </manifestEntries> </archive> </configuration> </plugin> </plugins> </build>
mvn clean package
target/
META-INF/MANIFEST.MF
A line is present in MANIFEST.MF which reads:
Build-Is-Tainted: ok
Build-Is-Tainted: tainted
The following line is present in MANIFEST.MF:
Build-Is-Tainted:
which ends with a single space character.
The method CreateMojo#buildNumberAndTimeStampForReactorProjects does not add the buildIsTainted property to reactor projects, unless getRevisionOnlyOnce is set to true: https://github.com/mojohaus/buildnumber-maven-plugin/blob/master/src/main/java/org/codehaus/mojo/build/CreateMojo.java#L448-L475
CreateMojo#buildNumberAndTimeStampForReactorProjects
getRevisionOnlyOnce
true
The text was updated successfully, but these errors were encountered:
Fix mojohausGH-204: 'create' mojo does not set buildIsTainted property
1417876
Successfully merging a pull request may close this issue.
Steps to reproduce
create
goal ofbuildnumber-maven-plugin
and uses the generatedbuildIsTainted
property:git init
in an empty folder and writing apom.xml
file with settings shown below:mvn clean package
.target/
directory.META-INF/MANIFEST.MF
.Expected
A line is present in MANIFEST.MF which reads:
Build-Is-Tainted: ok
, if the working tree is clean, orBuild-Is-Tainted: tainted
otherwise.Actual
The following line is present in MANIFEST.MF:
which ends with a single space character.
Possible cause
The method
CreateMojo#buildNumberAndTimeStampForReactorProjects
does not add thebuildIsTainted
property to reactor projects, unlessgetRevisionOnlyOnce
is set totrue
: https://github.com/mojohaus/buildnumber-maven-plugin/blob/master/src/main/java/org/codehaus/mojo/build/CreateMojo.java#L448-L475The text was updated successfully, but these errors were encountered: