Path to JAR

已回答

Hi everybody,

I have created a configuration to debug my java application.

I added the path to the JAR but it changes with each build of my application.


Indeed, the path of the build is formed like this :

target/my-application-X.X.X-bxxxxxxxx/libs/myjarfile.jar

where X.X.X is a version like 2.1.0 and xxxxxxxx is the build date like 20220601, example :

target/my-application-2.1.0-b20220601/libs/myjarfile.jar

So I have to change this path in my configuration at almost every build.

Is it possible to put variables or characters of type * in the path to the JAR?

If not, do you have another idea ?

 

评论操作 固定链接

Hi. There is no such possibility to dynamically change the path in run configuration. Do you use Maven or Gradle in project? these build systems support the artifacts output directory customization. See e.g. for Maven: https://stackoverflow.com/a/4757448/2000323

1
评论操作 固定链接

We work with Maven but it's a big project with a big team so I can change this setting :D 

But anyway ty for your answer !!

0

请先登录再写评论。