mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-13 08:46:14 +02:00
Improving onos-create-app script to print message when artifactId is not provided on command line.
This replaces the "onos-create-app: line 31: [: argument expected" error message. Change-Id: I58e08f302edf2a5068adf993cdbc55e71b9578bf
This commit is contained in:
parent
56743d71a4
commit
b2bd7edfe5
@ -28,7 +28,15 @@ mvn archetype:generate -DarchetypeGroupId=org.onosproject \
|
||||
-DarchetypeVersion=$ONOS_POM_VERSION $otherOptions "$@"
|
||||
|
||||
# Patch the pom.xml file to make this an app.
|
||||
if [ $type = app -a -d $dir ]; then
|
||||
egrep -v " (<!--|-->)" $dir/pom.xml > $dir/pom.app.xml
|
||||
mv $dir/pom.app.xml $dir/pom.xml
|
||||
fi
|
||||
if [ $type = app ]; then
|
||||
# We need to add a few lines to the pom.xml to make this an app
|
||||
if [ -n "$dir" ] && [ -d $dir ]; then
|
||||
egrep -v " (<!--|-->)" $dir/pom.xml > $dir/pom.app.xml
|
||||
mv $dir/pom.app.xml $dir/pom.xml
|
||||
else
|
||||
echo
|
||||
echo "IMPORTANT:"
|
||||
echo "To build the application, you need to uncomment the 'onos.app.name' and 'onos.app.origin' properties in the pom.xml"
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user