I have a multi-module maven project that is built by teamcity. This is working and the resulting artifacts are:
/core/target/core-system-1.2.3.war
/plugins/plugin-a/target/plugin-a-1.2.3.jar
/plugins/plugin-b/target/plugin-b-1.2.3.jar
/plugins/plugin-c/target/plugin-c-1.2.3.jar
/plugins/...
Currently, the artifacts are collected using this under general settings:
core/**/target/*.war => dist/core
plugins/**/target/*.jar => dist/plugins
So, I have all needed files in the dist
-folder (afterwards they are pushed to a deployment-server via ssh). However, teamcity keeps the "target"-folder (which is also mentioned here [1]):
/dist/core/target/core-system-1.2.3.war
/dist/plugins/plugin-a/target/plugin-a-1.2.3.jar
/dist/plugins/plugin-b/target/plugin-b-1.2.3.jar
/dist/plugins/plugin-c/target/plugin-c-1.2.3.jar
What I need is to remove the target
directory from the results:
/dist/core/core-system-1.2.3.war
/dist/plugins/plugin-a/plugin-a-1.2.3.jar
/dist/plugins/plugin-b/plugin-b-1.2.3.jar
/dist/plugins/plugin-c/plugin-c-1.2.3.jar
There are a lot of plugins and they change from time to time, so I don't want define them all with static paths. Therefore, using plugins/plugin-a/target/*.jar => dist/plugins/plugin-a
is possible, but not feasible.
So, how can I remove the target
directory from the artifact path, without selecting other jars that are not within the target
directory?
TeamCity is 10.0.4