You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2011/12/16 17:41:20 UTC

svn commit: r1215215 - in /karaf/branches/karaf-2.2.x/archetypes: ./ assembly/ assembly/src/ assembly/src/main/ assembly/src/main/resources/ assembly/src/main/resources/META-INF/ assembly/src/main/resources/META-INF/maven/ assembly/src/main/resources/a...

Author: jbonofre
Date: Fri Dec 16 16:41:20 2011
New Revision: 1215215

URL: http://svn.apache.org/viewvc?rev=1215215&view=rev
Log:
[KARAF-1109] Add a karaf-assembly-archetype

Added:
    karaf/branches/karaf-2.2.x/archetypes/assembly/
    karaf/branches/karaf-2.2.x/archetypes/assembly/NOTICE
    karaf/branches/karaf-2.2.x/archetypes/assembly/pom.xml
      - copied, changed from r1214650, karaf/branches/karaf-2.2.x/archetypes/pom.xml
    karaf/branches/karaf-2.2.x/archetypes/assembly/src/
    karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/
    karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/
    karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/META-INF/
    karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/META-INF/maven/
    karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/META-INF/maven/archetype-metadata.xml
    karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/
    karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/pom.xml
    karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/
    karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/
    karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/descriptors/
    karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/descriptors/unix-bin.xml
    karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/descriptors/windows-bin.xml
    karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/filtered-resources/
    karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/filtered-resources/etc/
    karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/filtered-resources/etc/my.bundle.cfg
Modified:
    karaf/branches/karaf-2.2.x/archetypes/pom.xml

