I have a Java project that packages some resource files into the artifact jar. The files come from a zip that is versioned and stored in the same artifactory as the project's artifact. The zip is referenced as a dependency with a version-range.
The zip is listed as a dependency:
<dependency>
<groupId>com.example</groupId>
<artifactId>resource-files</artifactId>
<version>[1.68.0,1.68.1)</version>
<type>zip</type>
<scope>provided</scope>
</dependency>
Then unpacked with dependency plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includes>**/*.bin</includes>
<outputDirectory>${basedir}/import</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
Then added as a resource to the jar:
<resource>
<directory>${project.basedir}/import/resource-files-${version????}</directory>
<includes>
<include>*</include>
</includes>
<targetPath>bins</targetPath>
</resource>
How can I determine the exact version of the artifact zip? I would like to skip modifying the pom (like versions:resolve-ranges does), if possible.