Author: jm
Date: 2011-10-05 14:16:04 -0700 (Wed, 05 Oct 2011)
New Revision: 27071
Added:
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/archetype-resources/src/main/java/internal/CyActivator.java
Removed:
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/META-INF/maven/archetype.xml
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/archetype-resources/src/main/resources/META-INF/
Modified:
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/archetype-resources/osgi.bnd
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/archetype-resources/pom.xml
Log:
Updated api-provider-plugin archetype:
- Updated to use Maven 2 archetype descriptor
- Ported to use CyActivator instead of Spring
Added:
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml
===================================================================
---
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml
(rev 0)
+++
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml
2011-10-05 21:16:04 UTC (rev 27071)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archetype-descriptor
+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0
http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
+ name="api-provider-plugin"
+
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <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>
+ </includes>
+ </fileSet>
+ <fileSet encoding="UTF-8">
+ <directory></directory>
+ <includes>
+ <include>osgi.bnd</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</archetype-descriptor>
Deleted:
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/META-INF/maven/archetype.xml
===================================================================
---
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/META-INF/maven/archetype.xml
2011-10-05 20:56:51 UTC (rev 27070)
+++
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/META-INF/maven/archetype.xml
2011-10-05 21:16:04 UTC (rev 27071)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><archetype>
- <id>api-provider-plugin</id>
- <sources>
- <source>src/main/java/internal/SampleAnalyzerImpl.java</source>
- <source>src/main/java/SampleAnalyzer.java</source>
- </sources>
- <resources>
-
<resource>src/main/resources/META-INF/spring/bundle-context-osgi.xml</resource>
- <resource>src/main/resources/META-INF/spring/bundle-context.xml</resource>
- <resource>osgi.bnd</resource>
- </resources>
-</archetype>
Modified:
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/archetype-resources/osgi.bnd
===================================================================
---
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/archetype-resources/osgi.bnd
2011-10-05 20:56:51 UTC (rev 27070)
+++
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/archetype-resources/osgi.bnd
2011-10-05 21:16:04 UTC (rev 27071)
@@ -6,4 +6,5 @@
Import-Package: *
Private-Package: ${bundle.namespace}.internal.*
Export-Package: ${bundle.namespace}
+Bundle-Activator: ${bundle.namespace}.internal.CyActivator
#end
Modified:
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/archetype-resources/pom.xml
===================================================================
---
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/archetype-resources/pom.xml
2011-10-05 20:56:51 UTC (rev 27070)
+++
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/archetype-resources/pom.xml
2011-10-05 21:16:04 UTC (rev 27071)
@@ -36,6 +36,22 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
+ <executions>
+ <execution>
+ <id>default-testCompile</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>testCompile</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>default-compile</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
<configuration>
<source>1.6</source>
<target>1.6</target>
@@ -108,7 +124,18 @@
<!-- Dependencies needed to compile this project. -->
<dependencies>
<dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <version>4.2.0</version>
+ </dependency>
+
+ <dependency>
<groupId>org.cytoscape</groupId>
+ <artifactId>service-api</artifactId>
+ <version>[3.0.0-alpha6,4.0)</version>
+ </dependency>
+ <dependency>
+ <groupId>org.cytoscape</groupId>
<artifactId>model-api</artifactId>
<version>[3.0.0-alpha6,4.0)</version>
</dependency>
Added:
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/archetype-resources/src/main/java/internal/CyActivator.java
===================================================================
---
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/archetype-resources/src/main/java/internal/CyActivator.java
(rev 0)
+++
core3/support/trunk/archetypes/api-provider-plugin/src/main/resources/archetype-resources/src/main/java/internal/CyActivator.java
2011-10-05 21:16:04 UTC (rev 27071)
@@ -0,0 +1,19 @@
+package ${package}.internal;
+
+import java.util.Properties;
+
+import ${package}.SampleAnalyzer;
+import org.cytoscape.service.util.AbstractCyActivator;
+import org.osgi.framework.BundleContext;
+
+public class CyActivator extends AbstractCyActivator {
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ SampleAnalyzer sampleAnalyzer = new SampleAnalyzerImpl();
+
+ Properties properties = new Properties();
+ registerService(context, sampleAnalyzer, SampleAnalyzer.class,
properties);
+ }
+
+}
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.