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/18 09:30:26 UTC
svn commit: r1220351 - in /karaf/branches/karaf-2.2.x/archetypes: ./ bundle/
bundle/sc/ bundle/sc/main/ bundle/sc/main/resources/
bundle/sc/main/resources/META-INF/ bundle/sc/main/resources/META-INF/maven/
bundle/sc/main/resources/archetype-resources/ ...
Author: jbonofre
Date: Sun Dec 18 08:30:25 2011
New Revision: 1220351
URL: http://svn.apache.org/viewvc?rev=1220351&view=rev
Log:
[KARAF-1109] Add bundle archetype
Added:
karaf/branches/karaf-2.2.x/archetypes/bundle/
karaf/branches/karaf-2.2.x/archetypes/bundle/NOTICE
karaf/branches/karaf-2.2.x/archetypes/bundle/pom.xml
- copied, changed from r1215520, karaf/branches/karaf-2.2.x/archetypes/pom.xml
karaf/branches/karaf-2.2.x/archetypes/bundle/sc/
karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/
karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/
karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/META-INF/
karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/META-INF/maven/
karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/META-INF/maven/archetype-metadata.xml
karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/archetype-resources/
karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/archetype-resources/pom.xml
karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/archetype-resources/src/
karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/archetype-resources/src/main/
karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/archetype-resources/src/main/java/
karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/archetype-resources/src/main/java/Activator.java
Modified:
karaf/branches/karaf-2.2.x/archetypes/pom.xml
Added: karaf/branches/karaf-2.2.x/archetypes/bundle/NOTICE
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/archetypes/bundle/NOTICE?rev=1220351&view=auto
==============================================================================
--- karaf/branches/karaf-2.2.x/archetypes/bundle/NOTICE (added)
+++ karaf/branches/karaf-2.2.x/archetypes/bundle/NOTICE Sun Dec 18 08:30:25 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/bundle/pom.xml (from r1215520, karaf/branches/karaf-2.2.x/archetypes/pom.xml)
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/archetypes/bundle/pom.xml?p2=karaf/branches/karaf-2.2.x/archetypes/bundle/pom.xml&p1=karaf/branches/karaf-2.2.x/archetypes/pom.xml&r1=1215520&r2=1220351&rev=1220351&view=diff
==============================================================================
--- karaf/branches/karaf-2.2.x/archetypes/pom.xml (original)
+++ karaf/branches/karaf-2.2.x/archetypes/bundle/pom.xml Sun Dec 18 08:30:25 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.
@@ -17,26 +18,39 @@
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>assembly</module>
- <module>blueprint</module>
- <module>command</module>
- <module>itests</module>
- </modules>
+ <groupId>org.apache.karaf.archetypes</groupId>
+ <artifactId>karaf-bundle-archetype</artifactId>
+ <packaging>maven-archetype</packaging>
+ <name>Apache Karaf :: Archetypes :: Bundle 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>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
-</project>
+</project>
\ No newline at end of file
Added: karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/META-INF/maven/archetype-metadata.xml
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/META-INF/maven/archetype-metadata.xml?rev=1220351&view=auto
==============================================================================
--- karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/META-INF/maven/archetype-metadata.xml (added)
+++ karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/META-INF/maven/archetype-metadata.xml Sun Dec 18 08:30:25 2011
@@ -0,0 +1,32 @@
+<?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"
+ xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="karaf-bundle-archetype">
+
+ <fileSets>
+ <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+
+</archetype-descriptor>
\ No newline at end of file
Added: karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/archetype-resources/pom.xml?rev=1220351&view=auto
==============================================================================
--- karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/archetype-resources/pom.xml (added)
+++ karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/archetype-resources/pom.xml Sun Dec 18 08:30:25 2011
@@ -0,0 +1,52 @@
+<?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>bundle</packaging>
+
+ <name>${artifactId} Bundle</name>
+ <description>
+ ${artifactId} OSGi bundle project.
+ </description>
+
+ <properties>
+ <maven-bundle-plugin.version>2.3.6</maven-bundle-plugin.version>
+ <osgi.version>4.2.0</osgi.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <version>${osgi.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>${maven-bundle-plugin.version}</version>
+ <extensions>true</extensions>
+ <configuration>
+ <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+ <Bundle-Version>${project.version}</Bundle-Version>
+ <Bundle-Activator>${package}.Activator</Bundle-Activator>
+ <Export-Package>
+ ${package}*;version=${project.version}
+ </Export-Package>
+ <Import-Package>
+ *
+ </Import-Package>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
Added: karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/archetype-resources/src/main/java/Activator.java
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/archetype-resources/src/main/java/Activator.java?rev=1220351&view=auto
==============================================================================
--- karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/archetype-resources/src/main/java/Activator.java (added)
+++ karaf/branches/karaf-2.2.x/archetypes/bundle/sc/main/resources/archetype-resources/src/main/java/Activator.java Sun Dec 18 08:30:25 2011
@@ -0,0 +1,16 @@
+package ${package};
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ public void start(BundleContext context) {
+ System.out.println("Starting the bundle");
+ }
+
+ public void stop(BundleContext context) {
+ System.out.println("Stopping the bundle");
+ }
+
+}
\ 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=1220351&r1=1220350&r2=1220351&view=diff
==============================================================================
--- karaf/branches/karaf-2.2.x/archetypes/pom.xml (original)
+++ karaf/branches/karaf-2.2.x/archetypes/pom.xml Sun Dec 18 08:30:25 2011
@@ -35,6 +35,7 @@
<modules>
<module>assembly</module>
<module>blueprint</module>
+ <module>bundle</module>
<module>command</module>
<module>itests</module>
</modules>