Skip to content

Commit

Permalink
really hide cyclonedx plugin when building on Java 7
Browse files Browse the repository at this point in the history
  • Loading branch information
bodewig committed Dec 28, 2022
1 parent cc9899d commit 98dc0be
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
6 changes: 3 additions & 3 deletions create-bin-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ mkdir -p target/bindist-tmp/xmlunit-$1
cp README.md LICENSE RELEASE_NOTES.md target/bindist-tmp/xmlunit-$1
cp */target/*.jar target/bindist-tmp/xmlunit-$1
cp -r target/site/apidocs target/bindist-tmp/xmlunit-$1
cp xmlunit-*/target/*-sbom.json target/bindist-tmp/xmlunit-$1
cp xmlunit-*/target/*-sbom.* target
cp xmlunit-*/target/*-cyclonedx.json target/bindist-tmp/xmlunit-$1
cp xmlunit-*/target/*-cyclonedx.* target
cd target/bindist-tmp
zip -r xmlunit-$1-bin.zip xmlunit-$1
tar cf xmlunit-$1-bin.tar xmlunit-$1
Expand All @@ -35,7 +35,7 @@ bzip2 xmlunit-$1-bin.tar
mv xmlunit-$1-bin.* ..

cd ..
for i in *.zip *.tar.gz *.tar.bz2 *-sbom.*; do
for i in *.zip *.tar.gz *.tar.bz2 *-cyclonedx.*; do
sha256sum $i > $i.sha256
gpg --use-agent --detach-sign --armor $i
done
40 changes: 21 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

<!-- overridden via profile for Java 8+ -->
<javadoc.additionalparam></javadoc.additionalparam>
<cyclonedx.skip>true</cyclonedx.skip>

<!-- need to set this to be 8 so the lambdas of assertj3's javadocs are
accepted -->
Expand Down Expand Up @@ -387,24 +386,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<executions>
<execution>
<id>build-cyclonedx</id>
<phase>package</phase>
<goals>
<goal>makeBom</goal>
</goals>
</execution>
</executions>
<configuration>
<outputFormat>all</outputFormat>
<outputName>${project.artifactId}-${project.version}-sbom</outputName>
<skip>${cyclonedx.skip}</skip>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
Expand Down Expand Up @@ -540,6 +521,27 @@
<javadoc.additionalparam>-Xdoclint:html,syntax,accessibility,reference</javadoc.additionalparam>
<cyclonedx.skip>false</cyclonedx.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<executions>
<execution>
<id>build-cyclonedx</id>
<phase>package</phase>
<goals>
<goal>makeBom</goal>
</goals>
</execution>
</executions>
<configuration>
<outputFormat>all</outputFormat>
<outputName>${project.artifactId}-${project.version}-cyclonedx</outputName>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>java14+</id>
Expand Down

0 comments on commit 98dc0be

Please sign in to comment.