Fix iTests issue and add OSGi bundle archetype. git-svn-id: https://svn.apache.org/repos/asf/servicemix/archetypes/trunk@984670 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml index 3dbc6f8..1337301 100644 --- a/pom.xml +++ b/pom.xml
@@ -211,11 +211,12 @@ <module>servicemix-vfs-poller-service-unit</module> <module>servicemix-vfs-sender-service-unit</module> <!-- <module>servicemix-wsn2005-subscribe-service-unit</module> --> - <!-- <module>servicemix-wsn2005-pull-endpoint--> + <!-- <module>servicemix-wsn2005-pull-point-service-unit--> + <!-- <module>servicemix-wsn2005-notify-service-unit --> <!-- <module>servicemix-xmpp-group-chat-service-unit</module> --> <!-- <module>servicemix-xmpp-private-chat-service-unit</module> --> - <!-- <module>servicemix-bundle-osgi</module> --> + <module>servicemix-osgi-bundle</module> <module>servicemix-camel-osgi-bundle</module> <module>servicemix-cxf-code-first-osgi-bundle</module> <module>servicemix-cxf-wsdl-first-osgi-bundle</module> @@ -224,11 +225,7 @@ <module>servicemix-project-root</module> - <!-- - Disabled for now as maven-embedder is not provided for maven 2.2.1 - and jbi-maven-plugin 4.3 needs at least maven 2.2.1. - --> - <!-- <module>servicemix-archetypes-itests</module> --> + <module>servicemix-archetypes-itests</module> </modules> <build>
diff --git a/servicemix-archetypes-itests/pom.xml b/servicemix-archetypes-itests/pom.xml index 48fd485..e84c310 100644 --- a/servicemix-archetypes-itests/pom.xml +++ b/servicemix-archetypes-itests/pom.xml
@@ -1,5 +1,6 @@ <?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"> +<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"> <!-- @@ -36,98 +37,32 @@ <version>1.1</version> </dependency> <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.5</version> + </dependency> + <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-embedder</artifactId> <version>2.0.4</version> </dependency> <dependency> - <groupId>org.apache.maven</groupId> - <artifactId>maven-project</artifactId> - <version>2.2.1</version> + <groupId>org.apache.maven</groupId> + <artifactId>maven-project</artifactId> + <version>2.2.1</version> </dependency> <dependency> - <groupId>org.apache.maven</groupId> - <artifactId>maven-core</artifactId> - <version>2.2.1</version> + <groupId>org.apache.maven</groupId> + <artifactId>maven-core</artifactId> + <version>2.2.1</version> + </dependency> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-toolchain</artifactId> + <version>1.0</version> </dependency> <dependency> - <groupId>org.apache.servicemix.specs</groupId> - <artifactId>org.apache.servicemix.specs.jbi-api-1.0</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-shared</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-utils</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-core</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-bean</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-camel</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-cxf-bc</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-cxf-se</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-eip</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-ftp</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-http</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-jms</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-jsr181</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-lwcontainer</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-mail</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-saxon</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-scripting</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-script</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix</groupId> - <artifactId>servicemix-validation</artifactId> - </dependency> - <dependency> <groupId>org.apache.servicemix.tooling</groupId> <artifactId>servicemix-binding-component</artifactId> <version>${pom.version}</version> @@ -313,12 +248,13 @@ <version>${pom.version}</version> </dependency> </dependencies> - + <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-archetype-plugin</artifactId> + <version>2.0-alpha-5</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -339,5 +275,5 @@ </plugin> </plugins> </build> - + </project>
diff --git a/servicemix-archetypes-itests/src/test/java/org/apache/servicemix/tooling/AbstractArchetypeTest.java b/servicemix-archetypes-itests/src/test/java/org/apache/servicemix/tooling/AbstractArchetypeTest.java index f6abb3b..b4a45b2 100644 --- a/servicemix-archetypes-itests/src/test/java/org/apache/servicemix/tooling/AbstractArchetypeTest.java +++ b/servicemix-archetypes-itests/src/test/java/org/apache/servicemix/tooling/AbstractArchetypeTest.java
@@ -22,11 +22,11 @@ import java.net.URL; import java.util.Collections; import java.util.Properties; -import java.util.UUID; import junit.framework.TestCase; import org.apache.commons.lang.StringUtils; +import org.apache.jackrabbit.uuid.UUID; import org.apache.maven.artifact.manager.WagonManager; import org.apache.maven.cli.ConsoleDownloadMonitor; import org.apache.maven.embedder.MavenEmbedder;
diff --git a/servicemix-archetypes-itests/src/test/java/org/apache/servicemix/tooling/JmsJcaConsumerServiceUnitTest.java b/servicemix-archetypes-itests/src/test/java/org/apache/servicemix/tooling/JmsJcaConsumerServiceUnitTest.java new file mode 100644 index 0000000..3ce9445 --- /dev/null +++ b/servicemix-archetypes-itests/src/test/java/org/apache/servicemix/tooling/JmsJcaConsumerServiceUnitTest.java
@@ -0,0 +1,25 @@ +/* + * 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 org.apache.servicemix.tooling; + +public class JmsJcaConsumerServiceUnitTest extends AbstractArchetypeTest { + + public void testJmsJcaConsumerServiceUnit() throws Exception { + testServiceMixArchetype("jms-jca-consumer-service-unit"); + } + +}
diff --git a/servicemix-archetypes-itests/src/test/java/org/apache/servicemix/tooling/JmsSoapConsumerServiceUnitTest.java b/servicemix-archetypes-itests/src/test/java/org/apache/servicemix/tooling/JmsSoapConsumerServiceUnitTest.java new file mode 100644 index 0000000..27021db --- /dev/null +++ b/servicemix-archetypes-itests/src/test/java/org/apache/servicemix/tooling/JmsSoapConsumerServiceUnitTest.java
@@ -0,0 +1,25 @@ +/* + * 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 org.apache.servicemix.tooling; + +public class JmsSoapConsumerServiceUnitTest extends AbstractArchetypeTest { + + public void testJmsSoapConsumerServiceUnit() throws Exception { + testServiceMixArchetype("jms-soap-consumer-service-unit"); + } + +}
diff --git a/servicemix-archetypes-itests/src/test/java/org/apache/servicemix/tooling/JmsSoapProviderServiceUnitTest.java b/servicemix-archetypes-itests/src/test/java/org/apache/servicemix/tooling/JmsSoapProviderServiceUnitTest.java new file mode 100644 index 0000000..9c812ee --- /dev/null +++ b/servicemix-archetypes-itests/src/test/java/org/apache/servicemix/tooling/JmsSoapProviderServiceUnitTest.java
@@ -0,0 +1,25 @@ +/* + * 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 org.apache.servicemix.tooling; + +public class JmsSoapProviderServiceUnitTest extends AbstractArchetypeTest { + + public void testJmsSoapProviderServiceUnit() throws Exception { + testServiceMixArchetype("jms-soap-provider-service-unit"); + } + +}
diff --git a/servicemix-archetypes-itests/src/test/java/org/apache/servicemix/tooling/OsgiBundleTest.java b/servicemix-archetypes-itests/src/test/java/org/apache/servicemix/tooling/OsgiBundleTest.java new file mode 100644 index 0000000..dc39acf --- /dev/null +++ b/servicemix-archetypes-itests/src/test/java/org/apache/servicemix/tooling/OsgiBundleTest.java
@@ -0,0 +1,25 @@ +/* + * 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 org.apache.servicemix.tooling; + +public class OsgiBundleTest extends AbstractArchetypeTest { + + public void testOsgiBundle() throws Exception { + testServiceMixArchetype("osgi-bundle"); + } + +}
diff --git a/servicemix-osgi-bundle/pom.xml b/servicemix-osgi-bundle/pom.xml new file mode 100644 index 0000000..89e7a5a --- /dev/null +++ b/servicemix-osgi-bundle/pom.xml
@@ -0,0 +1,33 @@ +<?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"> + + <!-- + + 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. + --> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.servicemix</groupId> + <artifactId>archetypes</artifactId> + <version>2010.01-SNAPSHOT</version> + </parent> + + <groupId>org.apache.servicemix.tooling</groupId> + <artifactId>servicemix-osgi-bundle</artifactId> + <name>Apache ServiceMix :: Archetypes :: OSGi Bundle</name> + +</project> \ No newline at end of file
diff --git a/servicemix-osgi-bundle/src/main/resources/META-INF/maven/archetype.xml b/servicemix-osgi-bundle/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000..4eae717 --- /dev/null +++ b/servicemix-osgi-bundle/src/main/resources/META-INF/maven/archetype.xml
@@ -0,0 +1,20 @@ +<?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>servicemix-osgi-bundle</id> +</archetype> \ No newline at end of file
diff --git a/servicemix-osgi-bundle/src/main/resources/archetype-resources/pom.xml b/servicemix-osgi-bundle/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000..6354aa7 --- /dev/null +++ b/servicemix-osgi-bundle/src/main/resources/archetype-resources/pom.xml
@@ -0,0 +1,105 @@ +<?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"> + + <!-- + + 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. + --> + + <modelVersion>4.0.0</modelVersion> + + <groupId>${groupId}</groupId> + <artifactId>${artifactId}</artifactId> + <packaging>bundle</packaging> + <version>${version}</version> + <name>Apache ServiceMix :: Wrapper OSGi Bundle</name> + + <properties> + <pkgGroupId>put your wrapped artifact groupId here</pkgGroupId> + <pkgArtifactId>put your wrapped artifact artifactId here</pkgArtifactId> + <pkgVersion>put your wrapped artifact version here</pkgVersion> + <servicemix.osgi.export.pkg> + put the wrapped artifact export package here + </servicemix.osgi.export.pkg> + <servicemix.osgi.import.pkg> + put the wrapped artifact import packages here, + * + </servicemix.osgi.import.pkg> + </properties> + + <dependencies> + <dependency> + <groupId>${pkgGroupId}</groupId> + <artifactId>${pkgArtifactId}</artifactId> + <version>${pkgVersion}</version> + <optional>true</optional> + </dependency> + </dependencies> + + <build> + <defaultGoal>install</defaultGoal> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <version>@{maven-bundle-plugin.version}</version> + <extensions>true</extensions> + <configuration> + <instructions> + <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName> + <Export-Package>${servicemix.osgi.export.pkg}*;version=${pkgVersion};-split-package:=merge-first</Export-Package> + <Import-Package>${servicemix.osgi.import.pkg}*</Import-Package> + <Private-Package></Private-Package> + <DynamicImport-Package></DynamicImport-Package> + <Embed-Dependency></Embed-Dependency> + <_failok>false</_failok> + <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy> + <_removeheaders>Ignore-Package,Include-Resource,Private-Package,Embed-Dependency</_removeheaders> + </instructions> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + <configuration> + <artifactSet> + <includes> + <include>${pkgGroupId}:${pkgArtifactId}</include> + </includes> + </artifactSet> + <filters> + <filter> + <artifact>${pkgGroupId}:${pkgArtifactId}</artifact> + <excludes> + <exclude>**</exclude> + </excludes> + </filter> + </filters> + <promoteTransitiveDependencies>true</promoteTransitiveDependencies> + <createDependencyReducedPom>true</createDependencyReducedPom> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + +</project> \ No newline at end of file
diff --git a/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/xbean.xml b/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/xbean.xml index 953c6d2..f706e9f 100644 --- a/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/xbean.xml +++ b/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/xbean.xml
@@ -24,7 +24,7 @@ xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://servicemix.apache.org/scripting/1.0 http://servicemix.apache.org/schema/servicemix-scripting-@{components-version}.xsd - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd" + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> <!-- BEGIN SNIPPET: groovy-jsr223 -->