0

I want to use missioncontrol module which is not published at maven repository and is installed with JDK. I could manually install it by mvn install like it's done in this script. But I'd prefer maven to resolve this dependency automatically.

The issue is I don't know exact version of module on each machine (assuming that JAVA_HOME is defined for every machine). And maven does not seem to automatically resolve the * placeholder:

<dependency>
    <groupId>com.jrockit.mc</groupId>
    <artifactId>com.jrockit.mc.common</artifactId>
    <version>LATEST</version>
    <scope>system</scope>
    <systemPath>${env.JAVA_HOME}/lib/missioncontrol/plugins/com.jrockit.mc.common_*.jar</systemPath>
</dependency>

Is there any proper way to do this? Or is it a bad practice for some reason? Thanks.

awfun
  • 2,316
  • 4
  • 31
  • 52
  • Have a look at this [http://stackoverflow.com/questions/2229757/maven-add-a-dependency-to-a-jar-by-relative-path](http://stackoverflow.com/questions/2229757/maven-add-a-dependency-to-a-jar-by-relative-path) – Nitin Prabhu May 19 '17 at 16:18
  • I have only jar's and not maven-metadata.xml files, so maven fails to download it – awfun May 19 '17 at 16:27

1 Answers1

0

Does your jar file name changes with java version

Nitin Prabhu
  • 624
  • 6
  • 10