From e2eb32676f17d9f7e1fa67902914124f956392cb Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 25 Aug 2008 15:55:15 +0000 Subject: Simplified the distribution builds, use Maven assembly component descriptors to share definitions. Added a few scripts to help maintain some of the descriptors, eventually they should be converted to Maven plugins. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@688767 13f79535-47bb-0310-9956-ffa450edef68 --- .../features/etc/generate-down-dependencies.sh | 70 ++++++++++++++++++++++ .../features/etc/generate-maven-files.sh | 23 +++++++ java/sca/distribution/features/etc/generate-pom.sh | 18 ++---- .../features/etc/generate-src-modules.sh | 66 ++++++++++++++++++++ 4 files changed, 165 insertions(+), 12 deletions(-) create mode 100755 java/sca/distribution/features/etc/generate-down-dependencies.sh create mode 100755 java/sca/distribution/features/etc/generate-maven-files.sh create mode 100755 java/sca/distribution/features/etc/generate-src-modules.sh (limited to 'java/sca/distribution/features/etc') diff --git a/java/sca/distribution/features/etc/generate-down-dependencies.sh b/java/sca/distribution/features/etc/generate-down-dependencies.sh new file mode 100755 index 0000000000..9898835c25 --- /dev/null +++ b/java/sca/distribution/features/etc/generate-down-dependencies.sh @@ -0,0 +1,70 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# This generates a Maven assembly component that can be included in a Maven +# assembly to include the source of the modules in a source distribution. + +echo "" +echo "" +echo " " +echo "" +echo " " +echo " " +echo " modules" +echo " false" +echo " true" +echo " " +echo " org.apache.tuscany.sca:*" +echo " " +echo " " +mvn -o dependency:list | awk '/.INFO. (.*.tuscany.sca):(tuscany-)(.*):(.*):(.*):(.*)/ { print gensub("(.INFO. )(.*)(:)(.*)(:)(.*)(:)(.*)(:)(.*)", "\\2:\\4", "g") }' | sort | awk '{ printf " %s\n", $1 }' +echo " " +echo " " +echo "" +echo " " +echo " " +echo " lib" +echo " false" +echo " true" +echo " " +mvn -o dependency:list | awk '/.INFO. (.*):(.*):(.*):(.*):(.*)/ && !/(.*)(.tuscany.sca):(.*)/ { print gensub("(.INFO. )(.*)(:)(.*)(:)(.*)(:)(.*)(:)(.*)", "\\2:\\4", "g") }' | sort | awk '{ printf " %s\n", $1 }' +echo " org.apache.tuscany.sca:*" +echo " " +echo " " +echo " " + + +echo "" +echo "" + diff --git a/java/sca/distribution/features/etc/generate-maven-files.sh b/java/sca/distribution/features/etc/generate-maven-files.sh new file mode 100755 index 0000000000..ecff6aeab0 --- /dev/null +++ b/java/sca/distribution/features/etc/generate-maven-files.sh @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# This script can be used to generate Maven build POM and assembly files +# for a distribution + +../etc/generate-src-modules.sh > src/main/components/src-modules.xml +../etc/generate-pom.sh > pom.xml + diff --git a/java/sca/distribution/features/etc/generate-pom.sh b/java/sca/distribution/features/etc/generate-pom.sh index cf53e890d9..b901f8cffc 100755 --- a/java/sca/distribution/features/etc/generate-pom.sh +++ b/java/sca/distribution/features/etc/generate-pom.sh @@ -15,26 +15,20 @@ # specific language governing permissions and limitations # under the License. -# After building a distribution, this script can be used to -# generate a Maven build profile that includes all the modules -# included directly or transitively in that distribution +# This script can be used to generate a Maven build profile that includes all +# the modules included directly or transitively in a distribution + +cat pom.xml | awk 'BEGIN { i=0 } // { i=1; print } /.*/ { if (i==0) print } ' echo " " echo " modules" echo " " -unzip -v target/*-SNAPSHOT.zip | awk '/(.*)(\/modules\/tuscany-)(.*)(\..ar$)/ { print gensub("(.*)(/modules/tuscany-)(.*)(-...-SNAPSHOT.jar)", "\\3", "g")}' | sort | awk '{ printf " ../../../modules/%s\n", $1 }' +mvn -o dependency:list | awk '/.INFO. (.*.tuscany.sca):(tuscany-)(.*):(.*):(.*):(.*)/ { print gensub("(.INFO. )(.*)(:)(tuscany-)(.*)(:)(.*)(:)(.*)(:)(.*)", "\\5", "g") }' | sort | awk '{ printf " ../../../modules/%s\n", $1 }' echo " " echo " " echo "" -# This generates a list of includes that can be included in a -# Maven assembly fileset, to include the source of the modules -# in a source distribution for example - -echo " " -unzip -v target/*-SNAPSHOT.zip | awk '/(.*)(\/modules\/tuscany-)(.*)(\..ar$)/ { print gensub("(.*)(/modules/tuscany-)(.*)(-...-SNAPSHOT.jar)", "\\3", "g")}' | sort | awk '{ printf " %s/**/*\n", $1 }' -echo " " -echo "" +cat pom.xml | awk 'BEGIN { i=0 } /<\/profiles>/ { i=1 } /.*/ { if (i==1) print } ' diff --git a/java/sca/distribution/features/etc/generate-src-modules.sh b/java/sca/distribution/features/etc/generate-src-modules.sh new file mode 100755 index 0000000000..198636993d --- /dev/null +++ b/java/sca/distribution/features/etc/generate-src-modules.sh @@ -0,0 +1,66 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# This generates a Maven assembly component that can be included in a Maven +# assembly to include the source of the modules in a source distribution. + +echo "" +echo "" +echo " " +echo "" +echo " " +echo " " +echo " ../../../modules" +echo " modules" +echo " " + +mvn -o dependency:list | awk '/.INFO. (.*.tuscany.sca):(tuscany-)(.*):(.*):(.*):(.*)/ { print gensub("(.INFO. )(.*)(:)(tuscany-)(.*)(:)(.*)(:)(.*)(:)(.*)", "\\5", "g") }' | sort | awk '{ printf " %s/**/*\n", $1 }' + +echo " " +echo " " +echo " " +echo " **/.*" +echo " **/.*/**" +echo " **/*.log" +echo "" +echo " " +echo " pom.xml" +echo " **/target" +echo " **/target/**/*" +echo " " +echo " " +echo " " +echo "" +echo "" + -- cgit v1.2.3