Skip to content

Commit

Permalink
[New] Remove dependency on plaintext declaration of version
Browse files Browse the repository at this point in the history
  • Loading branch information
blcham committed Nov 23, 2022
1 parent aae2f62 commit 5bacf7a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
# removing the old test module and generating a new one

# Change the variables below as necessary
ARCHETYPE_GROUP_ID="cz.cvut.kbss"
ARCHETYPE_ARTIFACT_ID="s-pipes-module-archetype"
ARCHETYPE_VERSION="1.0-SNAPSHOT"

NEW_MODULE_GROUP_ID="cz.cvut.spipes.modules"
NEW_MODULE_ARTIFACT_ID="test-own-artifact"
NEW_MODULE_NAME="foobar"
Expand All @@ -17,13 +13,17 @@ ARCHETYPE_DIR=$SCRIPT_PATH/..
SPIPES_MODULES_DIR=$ARCHETYPE_DIR/../../s-pipes-modules

cd $ARCHETYPE_DIR
ARCHETYPE_VERSION="$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
ARCHETYPE_GROUP_ID="$(mvn help:evaluate -Dexpression=project.groupId -q -DforceStdout)"
ARCHETYPE_ARTIFACT_ID="$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)"

mvn clean install archetype:update-local-catalog -q
echo "Updated archetype in local maven repository"

cd $SPIPES_MODULES_DIR
# Cleanup of old versions
rm -rf $NEW_MODULE_ARTIFACT_ID
sed -i '' "s/<module>$NEW_MODULE_ARTIFACT_ID<\/module>//" pom.xml
sed -i "s/<module>$NEW_MODULE_ARTIFACT_ID<\/module>//" pom.xml
echo "Cleaned up the old version"

mvn archetype:generate \
Expand Down

0 comments on commit 5bacf7a

Please sign in to comment.