summaryrefslogtreecommitdiffstats
path: root/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar')
-rw-r--r--sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/META-INF/MANIFEST.MF11
-rw-r--r--sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/pom.xml51
-rw-r--r--sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype-metadata.xml36
-rw-r--r--sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype.xml30
-rw-r--r--sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml81
-rw-r--r--sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java36
-rw-r--r--sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldService.java28
-rw-r--r--sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/helloworld.composite29
9 files changed, 325 insertions, 0 deletions
diff --git a/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/META-INF/MANIFEST.MF b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..1e2a0fbb4d
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-Name: Apache Tuscany SCA Contribution JAR
+Created-By: 1.6.0_07 (Sun Microsystems Inc.)
+Bundle-Vendor: The Apache Software Foundation
+Bundle-Version: 2.0.0
+Bundle-ManifestVersion: 2
+Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
+Bundle-Description: Apache Tuscany SCA Quickstart Archetype
+Bundle-SymbolicName: org.apache.tuscany.sca.archetype.contribution.jar
+Bundle-DocURL: http://www.apache.org/
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
diff --git a/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/pom.xml b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/pom.xml
new file mode 100644
index 0000000000..0b568cb425
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/pom.xml
@@ -0,0 +1,51 @@
+<?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>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>tuscany-contribution-jar</artifactId>
+ <packaging>maven-archetype</packaging>
+ <name>Create an SCA JAR contribution project</name>
+ <description>Create an SCA JAR contribution project</description>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-packaging</artifactId>
+ <version>2.0-alpha-3</version>
+ </extension>
+ </extensions>
+ <plugins>
+ <plugin>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.0-alpha-3</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype-metadata.xml b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype-metadata.xml
new file mode 100644
index 0000000000..46c5cd6dca
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/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="myproject">
+ <fileSets>
+ <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" encoding="UTF-8">
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**/*.xml</include>
+ <include>**/*.composite</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</archetype-descriptor> \ No newline at end of file
diff --git a/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype.xml b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype.xml
new file mode 100644
index 0000000000..69c3fb5ac9
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype.xml
@@ -0,0 +1,30 @@
+<?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>tuscany-contribution-jar</id>
+ <sources>
+ <source>src/main/java/HelloworldImpl.java</source>
+ <source>src/main/java/HelloworldService.java</source>
+ </sources>
+ <resources>
+ <resource>src/main/hello.composite</resource>
+ <resource>src/main/webapp/META-INF/sca-contribution.xml</resource>
+ </resources>
+</archetype> \ No newline at end of file
diff --git a/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml
new file mode 100644
index 0000000000..8b2ad3d3a9
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml
@@ -0,0 +1,81 @@
+<?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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>${groupId}</groupId>
+ <artifactId>${artifactId}</artifactId>
+ <version>${version}</version>
+ <name>${artifactId}</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.oasis-open.sca.j</groupId>
+ <artifactId>sca-caa-apis</artifactId>
+ <version>1.1-CD04</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+ <finalName>${artifactId}</finalName>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <optimise>true</optimise>
+ <debug>true</debug>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.tuscany.maven.plugins</groupId>
+ <artifactId>maven-tuscany-plugin</artifactId>
+ </plugin>
+ </plugins>
+
+ </build>
+
+ <!-- OASIS SVN repo (for sca-api jar) -->
+ <repositories>
+ <repository>
+ <id>oasis.svn</id>
+ <url>http://tools.oasis-open.org/version-control/svn/sca-j/Release/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ </repositories>
+
+</project>
diff --git a/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java
new file mode 100644
index 0000000000..26237c105c
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java
@@ -0,0 +1,36 @@
+/*
+ * 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.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.EagerInit;
+
+@Scope("COMPOSITE") @EagerInit
+public class HelloworldImpl implements HelloworldService {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+ @Init
+ public void init() {
+ System.out.println(sayHello("world"));
+ }
+}
diff --git a/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldService.java b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldService.java
new file mode 100644
index 0000000000..d705564334
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldService.java
@@ -0,0 +1,28 @@
+/*
+ * 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.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloworldService {
+
+ String sayHello(String name);
+
+}
diff --git a/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..960d6a90ae
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.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.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:sample="http://${package}">
+ <deployable composite="sample:${artifactId}"/>
+</contribution>
diff --git a/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/helloworld.composite b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..35970f63ca
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/helloworld.composite
@@ -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.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://${package}"
+ name="${artifactId}">
+
+ <component name="HelloworldComponent">
+ <implementation.java class="${package}.HelloworldImpl"/>
+ </component>
+
+</composite>