SLING-2978 - Create tooling top-level directory and move maven and ide
under it
* moved the maven directory under tooling maven
* adjusted module paths in pom.xml
* updated the scm information in the pom.xml files
* updated the scm information in the README.txt files
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1506645 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..fef64f2
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,27 @@
+Sling Servlet Archetype
+
+Maven archetype for Sling Launchpad Webapp applications.
+
+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/tooling/maven/archetypes/launchpad-webapp
+
+See the Subversion documentation for other source control features.
+
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..3f124b9
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,50 @@
+<?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.
+-->
+<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>
+ <parent>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>sling</artifactId>
+ <version>17</version>
+ <relativePath>../../../parent/pom.xml</relativePath>
+ </parent>
+ <artifactId>sling-launchpad-webapp-archetype</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <packaging>maven-archetype</packaging>
+ <name>Sling Launchpad Webapp Archetype</name>
+ <description>Maven archetype for Sling Launchpad Webapp applications</description>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/tooling/maven/archetypes/launchpad-webapp</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/archetypes/launchpad-webapp</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/tooling/maven/archetypes/launchpad-webapp</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>
+</project>
diff --git a/src/main/resources/META-INF/maven/archetype-metadata.xml b/src/main/resources/META-INF/maven/archetype-metadata.xml
new file mode 100644
index 0000000..36963ea
--- /dev/null
+++ b/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -0,0 +1,36 @@
+<?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-launchpad-webapp">
+ <fileSets>
+ <fileSet filtered="true" encoding="UTF-8">
+ <directory>src/main/bundles</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="false" encoding="UTF-8">
+ <directory>src/main/webapp</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" encoding="UTF-8">
+ <directory>src/test/config</directory>
+ <includes>
+ <include>**/*.xml</include>
+ <include>**/*.properties</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</archetype-descriptor>
diff --git a/src/main/resources/META-INF/maven/archetype.xml b/src/main/resources/META-INF/maven/archetype.xml
new file mode 100644
index 0000000..283cd2c
--- /dev/null
+++ b/src/main/resources/META-INF/maven/archetype.xml
@@ -0,0 +1,23 @@
+<?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-launchpad-webapp</id>
+ <resources>
+ <resource>src/main/bundles/list.xml</resource>
+ <resource>src/main/webapp/WEB-INF/web.xml</resource>
+ </resources>
+ <testResources>
+ <resource>src/test/config/sling.properties</resource>
+ </testResources>
+</archetype>
diff --git a/src/main/resources/archetype-resources/pom.xml b/src/main/resources/archetype-resources/pom.xml
new file mode 100644
index 0000000..5cb5cef
--- /dev/null
+++ b/src/main/resources/archetype-resources/pom.xml
@@ -0,0 +1,84 @@
+#set( $symbol_dollar = '$' )
+<?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.
+-->
+<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>war</packaging>
+ <name>${artifactId} Launchpad Webapp</name>
+ <description>${artifactId} Launchpad Webapp</description>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>maven-launchpad-plugin</artifactId>
+ <version>2.0.10</version>
+ <executions>
+ <execution>
+ <id>prepare-package-war</id>
+ <goals>
+ <goal>prepare-package</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <defaultBundleList>
+ <version>6</version>
+ </defaultBundleList>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>
+ ${symbol_dollar}{project.build.directory}/launchpad-bundles
+ </directory>
+ <targetPath>WEB-INF</targetPath>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+
+ <!--
+ this is to facilitate the easy invocation of the jetty plugin with
+ mvn jetty:run-war
+ -->
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.23</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.launchpad.base</artifactId>
+ <version>2.4.0</version>
+ <type>war</type>
+ <classifier>webapp</classifier>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/src/main/resources/archetype-resources/src/main/bundles/list.xml b/src/main/resources/archetype-resources/src/main/bundles/list.xml
new file mode 100644
index 0000000..e22144a
--- /dev/null
+++ b/src/main/resources/archetype-resources/src/main/bundles/list.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+<bundles>
+ <startLevel level="0">
+ <bundle>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.fileinstall</artifactId>
+ <version>2.0.8</version>
+ </bundle>
+ </startLevel>
+</bundles>
diff --git a/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..46855b7
--- /dev/null
+++ b/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,73 @@
+<?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.
+-->
+<web-app version="2.4"
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>Sling Launchpad Web Application Archetype</display-name>
+
+ <servlet>
+ <display-name>Sling Servlet</display-name>
+ <servlet-name>sling</servlet-name>
+ <servlet-class>
+ org.apache.sling.launchpad.webapp.SlingServlet
+ </servlet-class>
+
+ <!--
+ Any init-params defined for the servlet will overwrite
+ the default settings in the repository.xml file.
+
+ The most important init-param to be set here is the
+ sling.home parameter defining where Sling will place
+ its files such as the bundle cache, logs, configuration,
+ etc.
+
+ If the sling.home parameter is not set a default value is
+ set as ${user.dir}/sling/${context.path} where ${user.dir}
+ is the current working directory and ${context.path} is the
+ servlet context path with slashes replaced by underscores and
+ the root context represented as just a single underscore.
+
+ Example: For Sling deployed in the root context, the default
+ sling.home would be sling/_. For Sling deployed in the context
+ /sling/i1, the default sling.home would be sling/_sling_i1.
+ -->
+ <!--
+ <init-param>
+ <param-name>sling.home</param-name>
+ <param-value> Enter Path Here </param-value>
+ </init-param>
+ -->
+ <load-on-startup>100</load-on-startup>
+ </servlet>
+
+ <!-- Default Mapping for the Context -->
+ <servlet-mapping>
+ <servlet-name>sling</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+ <!-- Overwrite Mappings which may be present in default web.xml files -->
+ <servlet-mapping>
+ <servlet-name>sling</servlet-name>
+ <url-pattern>*.jsp</url-pattern>
+ </servlet-mapping>
+
+</web-app>
diff --git a/src/main/resources/archetype-resources/src/test/config/sling.properties b/src/main/resources/archetype-resources/src/test/config/sling.properties
new file mode 100644
index 0000000..23db9a2
--- /dev/null
+++ b/src/main/resources/archetype-resources/src/test/config/sling.properties
@@ -0,0 +1,13 @@
+# 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.
+#set( $symbol_dollar = '$' )
+felix.fileinstall.dir=${symbol_dollar}{basedir}/src/test/config/fileinstall
+org.osgi.framework.startlevel.beginning=35