Added: karaf/branches/karaf-2.2.x/archetypes/assembly/NOTICE
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/archetypes/assembly/NOTICE?rev=1215215&view=auto
==============================================================================
--- karaf/branches/karaf-2.2.x/archetypes/assembly/NOTICE (added)
+++ karaf/branches/karaf-2.2.x/archetypes/assembly/NOTICE Fri Dec 16 16:41:20 2011
@@ -0,0 +1,48 @@
+Apache Karaf
+Copyright 2010 The Apache Software Foundation
+
+
+I. Included Software
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+Licensed under the Apache License 2.0.
+
+This product includes software written by
+Antony Lesuisse.
+Licensed under Public Domain.
+
+
+II. Used Software
+
+This product uses software developed at
+The OSGi Alliance (http://www.osgi.org/).
+Copyright (c) OSGi Alliance (2000, 2010).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+OPS4J (http://www.ops4j.org/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+FUSE Source (http://www.fusesource.org/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+Tanuki Software (http://www.tanukisoftware.com/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+JLine (http://jline.sourceforge.net).
+Licensed under the BSD License.
+
+This product uses software developed at
+SLF4J (http://www.slf4j.org/).
+Licensed under the MIT License.
+
+This product includes software from http://www.json.org.
+Copyright (c) 2002 JSON.org
+
+
+III. License Summary
+- Apache License 2.0

Copied: karaf/branches/karaf-2.2.x/archetypes/assembly/pom.xml (from r1214650, karaf/branches/karaf-2.2.x/archetypes/pom.xml)
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/archetypes/assembly/pom.xml?p2=karaf/branches/karaf-2.2.x/archetypes/assembly/pom.xml&p1=karaf/branches/karaf-2.2.x/archetypes/pom.xml&r1=1214650&r2=1215215&rev=1215215&view=diff
==============================================================================
--- karaf/branches/karaf-2.2.x/archetypes/pom.xml (original)
+++ karaf/branches/karaf-2.2.x/archetypes/assembly/pom.xml Fri Dec 16 16:41:20 2011
@@ -2,6 +2,7 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
     <!--
+
         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.
@@ -9,7 +10,7 @@
         (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
+           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,
@@ -17,24 +18,40 @@
         See the License for the specific language governing permissions and
         limitations under the License.
     -->
-    
+
     <modelVersion>4.0.0</modelVersion>
-    
+
     <parent>
         <groupId>org.apache.karaf</groupId>
-        <artifactId>karaf</artifactId>
+        <artifactId>archetypes</artifactId>
         <version>2.2.5-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <artifactId>archetypes</artifactId>
-
-    <name>Apache Karaf :: Archetypes</name>
-    <packaging>pom</packaging>
-
-    <modules>
-        <module>command</module>
-        <module>itests</module>
-    </modules>
+    <groupId>org.apache.karaf.archetypes</groupId>
+    <artifactId>karaf-assembly-archetype</artifactId>
+    <packaging>maven-archetype</packaging>
+    <name>Apache Karaf :: Archetypes :: Assembly Archetype</name>
+
+    <build>
+
+        <extensions>
+            <extension>
+                <groupId>org.apache.maven.archetype</groupId>
+                <artifactId>archetype-packaging</artifactId>
+                <version>2.2</version>
+            </extension>
+        </extensions>
+
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-archetype-plugin</artifactId>
+                    <extensions>true</extensions>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
 
-</project>
+</project>
\ No newline at end of file

Added: karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/META-INF/maven/archetype-metadata.xml
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1215215&view=auto
==============================================================================
--- karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/META-INF/maven/archetype-metadata.xml (added)
+++ karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/META-INF/maven/archetype-metadata.xml Fri Dec 16 16:41:20 2011
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<archetype-descriptor
+        xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
+        name="org.apache.karaf.archetypes.command"
+        xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+    <fileSets>
+        <fileSet filtered="true" encoding="UTF-8">
+            <directory>src/main/descriptors</directory>
+            <includes>
+                <include>**/*.xml</include>
+            </includes>
+        </fileSet>
+        <fileSet filtered="true" encoding="UTF-8">
+            <directory>src/main/filtered-resources</directory>
+            <includes>
+                <include>**/*</include>
+            </includes>
+        </fileSet>
+        <fileSet filtered="true" encoding="UTF-8">
+            <directory></directory>
+            <includes>
+                <include>pom.xml</include>
+            </includes>
+        </fileSet>
+    </fileSets>
+
+</archetype-descriptor>

Added: karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/pom.xml?rev=1215215&view=auto
==============================================================================
--- karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/pom.xml (added)
+++ karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/pom.xml Fri Dec 16 16:41:20 2011
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>${groupId}</groupId>
+    <artifactId>${artifactId}</artifactId>
+    <version>${version}</version>
+    <packaging>pom</packaging>
+    <name>${artifactId} Karaf Assembly</name>
+    <description>
+        This project creates a Karaf custom distribution that you can customize to fit your needs.
+    </description>
+
+    <properties>
+        <karaf.version>2.2.5-SNAPSHOT</karaf.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf</groupId>
+            <artifactId>apache-karaf</artifactId>
+            <version>${karaf.version}</version>
+            <type>zip</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf</groupId>
+            <artifactId>apache-karaf</artifactId>
+            <version>${karaf.version}</version>
+            <type>tar.gz</type>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>${project.basedir}/src/main/filtered-resources</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>**/*</include>
+                </includes>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-unix</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.karaf</groupId>
+                                    <artifactId>apache-karaf</artifactId>
+                                    <type>tar.gz</type>
+                                    <outputDirectory>target/dependencies/unix</outputDirectory>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>unpack-windows</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.karaf</groupId>
+                                    <artifactId>apache-karaf</artifactId>
+                                    <type>zip</type>
+                                    <outputDirectory>target/dependencies/windows</outputDirectory>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unix-bin</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/descriptors/unix-bin.xml</descriptor>
+                            </descriptors>
+                            <finalName>${project.artifactId}-${project.version}</finalName>
+                            <tarLongFileMode>gnu</tarLongFileMode>
+                            <appendAssemblyId>false</appendAssemblyId>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>unix-windows</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/descriptors/windows-bin.xml</descriptor>
+                            </descriptors>
+                            <finalName>${project.artifactId}-${project.version}</finalName>
+                            <appendAssemblyId>false</appendAssemblyId>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file

Added: karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/descriptors/unix-bin.xml
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/descriptors/unix-bin.xml?rev=1215215&view=auto
==============================================================================
--- karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/descriptors/unix-bin.xml (added)
+++ karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/descriptors/unix-bin.xml Fri Dec 16 16:41:20 2011
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<assembly>
+
+    <id>unix-bin</id>
+
+    <formats>
+        <format>tar.gz</format>
+    </formats>
+
+    <fileSets>
+
+        <!-- Karaf runtime -->
+        <fileSet>
+            <directory>target/dependencies/unix/apache-karaf-${karaf.version}</directory>
+            <outputDirectory>/</outputDirectory>
+            <excludes>
+                <exclude>**/demos/**</exclude>
+                <exclude>bin/**</exclude>
+                <exclude>karaf-manual*.*</exclude>
+            </excludes>
+        </fileSet>
+
+        <!-- Copy over bin/* separately to get the correct file mode -->
+        <fileSet>
+            <directory>target/dependencies/unix/apache-karaf-${karaf.version}</directory>
+            <outputDirectory>/</outputDirectory>
+            <includes>
+                <include>bin/admin</include>
+                <include>bin/karaf</include>
+                <include>bin/start</include>
+                <include>bin/stop</include>
+            </includes>
+            <fileMode>0755</fileMode>
+        </fileSet>
+
+    </fileSets>
+
+    <files>
+
+        <file>
+            <source>${project.basedir}/target/dependencies/unix/apache-karaf-${karaf.version}/bin/karaf</source>
+            <outputDirectory>/bin</outputDirectory>
+            <destName>custom</destName>
+            <fileMode>0755</fileMode>
+            <lineEnding>unix</lineEnding>
+        </file>
+
+    </files>
+
+</assembly>
\ No newline at end of file

Added: karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/descriptors/windows-bin.xml
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/descriptors/windows-bin.xml?rev=1215215&view=auto
==============================================================================
--- karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/descriptors/windows-bin.xml (added)
+++ karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/descriptors/windows-bin.xml Fri Dec 16 16:41:20 2011
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<assembly>
+
+    <id>windows-bin</id>
+
+    <formats>
+        <format>zip</format>
+    </formats>
+
+    <fileSets>
+
+        <!-- Karaf runtime -->
+        <fileSet>
+            <directory>target/dependencies/windows/apache-karaf-${karaf.version}</directory>
+            <outputDirectory>/</outputDirectory>
+            <excludes>
+                <exclude>**/demos/**</exclude>
+                <exclude>bin/**</exclude>
+                <exclude>karaf-manual*.*</exclude>
+            </excludes>
+        </fileSet>
+
+        <!-- Copy over bin/* separately to get the correct file mode -->
+        <fileSet>
+            <directory>target/dependencies/windows/apache-karaf-${karaf.version}</directory>
+            <outputDirectory>/</outputDirectory>
+            <includes>
+                <include>bin/admin.bat</include>
+                <include>bin/karaf.bat</include>
+                <include>bin/start.bat</include>
+                <include>bin/stop.bat</include>
+            </includes>
+            <fileMode>0755</fileMode>
+        </fileSet>
+
+    </fileSets>
+
+    <files>
+
+        <file>
+            <source>${project.basedir}/target/dependencies/windows/apache-karaf-${karaf.version}/bin/karaf.bat</source>
+            <outputDirectory>/bin</outputDirectory>
+            <destName>custom.bat</destName>
+            <fileMode>0755</fileMode>
+            <lineEnding>unix</lineEnding>
+        </file>
+
+    </files>
+
+</assembly>
\ No newline at end of file

Added: karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/filtered-resources/etc/my.bundle.cfg
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/filtered-resources/etc/my.bundle.cfg?rev=1215215&view=auto
==============================================================================
--- karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/filtered-resources/etc/my.bundle.cfg (added)
+++ karaf/branches/karaf-2.2.x/archetypes/assembly/src/main/resources/archetype-resources/src/main/filtered-resources/etc/my.bundle.cfg Fri Dec 16 16:41:20 2011
@@ -0,0 +1,2 @@
+# Custom configuration file
+key = value
\ No newline at end of file

Modified: karaf/branches/karaf-2.2.x/archetypes/pom.xml
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/archetypes/pom.xml?rev=1215215&r1=1215214&r2=1215215&view=diff
==============================================================================
--- karaf/branches/karaf-2.2.x/archetypes/pom.xml (original)
+++ karaf/branches/karaf-2.2.x/archetypes/pom.xml Fri Dec 16 16:41:20 2011
@@ -33,6 +33,7 @@
     <packaging>pom</packaging>
 
     <modules>
+        <module>assembly</module>
         <module>command</module>
         <module>itests</module>
     </modules>