You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by tb...@apache.org on 2005/12/31 20:32:38 UTC

svn commit: r360422 - in /incubator/felix/trunk/tools/maven2/osgi-archetype: ./ src/ src/main/ src/main/resources/ src/main/resources/META-INF/ src/main/resources/archetype-resources/ src/main/resources/archetype-resources/src/ src/main/resources/arche...

Author: tbennett
Date: Sat Dec 31 11:32:20 2005
New Revision: 360422

URL: http://svn.apache.org/viewcvs?rev=360422&view=rev
Log: (empty)

Added:
    incubator/felix/trunk/tools/maven2/osgi-archetype/
    incubator/felix/trunk/tools/maven2/osgi-archetype/pom.xml
    incubator/felix/trunk/tools/maven2/osgi-archetype/src/
    incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/
    incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/
    incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/META-INF/
    incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/META-INF/archetype.xml
    incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/archetype-resources/
    incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/archetype-resources/pom.xml
    incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/archetype-resources/src/
    incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/archetype-resources/src/main/
    incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/archetype-resources/src/main/java/
    incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/archetype-resources/src/main/java/MyBundleActivator.java

Added: incubator/felix/trunk/tools/maven2/osgi-archetype/pom.xml
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/tools/maven2/osgi-archetype/pom.xml?rev=360422&view=auto
==============================================================================
--- incubator/felix/trunk/tools/maven2/osgi-archetype/pom.xml (added)
+++ incubator/felix/trunk/tools/maven2/osgi-archetype/pom.xml Sat Dec 31 11:32:20 2005
@@ -0,0 +1,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/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.felix.archetypes</groupId>
+  <artifactId>osgi-archetype</artifactId>
+  <packaging>maven-plugin</packaging>
+  <version>1.0</version>
+</project>

Added: incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/META-INF/archetype.xml
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/META-INF/archetype.xml?rev=360422&view=auto
==============================================================================
--- incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/META-INF/archetype.xml (added)
+++ incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/META-INF/archetype.xml Sat Dec 31 11:32:20 2005
@@ -0,0 +1,6 @@
+<archetype>
+  <id>osgi-archetype</id>
+  <sources>
+    <source>src/main/java/MyBundleActivator.java</source>
+  </sources>
+</archetype>
\ No newline at end of file

Added: incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/archetype-resources/pom.xml?rev=360422&view=auto
==============================================================================
--- incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/archetype-resources/pom.xml (added)
+++ incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/archetype-resources/pom.xml Sat Dec 31 11:32:20 2005
@@ -0,0 +1,54 @@
+<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/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>${groupId}</groupId>
+  <artifactId>${artifactId}</artifactId>
+  <packaging>osgi-bundle</packaging>
+  <version>${version}</version>
+  <name>My Bundle Project Name Here</name>
+  <url>My Organization URL Here</url>
+  <build>
+    <!--
+    ***********************************************************
+    * Uncomment out to override default jar naming convention *
+    ***********************************************************
+    <finalName>my-bundle</finalName>
+    -->
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix.plugins</groupId>
+        <artifactId>maven-osgi-plugin</artifactId>
+        <extensions>true</extensions>
+        <version>0.3.0</version>
+        <configuration>
+          <!--
+          *************************************************
+          * Uncomment to specify a manifest file to merge *
+          *************************************************
+          <manifestFile>path/to/manifest.mf</manifestFile>
+          -->
+
+          <!--
+          *******************************************************************
+          * See the following link for entry specification                  *
+          * http://docs.safehaus.org/display/OSGI/OSGi+Plugin+for+Maven+2.0 *
+          *******************************************************************
+          -->
+          <osgiManifest>
+            <bundleName>My Bundle Name</bundleName>
+            <bundleActivator>${groupId}.MyBundleActivator</bundleActivator>
+            <bundleVendor>My Organization Name</bundleVendor>
+          </osgiManifest>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>org.osgi</groupId>
+      <artifactId>org.osgi</artifactId>
+      <version>3.0</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file

Added: incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/archetype-resources/src/main/java/MyBundleActivator.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/archetype-resources/src/main/java/MyBundleActivator.java?rev=360422&view=auto
==============================================================================
--- incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/archetype-resources/src/main/java/MyBundleActivator.java (added)
+++ incubator/felix/trunk/tools/maven2/osgi-archetype/src/main/resources/archetype-resources/src/main/java/MyBundleActivator.java Sat Dec 31 11:32:20 2005
@@ -0,0 +1,33 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed 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.
+ *
+ */
+package ${groupId};
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class MyBundleActivator implements BundleActivator {
+
+    public void start(BundleContext bundleContext) throws Exception {
+        // Put code here to initialize your bundle...
+        System.out.println("Bundle started.");
+    }
+
+    public void stop(BundleContext bundleContext) throws Exception {
+        // Put code here to finalize your bundle...
+        System.out.println("Bundle stopped.");
+    }
+}