incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r1152996 - in /sling/trunk/maven/archetypes/bundle-for-jcrinstall: ./ src/ src/main/ src/main/resources/ src/main/resources/META-INF/ src/main/resources/META-INF/maven/ src/main/resources/archetype-resources/ src/main/resources/archetype-re...
Date Tue, 02 Aug 2011 02:00:39 GMT
Author: justin
Date: Tue Aug  2 02:00:37 2011
New Revision: 1152996

URL: http://svn.apache.org/viewvc?rev=1152996&view=rev
Log:
SLING-2146 - adding second bundle archetype - this one installs via JCR Install

Added:
    sling/trunk/maven/archetypes/bundle-for-jcrinstall/
    sling/trunk/maven/archetypes/bundle-for-jcrinstall/README.txt
    sling/trunk/maven/archetypes/bundle-for-jcrinstall/pom.xml
    sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/
    sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/
    sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/
    sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/META-INF/
    sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/META-INF/maven/
    sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/META-INF/maven/archetype-metadata.xml
    sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/META-INF/maven/archetype.xml
    sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/
    sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/pom.xml
    sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/src/
    sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/src/main/
    sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/src/main/java/
    sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java

Added: sling/trunk/maven/archetypes/bundle-for-jcrinstall/README.txt
URL: http://svn.apache.org/viewvc/sling/trunk/maven/archetypes/bundle-for-jcrinstall/README.txt?rev=1152996&view=auto
==============================================================================
--- sling/trunk/maven/archetypes/bundle-for-jcrinstall/README.txt (added)
+++ sling/trunk/maven/archetypes/bundle-for-jcrinstall/README.txt Tue Aug  2 02:00:37 2011
@@ -0,0 +1,27 @@
+Sling JCRInstall Bundle Archetype
+
+Maven archetype for OSGi bundles installed via JCR Install.
+
+Getting Started
+===============
+
+This component uses a Maven 2 (http://maven.apache.org/) build
+environment. It requires a Java 5 JDK (or higher) and Maven (http://maven.apache.org/)
+2.0.7 or later. We recommend to use the latest Maven version.
+
+If you have Maven 2 installed, you can install the jar into your local Maven repository
+using the following command:
+
+    mvn install
+
+See the Maven 2 documentation for other build features.
+
+The latest source code for this component is available in the
+Subversion (http://subversion.tigris.org/) source repository of
+the Apache Software Foundation. If you have Subversion installed,
+you can checkout the latest source using the following command:
+
+    svn checkout http://svn.apache.org/repos/asf/sling/trunk/maven/archetypes/bundle
+
+See the Subversion documentation for other source control features.
+

Added: sling/trunk/maven/archetypes/bundle-for-jcrinstall/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/maven/archetypes/bundle-for-jcrinstall/pom.xml?rev=1152996&view=auto
==============================================================================
--- sling/trunk/maven/archetypes/bundle-for-jcrinstall/pom.xml (added)
+++ sling/trunk/maven/archetypes/bundle-for-jcrinstall/pom.xml Tue Aug  2 02:00:37 2011
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  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.
+-->
+<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>
+    <parent>
+        <groupId>org.apache.sling</groupId>
+        <artifactId>sling</artifactId>
+        <version>11-SNAPSHOT</version>
+        <relativePath>../../../parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>sling-jcrinstall-bundle-archetype</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>maven-archetype</packaging>
+
+    <name>Sling JCRInstall Bundle Archetype</name>
+    <description>Maven archetype for a generic OSGi bundle installed via JCR Install.</description>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/maven/archetypes/bundle-for-jcrinstall</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/maven/archetypes/bundle-for-jcrinstall</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/maven/archetypes/bundle-for-jcrinstall</url>
+    </scm>
+
+    <build>
+        <extensions>
+            <extension>
+                <groupId>org.apache.maven.archetype</groupId>
+                <artifactId>archetype-packaging</artifactId>
+                <version>2.0-alpha-4</version>
+            </extension>
+        </extensions>
+        <plugins>
+            <plugin>
+                <artifactId>maven-archetype-plugin</artifactId>
+                <version>2.0-alpha-4</version>
+                <extensions>true</extensions>
+            </plugin>
+        </plugins>
+    </build>
+
+        <reporting>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-plugin-plugin</artifactId>
+                    <version>2.5.1</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-javadoc-plugin</artifactId>
+                    <configuration>
+                        <!-- No javadocs -->
+                        <excludePackageNames>
+                            org.apache.sling
+                        </excludePackageNames>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </reporting>
+</project>

Added: sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/META-INF/maven/archetype-metadata.xml
URL: http://svn.apache.org/viewvc/sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1152996&view=auto
==============================================================================
--- sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/META-INF/maven/archetype-metadata.xml
(added)
+++ sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/META-INF/maven/archetype-metadata.xml
Tue Aug  2 02:00:37 2011
@@ -0,0 +1,29 @@
+<?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 name="sling-bundle">
+    <fileSets>
+        <fileSet filtered="true" packaged="true" encoding="UTF-8">
+            <directory>src/main/java</directory>
+            <includes>
+                <include>**/*.java</include>
+            </includes>
+        </fileSet>
+        <fileSet filtered="true" packaged="true" encoding="UTF-8">
+          <directory>src/test/java</directory>
+          <includes>
+            <include>**/*.java</include>
+          </includes>
+        </fileSet>
+    </fileSets>
+</archetype-descriptor>

Added: sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/META-INF/maven/archetype.xml
URL: http://svn.apache.org/viewvc/sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/META-INF/maven/archetype.xml?rev=1152996&view=auto
==============================================================================
--- sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/META-INF/maven/archetype.xml
(added)
+++ sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/META-INF/maven/archetype.xml
Tue Aug  2 02:00:37 2011
@@ -0,0 +1,19 @@
+<?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>
+    <id>sling-bundle</id>
+    <sources>
+        <source>src/main/java/SimpleDSComponent.java</source>
+    </sources>
+</archetype>

Added: sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/pom.xml?rev=1152996&view=auto
==============================================================================
--- sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/pom.xml
(added)
+++ sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/pom.xml
Tue Aug  2 02:00:37 2011
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  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.
+-->
+<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>bundle</packaging>
+    <version>${version}</version>
+    <name>${artifactId}</name>
+    <description>${groupId} - ${artifactId}</description>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+                <version>1.7.2</version>
+                <executions>
+                    <execution>
+                        <id>generate-scr-descriptor</id>
+                        <goals>
+                            <goal>scr</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <version>2.0.1</version>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <!-- use version 2.3.2 to have java 1.5 as the default -->
+                <version>2.3.2</version>
+            </plugin>
+        </plugins>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <version>4.2.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>4.2.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.jcr</groupId>
+            <artifactId>jcr</artifactId>
+            <version>2.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.api</artifactId>
+            <version>2.2.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.5.10</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+            <version>1.6.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>3.8.1</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <profiles>
+        <profile>
+            <id>autoInstallBundle</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.sling</groupId>
+                        <artifactId>maven-sling-plugin</artifactId>
+                        <version>2.0.4-incubator</version>
+                        <executions>
+                            <execution>
+                                <id>install-bundle</id>
+                                <goals>
+                                    <goal>install</goal>
+                                </goals>
+                                <configuration>
+                                    <slingUrl>http://localhost:8888/libs/sling/install</slingUrl>
+                                    <!--
+                                    Alternatively:
+                                    <slingUrl>http://localhost:8888</slingUrl>
+                                    <slingUrlSuffix>/libs/sling/install</slingUrlSuffix>
+                                    -->
+                                    <usePut>true</usePut>
+                                    <user>admin</user>
+                                    <password>admin</password>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>

Added: sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java
URL: http://svn.apache.org/viewvc/sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java?rev=1152996&view=auto
==============================================================================
--- sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java
(added)
+++ sling/trunk/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java
Tue Aug  2 02:00:37 2011
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+package ${package};
+
+
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Service;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.service.component.ComponentContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Just a simple DS Component
+ */
+@Component(metatype=true)
+@Service
+public class SimpleDSComponent implements Runnable {
+    
+    private Logger logger = LoggerFactory.getLogger(this.getClass());
+    
+    private BundleContext bundleContext;
+    
+    public void run() {
+        logger.info("Running...");
+    }
+    
+    protected void activate(ComponentContext ctx) {
+        this.bundleContext = bundleContext;
+    }
+    
+    protected void deactivate() {
+        this.bundleContext = null;
+    }
+
+}
+



Mime
View raw message