How can i upload the jar file without changing it's name

I want to use the upload task (with sshresolver) to upload the generated jar files directly to JBoss. The name of each jar file comes from a property file in the project that produces it and is different from the project name.

I tried using the pattern

ssh://$user@$host/$dir/[originalname]

which gives an error, and

ssh://$user@$host/$dir/[artifactname].[ext]

which works (i.e. uploads), but still seems to base the name on the module rather than on the jar file name.

Are you saying that the jars that get produced to your build/libs have different names than the jars uploaded via the upload task? Hmmm, that’s quite unlikely.

The upload task works with configurations, e.g. you declare what configuration the upload task should upload. Then, the upload task takes all artifacts attached to given configuration and uploads them.

Let’s say you want to upload configuration ‘foo’. I suggest to build this configuration first and confirm that the jars are created with correct names.

Hope that helps!