From: Mathieu Baudier Date: Sat, 13 Nov 2021 07:16:16 +0000 (+0100) Subject: Make Maven build compatible withe new BND build. X-Git-Tag: argeo-commons-2.3.2~20 X-Git-Url: https://git.argeo.org/?p=lgpl%2Fargeo-commons.git;a=commitdiff_plain;h=847d4667acda2a8dc0fc324e3cafe6d4a6e067f4 Make Maven build compatible withe new BND build. --- diff --git a/cnf/argeo.bnd b/cnf/argeo.bnd index 25ade707e..f221de0c2 100644 --- a/cnf/argeo.bnd +++ b/cnf/argeo.bnd @@ -1,6 +1,5 @@ # Common qualifier=.next --include: -${workspace}/cnf/release.bnd Bundle-Version: ${version.released}${qualifier} Private-Package: *.internal.* @@ -11,3 +10,5 @@ Export-Package: !*.internal.*; * -source true -removeheaders = Bnd-LastModified,Build-Jdk,Built-By,Tool,Created-By Automatic-Module-Name: ${bsn} +SLC-Category=${category} +-groupid=${category} diff --git a/cnf/build.bnd b/cnf/build.bnd index dd0a48c27..af9c91be7 100644 --- a/cnf/build.bnd +++ b/cnf/build.bnd @@ -1,6 +1,4 @@ -include: \ ${workspace}/cnf/unstable.bnd, \ -${workspace}/cnf/argeo.bnd - -SLC-Category: org.argeo.commons -Bundle-RequiredExecutionEnvironment: JavaSE-11 +${workspace}/cnf/argeo.bnd, \ +-${workspace}/cnf/release.bnd diff --git a/cnf/maven.bnd b/cnf/maven.bnd new file mode 100644 index 000000000..bbd72adec --- /dev/null +++ b/cnf/maven.bnd @@ -0,0 +1,3 @@ +-include: \ +../cnf/unstable.bnd, \ +../cnf/argeo.bnd diff --git a/cnf/unstable.bnd b/cnf/unstable.bnd index 0719f545e..db4fe1b08 100644 --- a/cnf/unstable.bnd +++ b/cnf/unstable.bnd @@ -1 +1,4 @@ -version.released=2.3.1 \ No newline at end of file +category=org.argeo.commons +version.released=2.3.1 +Bundle-RequiredExecutionEnvironment=JavaSE-11 +argeo.rpm.stagingRepository=/srv/rpmfactory/unstable/argeo-osgi-2/argeo diff --git a/dep/cnf/build.bnd b/dep/cnf/build.bnd deleted file mode 100644 index dcbfac9d8..000000000 --- a/dep/cnf/build.bnd +++ /dev/null @@ -1 +0,0 @@ --include: ../../cnf/build.bnd \ No newline at end of file diff --git a/dep/cnf/maven.bnd b/dep/cnf/maven.bnd new file mode 100644 index 000000000..4bd5c0cfe --- /dev/null +++ b/dep/cnf/maven.bnd @@ -0,0 +1 @@ +-include: ../../cnf/maven.bnd \ No newline at end of file diff --git a/dep/pom.xml b/dep/pom.xml index 0f0a97c46..3b991a5f1 100644 --- a/dep/pom.xml +++ b/dep/pom.xml @@ -21,6 +21,16 @@ + + org.codehaus.mojo + properties-maven-plugin + + true + + ../../cnf/unstable.bnd + + + org.apache.felix maven-bundle-plugin diff --git a/dist/pom.xml b/dist/pom.xml index 898c8aa42..f1d24eee0 100644 --- a/dist/pom.xml +++ b/dist/pom.xml @@ -1,5 +1,7 @@ - + 4.0.0 org.argeo.commons @@ -16,4 +18,18 @@ argeo-node containers + + + + org.codehaus.mojo + properties-maven-plugin + + true + + ../../cnf/unstable.bnd + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 9b835da33..42b0e1fa9 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,6 @@ 2.1.27 - /srv/rpmfactory/unstable/argeo-osgi-2/argeo code.argeo.org diff --git a/sdk/a2/.project b/sdk/a2/.project new file mode 100644 index 000000000..f6bf2aaab --- /dev/null +++ b/sdk/a2/.project @@ -0,0 +1,11 @@ + + + argeo-commons-a2 + + + + + + + + diff --git a/sdk/a2/argeo-commons-upstream.target b/sdk/a2/argeo-commons-upstream.target new file mode 100644 index 000000000..5539eee3c --- /dev/null +++ b/sdk/a2/argeo-commons-upstream.target @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sdk/a2/build/.gitignore b/sdk/a2/build/.gitignore new file mode 100644 index 000000000..f09a089f0 --- /dev/null +++ b/sdk/a2/build/.gitignore @@ -0,0 +1,2 @@ +*.*/ +index.xml \ No newline at end of file diff --git a/sdk/a2/upstream/.gitignore b/sdk/a2/upstream/.gitignore new file mode 100644 index 000000000..f09a089f0 --- /dev/null +++ b/sdk/a2/upstream/.gitignore @@ -0,0 +1,2 @@ +*.*/ +index.xml \ No newline at end of file diff --git a/sdk/build.sh b/sdk/build.sh index 7a482932b..4cfd55d27 100644 --- a/sdk/build.sh +++ b/sdk/build.sh @@ -1,13 +1,22 @@ #!/bin/bash +# TODO source files and allow to override +A2_CATEGORY=org.argeo.commons + # Works on Fedora 34 JVM=/usr/lib/jvm/jre-11/bin/java ECJ_JAR=/usr/share/java/ecj/ecj.jar OSGI_JAR=/usr/share/java/eclipse/osgi.jar +SDK_DIR="$(cd "$(dirname "$0")"; pwd -P)" +echo SDK: $SDK_DIR +BUNDLES_BASEDIR="$(cd "$SDK_DIR/.."; pwd -P)" +A2_UPSTREAM="$(cd "$SDK_DIR/a2/upstream"; pwd -P)" +A2_BUILD="$(cd "$SDK_DIR/a2/build"; pwd -P)" + echo PREPARING SOURCE_PATH= -for bundle in ../*.*.*/ ; do +for bundle in $BUNDLES_BASEDIR/*.*.*/ ; do echo $bundle # clean rm -rf $bundle/generated/* @@ -18,12 +27,13 @@ SOURCE_PATH="$SOURCE_PATH $bundle/src[-d $bundle/bin]" done echo COMPILING -$JVM -jar $ECJ_JAR @ecj.args -time -cp $OSGI_JAR:"$(printf %s: target/sdk-*-a2-target/*/*.jar)" $SOURCE_PATH +$JVM -jar $ECJ_JAR @$SDK_DIR/ecj.args -time -cp $OSGI_JAR:"$(printf %s: $A2_UPSTREAM/*/*.jar)" $SOURCE_PATH echo PACKAGING -bnd build +bnd -b $SDK_DIR build -mkdir -p target/a2/org.argeo.commons -cp ../*/generated/*.jar target/a2/org.argeo.commons +mkdir -p $A2_BUILD/$A2_CATEGORY +mv $BUNDLES_BASEDIR/*/generated/*.jar $A2_BUILD/$A2_CATEGORY +bnd index -d $A2_BUILD/ */*.jar -echo DONE \ No newline at end of file +echo DONE diff --git a/sdk/configure.sh b/sdk/configure.sh new file mode 100644 index 000000000..ed8576d75 --- /dev/null +++ b/sdk/configure.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +SDK_DIR="$(cd "$(dirname "$0")"; pwd -P)" +A2_UPSTREAM="$(cd "$SDK_DIR/a2/upstream"; pwd -P)" + + +mvn -f $SDK_DIR clean assembly:single -Pa2-provided +rsync -rv $SDK_DIR/target/sdk-*-a2-provided/ $A2_UPSTREAM +bnd index -d $A2_UPSTREAM/ */*.jar +