summaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/build
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/tools/build')
-rw-r--r--framework/src/onos/tools/build/conf/pom.xml2
-rw-r--r--framework/src/onos/tools/build/conf/src/main/resources/onos/checkstyle.xml4
-rwxr-xr-xframework/src/onos/tools/build/onos-change-version5
-rwxr-xr-xframework/src/onos/tools/build/onos-package34
-rw-r--r--framework/src/onos/tools/build/pom.xml1
5 files changed, 26 insertions, 20 deletions
diff --git a/framework/src/onos/tools/build/conf/pom.xml b/framework/src/onos/tools/build/conf/pom.xml
index d56168f2..c76939ce 100644
--- a/framework/src/onos/tools/build/conf/pom.xml
+++ b/framework/src/onos/tools/build/conf/pom.xml
@@ -27,7 +27,7 @@
<groupId>org.onosproject</groupId>
<artifactId>onos-build-conf</artifactId>
- <version>1.1-SNAPSHOT</version>
+ <version>1.2-SNAPSHOT</version>
<description>Various ONOS build settings</description>
<properties>
diff --git a/framework/src/onos/tools/build/conf/src/main/resources/onos/checkstyle.xml b/framework/src/onos/tools/build/conf/src/main/resources/onos/checkstyle.xml
index fc6757a5..9260bae8 100644
--- a/framework/src/onos/tools/build/conf/src/main/resources/onos/checkstyle.xml
+++ b/framework/src/onos/tools/build/conf/src/main/resources/onos/checkstyle.xml
@@ -257,10 +257,6 @@
<!-- <module name="MagicNumber"/> -->
<module name="MissingSwitchDefault"/>
- <module name="RedundantThrows">
- <property name="allowSubclasses" value="true"/>
- </module>
-
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
diff --git a/framework/src/onos/tools/build/onos-change-version b/framework/src/onos/tools/build/onos-change-version
index a7117429..b41255b1 100755
--- a/framework/src/onos/tools/build/onos-change-version
+++ b/framework/src/onos/tools/build/onos-change-version
@@ -41,7 +41,7 @@ sed -i "" -E "s/Version\.version\(\"[^\"]*\"\)/Version.version(\"$NEW_VERSION\")
# Augment the version in archetypes tree.
mvn -f tools/package/archetypes/pom.xml versions:set -DnewVersion=$NEW_VERSION versions:commit
-for atype in api bundle cli ui; do
+for atype in api bundle cli ui uitab uitopo; do
pom="tools/package/archetypes/$atype/src/main/resources/archetype-resources/pom.xml"
sed -i "" -E "1,/<onos.version>/s/<onos.version>[^<]*</<onos.version>$NEW_VERSION</g" $pom
done
@@ -51,6 +51,3 @@ sed -i "" -E "s/-DarchetypeVersion=[^\"]*/-DarchetypeVersion=$NEW_VERSION/g" $ON
perl -i -0pe "s#<artifactId>cord-gui<.*\n.*version>#<artifactId>cord-gui</artifactId>\n <version>$NEW_VERSION</version>#" $ONOS_ROOT/apps/demo/cord-gui/pom.xml
sed -i "" -E "s#demo/cord-gui/target/cord-gui-.*\.war#demo/cord-gui/target/cord-gui-$NEW_VERSION.war#" $ONOS_ROOT/apps/demo/cord-gui/src/scripts/pullwar.sh
sed -i "" -E "s#CORD=./cord-gui-.*\.war#CORD=./cord-gui-$NEW_VERSION.war#" $ONOS_ROOT/apps/demo/cord-gui/src/scripts/run.me
-
-# Augment the acl app
-sed -i "" -E "s/<onos.version>[^<]*</<onos.version>$NEW_VERSION</g" $ONOS_ROOT/apps/acl/pom.xml
diff --git a/framework/src/onos/tools/build/onos-package b/framework/src/onos/tools/build/onos-package
index 5566e60d..e7f2cbe3 100755
--- a/framework/src/onos/tools/build/onos-package
+++ b/framework/src/onos/tools/build/onos-package
@@ -50,16 +50,25 @@ function build_stage_dir() {
$ONOS_ROOT/tools/package/bin/onos-client > bin/onos
chmod a+x bin/onos-service bin/onos
- # Stage the ONOS bundles, but only those that match the version
- mkdir -p $ONOS_STAGE/$KARAF_DIST/system/org/onosproject
- find $M2_REPO/org/onosproject -type f -path "*/$ONOS_POM_VERSION/*" \
- \( -name '*.jar' -o -name '*.pom' -o -name '*-features.xml' \) \
- | grep -v -Ee '-tests.jar|-[0-9]{8}.[0-9]{6}-' \
- | while read src; do
- dst=$ONOS_STAGE/$KARAF_DIST/system/${src#$M2_REPO/*}
- mkdir -p $(dirname $dst)
- cp $src $dst
- done
+ if [ -d $ONOS_ROOT/tools/package/karaf-assembly/target/repo ]; then
+ cp -r $ONOS_ROOT/tools/package/karaf-assembly/target/repo/* $ONOS_STAGE/$KARAF_DIST/system
+ #FIXME we need to add onos-features manually
+ mkdir -p $ONOS_STAGE/$KARAF_DIST/system/org/onosproject/onos-features/$ONOS_POM_VERSION
+ cp $M2_REPO/org/onosproject/onos-features/$ONOS_POM_VERSION/onos-features* \
+ $ONOS_STAGE/$KARAF_DIST/system/org/onosproject/onos-features/$ONOS_POM_VERSION
+ else
+ # TODO: Deprecated so remove when confident staging works.
+ # Stage the ONOS bundles, but only those that match the version
+ mkdir -p $ONOS_STAGE/$KARAF_DIST/system/org/onosproject
+ find $M2_REPO/org/onosproject -type f -path "*/$ONOS_POM_VERSION/*" \
+ \( -name '*.jar' -o -name '*.pom' -o -name '*-features.xml' \) \
+ | grep -v -Ee '-tests.jar|-[0-9]{8}.[0-9]{6}-' \
+ | while read src; do
+ dst=$ONOS_STAGE/$KARAF_DIST/system/${src#$M2_REPO/*}
+ mkdir -p $(dirname $dst)
+ cp $src $dst
+ done
+ fi
# ONOS Patching ----------------------------------------------------------------
@@ -153,6 +162,11 @@ function build_rpm() {
# Bail on any errors
set -e
+# Run karaf assembly to collect artifacts for off-line installations.
+aux=/tmp/assembly-$$.log
+trap "rm -f $aux 2>/dev/null" EXIT
+cd $ONOS_ROOT/tools/package/karaf-assembly && mvn clean install > $aux 2>&1
+
# Before starting make sure the environment is clan - delete onos staging folder
rm -fr $ONOS_STAGE
diff --git a/framework/src/onos/tools/build/pom.xml b/framework/src/onos/tools/build/pom.xml
index ea473ed2..33b3a09b 100644
--- a/framework/src/onos/tools/build/pom.xml
+++ b/framework/src/onos/tools/build/pom.xml
@@ -81,7 +81,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>2.9.1</version>
<executions>
<execution>
<id>attach-javadocs</id>