-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
... and not the version set by the "projectVersion" configuration parameter.
Use Case
We don't want a project in the dependency track for every snapshot version of a Maven project, but only one that reflects the latest development status.
Solution approach
For this I configured the Mojo as follows:
<plugin>
<groupId>io.github.pmckeown</groupId>
<artifactId>dependency-track-maven-plugin</artifactId>
<executions>
<execution>
<id>upload-snapshot-bom</id>
<inherited>false</inherited>
<phase>deploy</phase>
<goals>
<goal>upload-bom</goal>
</goals>
<configuration>
<skip>releases</skip>
<!-- We only want one project in Dependency Track that reflects the latest development status. -->
<projectVersion>development</projectVersion>
</configuration>
</execution>
<execution>
<id>upload-release-bom</id>
<inherited>false</inherited>
<phase>deploy</phase>
<goals>
<goal>upload-bom</goal>
</goals>
<configuration>
<skip>snapshots</skip>
</configuration>
</execution>
</executions>
</plugin>
Problem
For the execution upload-snapshot-bom
the Mojo uses the string development
to check if the project is a snapshot or a release version. Since development
corresponds to the format of a release version, the plugin is prevented from running because skip=releases
is set :-(
Metadata
Metadata
Assignees
Labels
No labels