utempl -t wosrc: si on crée un wosrc dans le répertoire java, enlever automatiquement le package pour les fichiers resources pour une configuration maven

This commit is contained in:
Jephté Clain 2016-06-07 16:08:35 +04:00
parent f0f7a6ff3e
commit c669e8fa57
1 changed files with 9 additions and 0 deletions

View File

@ -205,7 +205,16 @@ function generate_wosrccomp() {
*) die "Destination name should not have an extension" *) die "Destination name should not have an extension"
esac esac
local prefix
case "$file" in case "$file" in
*/src/main/java/*/v/*)
javafile="$file"
prefix="${file%%/src/main/java/*}"
wosrcfile="${javafile#$prefix/}"
prefix="$prefix/src/main/wosrc"
wosrcfile="${wosrcfile#*/v/}"
wosrcfile="$prefix/$wosrcfile"
;;
*/src/main/java/*) */src/main/java/*)
javafile="$file" javafile="$file"
wosrcfile="${file/src\/main\/java/src/main/wosrc}" wosrcfile="${file/src\/main\/java/src/main/wosrc}"