-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tsimafei Raro
committed
Aug 22, 2022
1 parent
ff874bc
commit 66924ef
Showing
5 changed files
with
40 additions
and
27 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
s-pipes-modules-utils/s-pipes-module-archetype/bin/generate-test-module.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
# A small helper script for updating the archetype in the local maven repo, | ||
# 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="0.4.0" | ||
|
||
NEW_MODULE_GROUP_ID="cz.cvut.spipes.modules" | ||
NEW_MODULE_ARTIFACT_ID="test-own-artifact" | ||
NEW_MODULE_NAME="foobar" | ||
|
||
ARCHETYPE_DIR=../ | ||
SPIPES_MODULES_DIR=$ARCHETYPE_DIR/../s-pipes-modules | ||
|
||
|
||
cd $ARCHETYPE_DIR | ||
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 | ||
echo "Cleaned up the old version" | ||
|
||
mvn archetype:generate \ | ||
-DinteractiveMode=false \ | ||
-DarchetypeGroupId=$ARCHETYPE_GROUP_ID \ | ||
-DarchetypeArtifactId=$ARCHETYPE_ARTIFACT_ID \ | ||
-DarchetypeVersion=$ARCHETYPE_VERSION \ | ||
-DgroupId=$NEW_MODULE_GROUP_ID\ | ||
-DartifactId=$NEW_MODULE_ARTIFACT_ID \ | ||
-DmoduleName=$NEW_MODULE_NAME -q | ||
echo "Regenerated the test module" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters