Author: jm
Date: 2011-10-05 13:43:28 -0700 (Wed, 05 Oct 2011)
New Revision: 27068

Added:
   
core3/support/trunk/archetypes/task-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml
   
core3/support/trunk/archetypes/task-plugin/src/main/resources/archetype-resources/src/main/java/internal/CyActivator.java
Removed:
   
core3/support/trunk/archetypes/task-plugin/src/main/resources/META-INF/maven/archetype.xml
   
core3/support/trunk/archetypes/task-plugin/src/main/resources/archetype-resources/src/main/resources/META-INF/
Modified:
   
core3/support/trunk/archetypes/task-plugin/src/main/resources/archetype-resources/osgi.bnd
   
core3/support/trunk/archetypes/task-plugin/src/main/resources/archetype-resources/pom.xml
Log:
Updated task-plugin archetype:
- Now using Maven 2 archetype descriptor
- Ported to use CyActivator instead of Spring
- Updated pom.xml so Eclipse treats it as a Java project


Added: 
core3/support/trunk/archetypes/task-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml
===================================================================
--- 
core3/support/trunk/archetypes/task-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml
                         (rev 0)
+++ 
core3/support/trunk/archetypes/task-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml
 2011-10-05 20:43:28 UTC (rev 27068)
@@ -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="cyaction-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/task-plugin/src/main/resources/META-INF/maven/archetype.xml
===================================================================
--- 
core3/support/trunk/archetypes/task-plugin/src/main/resources/META-INF/maven/archetype.xml
  2011-10-05 20:06:35 UTC (rev 27067)
+++ 
core3/support/trunk/archetypes/task-plugin/src/main/resources/META-INF/maven/archetype.xml
  2011-10-05 20:43:28 UTC (rev 27068)
@@ -1,14 +0,0 @@
-<archetype>
-       <id>task-plugin</id>
-       <sources>
-               <source>src/main/java/internal/SampleTask.java</source>
-               <source>src/main/java/internal/SampleTaskFactory.java</source>
-       </sources>
-       <resources>
-               <resource>osgi.bnd</resource>
-               <resource>src/main/resources/META-INF/spring/bundle-context.xml
-               </resource>
-               
<resource>src/main/resources/META-INF/spring/bundle-context-osgi.xml
-               </resource>
-       </resources>
-</archetype>

Modified: 
core3/support/trunk/archetypes/task-plugin/src/main/resources/archetype-resources/osgi.bnd
===================================================================
--- 
core3/support/trunk/archetypes/task-plugin/src/main/resources/archetype-resources/osgi.bnd
  2011-10-05 20:06:35 UTC (rev 27067)
+++ 
core3/support/trunk/archetypes/task-plugin/src/main/resources/archetype-resources/osgi.bnd
  2011-10-05 20:43:28 UTC (rev 27068)
@@ -5,4 +5,5 @@
 #literal()
 Import-Package: *
 Private-Package: ${bundle.namespace}.internal.*
+Bundle-Activator: ${bundle.namespace}.internal.CyActivator
 #end

Modified: 
core3/support/trunk/archetypes/task-plugin/src/main/resources/archetype-resources/pom.xml
===================================================================
--- 
core3/support/trunk/archetypes/task-plugin/src/main/resources/archetype-resources/pom.xml
   2011-10-05 20:06:35 UTC (rev 27067)
+++ 
core3/support/trunk/archetypes/task-plugin/src/main/resources/archetype-resources/pom.xml
   2011-10-05 20:43:28 UTC (rev 27068)
@@ -37,6 +37,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>
@@ -111,7 +127,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/task-plugin/src/main/resources/archetype-resources/src/main/java/internal/CyActivator.java
===================================================================
--- 
core3/support/trunk/archetypes/task-plugin/src/main/resources/archetype-resources/src/main/java/internal/CyActivator.java
                           (rev 0)
+++ 
core3/support/trunk/archetypes/task-plugin/src/main/resources/archetype-resources/src/main/java/internal/CyActivator.java
   2011-10-05 20:43:28 UTC (rev 27068)
@@ -0,0 +1,23 @@
+package ${package}.internal;
+
+import java.util.Properties;
+
+import org.cytoscape.service.util.AbstractCyActivator;
+import org.cytoscape.task.NetworkTaskFactory;
+import org.osgi.framework.BundleContext;
+
+public class CyActivator extends AbstractCyActivator {
+
+       @Override
+       public void start(BundleContext context) throws Exception {
+               SampleTaskFactory taskFactory = new SampleTaskFactory();
+               
+               Properties properties = new Properties();
+               properties.put("title", "Sample Task");
+               properties.put("preferredMenu", "Plugins");
+               properties.put("enableFor", "network");
+               
+               registerService(context, taskFactory, NetworkTaskFactory.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.

Reply via email to