Revision: 19530
          http://sourceforge.net/p/gate/code/19530
Author:   markagreenwood
Date:     2016-08-20 16:14:40 +0000 (Sat, 20 Aug 2016)
Log Message:
-----------
made JAPE_Plus a maven based plugin

Modified Paths:
--------------
    gate/branches/sawdust2/plugins/JAPE_Plus/.classpath
    gate/branches/sawdust2/plugins/JAPE_Plus/.project
    
gate/branches/sawdust2/plugins/JAPE_Plus/src/main/java/gate/jape/plus/Transducer.java
    gate/branches/sawdust2/plugins/pom.xml

Added Paths:
-----------
    gate/branches/sawdust2/plugins/JAPE_Plus/pom.xml
    gate/branches/sawdust2/plugins/JAPE_Plus/src/main/
    gate/branches/sawdust2/plugins/JAPE_Plus/src/main/java/
    gate/branches/sawdust2/plugins/JAPE_Plus/src/main/java/com/
    gate/branches/sawdust2/plugins/JAPE_Plus/src/main/java/gate/
    gate/branches/sawdust2/plugins/JAPE_Plus/src/main/resources/
    gate/branches/sawdust2/plugins/JAPE_Plus/src/main/resources/creole.xml

Removed Paths:
-------------
    gate/branches/sawdust2/plugins/JAPE_Plus/build.xml
    gate/branches/sawdust2/plugins/JAPE_Plus/creole.xml
    gate/branches/sawdust2/plugins/JAPE_Plus/doc/
    gate/branches/sawdust2/plugins/JAPE_Plus/lib/
    gate/branches/sawdust2/plugins/JAPE_Plus/src/com/
    gate/branches/sawdust2/plugins/JAPE_Plus/src/gate/

Modified: gate/branches/sawdust2/plugins/JAPE_Plus/.classpath
===================================================================
--- gate/branches/sawdust2/plugins/JAPE_Plus/.classpath 2016-08-20 06:49:44 UTC 
(rev 19529)
+++ gate/branches/sawdust2/plugins/JAPE_Plus/.classpath 2016-08-20 16:14:40 UTC 
(rev 19530)
@@ -1,8 +1,31 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry exported="true" kind="lib" 
path="lib/colt-1.2.0-free.jar" sourcepath="lib/src/colt-1.2.0-free-src.jar"/>
-       <classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
-       <classpathentry combineaccessrules="false" exported="true" kind="src" 
path="/GATE"/>
-       <classpathentry kind="output" path="classes"/>
+       <classpathentry kind="src" output="target/classes" path="src/main/java">
+               <attributes>
+                       <attribute name="optional" value="true"/>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry excluding="**" kind="src" output="target/classes" 
path="src/main/resources">
+               <attributes>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="src" output="target/test-classes" 
path="src/test/java">
+               <attributes>
+                       <attribute name="optional" value="true"/>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+               <attributes>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="con" 
path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+               <attributes>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="output" path="target/classes"/>
 </classpath>

Modified: gate/branches/sawdust2/plugins/JAPE_Plus/.project
===================================================================
--- gate/branches/sawdust2/plugins/JAPE_Plus/.project   2016-08-20 06:49:44 UTC 
(rev 19529)
+++ gate/branches/sawdust2/plugins/JAPE_Plus/.project   2016-08-20 16:14:40 UTC 
(rev 19530)
@@ -10,8 +10,14 @@
                        <arguments>
                        </arguments>
                </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.m2e.core.maven2Builder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
        </buildSpec>
        <natures>
                <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.m2e.core.maven2Nature</nature>
        </natures>
 </projectDescription>

Deleted: gate/branches/sawdust2/plugins/JAPE_Plus/build.xml
===================================================================
--- gate/branches/sawdust2/plugins/JAPE_Plus/build.xml  2016-08-20 06:49:44 UTC 
(rev 19529)
+++ gate/branches/sawdust2/plugins/JAPE_Plus/build.xml  2016-08-20 16:14:40 UTC 
(rev 19530)
@@ -1,103 +0,0 @@
-<project name="JAPE-Plus" basedir="." default="build" >
-  <!-- Prevent Ant from warning about includeantruntime not being set -->
-  <property name="build.sysclasspath" value="ignore" />        
-  
-  <property file="build.properties" />
-
-  <!-- Make environment variables available -->
-  <property environment="env" />
-
-  <!-- If environment variable GATE_HOME is set, use it for
-       gate.home (unless it was already set in build.properties -->
-  <condition property="gate.home" value="${env.GATE_HOME}">
-    <isset property="env.GATE_HOME"/>
-  </condition>
-
-  <!-- If gate.home is not set from build.properties or the 
-       environment variable GATE_HOME, assume that this
-       plugin is in GATE Developer's plugin directory -->
-  <property name="gate.home" location="../.." />
-  <property name="src.dir" location="src" />
-  <property name="classes.dir" location="classes" />
-  <property name="lib.dir" location="lib" />
-       <property name="doc.dir" location="doc" />
-  <property name="javadoc.dir" location="${doc.dir}/javadoc" />
-  <property name="jar.location" location="jape-plus.jar" />
-  <property name="gate.compile.maxwarnings" value="10000" />
-
-  <!-- Path to compile - includes gate.jar and GATE/lib/*.jar -->
-  <path id="compile.classpath">
-    <pathelement location="${lib.dir}/colt-1.2.0-free.jar" />
-    <pathelement location="${gate.home}/bin/gate.jar" />
-    <fileset dir="${gate.home}/lib">
-      <include name="**/*.jar" />
-      <include name="**/*.zip" />
-    </fileset>
-  </path>
-
-  <!-- create build directory structure -->
-  <target name="prepare">
-    <mkdir dir="${classes.dir}" />
-  </target>
-
-  <!-- compile the source -->
-  <target name="compile" depends="prepare">
-    <javac classpathref="compile.classpath"
-           srcdir="${src.dir}"
-           destdir="${classes.dir}"
-           debug="true"
-           debuglevel="lines,source"
-           encoding="UTF-8"
-           source="1.7" target="1.7">
-               <compilerarg value="-Xmaxwarns" />
-               <compilerarg value="${gate.compile.maxwarnings}" />
-               <compilerarg value="-Xlint:all" />
-    </javac>
-  </target>
-
-  <!-- create the JAR file -->
-  <target name="jar" depends="compile" >
-    <jar destfile="${jar.location}"
-         update="false"
-         basedir="${classes.dir}" />
-  </target>
-
-  <!-- remove the generated .class files -->
-  <target name="clean.classes" >
-    <delete dir="${classes.dir}" />
-  </target>
-
-  <!-- Clean up - remove .class and .jar files -->
-  <target name="clean" depends="clean.classes" >
-    <delete file="${jar.location}" />
-  </target>
-
-  <!-- Build JavaDoc documentation -->
-  <target name="doc.prepare">
-    <mkdir dir="${javadoc.dir}" />
-  </target>
-
-  <target name="javadoc" depends="doc.prepare">
-    <javadoc destdir="${javadoc.dir}" packagenames="*"
-             classpathref="compile.classpath"
-             encoding="UTF-8"
-             windowtitle="${plugin.name} JavaDoc"
-             source="1.7">
-      <sourcepath>
-        <pathelement location="${src.dir}" />
-      </sourcepath>
-      <link href="http://docs.oracle.com/javase/7/docs/api/"; />
-      <link href="http://gate.ac.uk/gate/doc/javadoc/"; />
-    </javadoc>
-  </target>
-       
-  <!-- Targets used by the main GATE build file:
-         build: build the plugin - just calls "jar" target
-         test : run the unit tests - there aren't any
-         distro.prepare: remove intermediate files that shouldn't be in the
-                         distribution
-  -->
-  <target name="build" depends="jar" />
-  <target name="test" />
-  <target name="distro.prepare" depends="clean.classes" />
-</project>

Deleted: gate/branches/sawdust2/plugins/JAPE_Plus/creole.xml
===================================================================
--- gate/branches/sawdust2/plugins/JAPE_Plus/creole.xml 2016-08-20 06:49:44 UTC 
(rev 19529)
+++ gate/branches/sawdust2/plugins/JAPE_Plus/creole.xml 2016-08-20 16:14:40 UTC 
(rev 19530)
@@ -1,4 +0,0 @@
-<CREOLE-DIRECTORY>
-  <JAR SCAN="true">jape-plus.jar</JAR>
-  <JAR>lib/colt-1.2.0-free.jar</JAR>
-</CREOLE-DIRECTORY>

Added: gate/branches/sawdust2/plugins/JAPE_Plus/pom.xml
===================================================================
--- gate/branches/sawdust2/plugins/JAPE_Plus/pom.xml                            
(rev 0)
+++ gate/branches/sawdust2/plugins/JAPE_Plus/pom.xml    2016-08-20 16:14:40 UTC 
(rev 19530)
@@ -0,0 +1,58 @@
+
+<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>uk.ac.gate.plugins</groupId>
+               <artifactId>base-plugin</artifactId>
+               <!-- this should be the version of GATE you wish to build 
against -->
+               <version>9.0-SNAPSHOT</version>
+       </parent>       
+       
+       <!-- this is the description of this plugin -->
+       <groupId>uk.ac.gate.plugins</groupId>
+       <artifactId>jape-plus</artifactId>
+       <version>9.0-SNAPSHOT</version>
+
+       <licenses>
+               <license>
+                       <name>GNU Lesser General Public License (LGPL), Version 
3</name>
+                       <url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
+                       <distribution>repo</distribution>
+               </license>
+       </licenses>
+
+       <organization>
+               <name>GATE</name>
+               <url>http://gate.ac.uk</url>
+       </organization>
+       
+       <developers>
+               <developer>
+                       <id>gate-team</id>
+                       <name>GATE Team</name>
+                       <email>gate-develop...@lists.sourceforge.net</email>
+               </developer>
+       </developers>
+
+       <dependencies>
+               <!-- add any other libraries your plugin depends on. Any other 
GATE plugins 
+                       you depend on at compile time should use the provided 
scope -->
+               <dependency>
+                       <groupId>uk.ac.gate.plugins</groupId>
+                       <artifactId>annie</artifactId>
+                       <version>9.0-SNAPSHOT</version>
+                       <scope>provided</scope>
+               </dependency>
+
+               <dependency>
+                       <groupId>colt</groupId>
+                       <artifactId>colt</artifactId>
+                       <version>1.2.0</version>
+               </dependency>
+
+       </dependencies>
+
+</project>

Modified: 
gate/branches/sawdust2/plugins/JAPE_Plus/src/main/java/gate/jape/plus/Transducer.java
===================================================================
--- gate/branches/sawdust2/plugins/JAPE_Plus/src/gate/jape/plus/Transducer.java 
2016-08-20 06:49:44 UTC (rev 19529)
+++ 
gate/branches/sawdust2/plugins/JAPE_Plus/src/main/java/gate/jape/plus/Transducer.java
       2016-08-20 16:14:40 UTC (rev 19530)
@@ -39,6 +39,7 @@
 import gate.gui.MainFrame;
 import gate.jape.ControllerEventBlocksAction;
 import gate.jape.DefaultActionContext;
+import gate.jape.JapeFactory;
 import gate.jape.MultiPhaseTransducer;
 import gate.jape.Rule;
 import gate.jape.SinglePhaseTransducer;
@@ -703,7 +704,7 @@
           ConstraintPredicate predicate = clazz.newInstance();
           String opSymbol = predicate.getOperator();
           //now store it in ConstraintFactory
-          Factory.getConstraintFactory().addOperator(opSymbol, clazz);
+          JapeFactory.getConstraintFactory().addOperator(opSymbol, clazz);
         }
         catch(Exception e) {
           throw new ResourceInstantiationException("Cannot instantiate class 
for operator: " + opName, e);
@@ -739,7 +740,7 @@
           AnnotationAccessor aa = clazz.newInstance();
           String accSymbol = (String)aa.getKey();
           //now store it in ConstraintFactory
-          Factory.getConstraintFactory().addMetaProperty(accSymbol, clazz);
+          JapeFactory.getConstraintFactory().addMetaProperty(accSymbol, clazz);
         }
         catch(Exception e) {
           throw new ResourceInstantiationException("Cannot instantiate class 
for accessor: " + accessorName, e);
@@ -752,7 +753,7 @@
   protected void parseJape() 
     throws IOException, ParseException, ResourceInstantiationException
   {            
-    ParseCpsl parser = Factory.newJapeParser(grammarURL, encoding);
+    ParseCpsl parser = JapeFactory.newJapeParser(grammarURL, encoding);
     parser.setSptClass(SinglePhaseTransducerPDA.class);
 
     StatusListener listener = new StatusListener(){

Copied: gate/branches/sawdust2/plugins/JAPE_Plus/src/main/resources/creole.xml 
(from rev 19529, gate/branches/sawdust2/plugins/JAPE_Plus/creole.xml)
===================================================================
--- gate/branches/sawdust2/plugins/JAPE_Plus/src/main/resources/creole.xml      
                        (rev 0)
+++ gate/branches/sawdust2/plugins/JAPE_Plus/src/main/resources/creole.xml      
2016-08-20 16:14:40 UTC (rev 19530)
@@ -0,0 +1,3 @@
+<CREOLE-DIRECTORY>
+       <REQUIRES GROUP="uk.ac.gate.plugins" ARTIFACT="annie" 
VERSION="9.0-SNAPSHOT"/>
+</CREOLE-DIRECTORY>

Modified: gate/branches/sawdust2/plugins/pom.xml
===================================================================
--- gate/branches/sawdust2/plugins/pom.xml      2016-08-20 06:49:44 UTC (rev 
19529)
+++ gate/branches/sawdust2/plugins/pom.xml      2016-08-20 16:14:40 UTC (rev 
19530)
@@ -46,5 +46,6 @@
                <module>Developer_Tools</module>
                <module>Tagger_NP_Chunking</module>
                <module>Stanford_CoreNLP</module>
+               <module>JAPE_Plus</module>
        </modules>
 </project>

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
_______________________________________________
GATE-cvs mailing list
GATE-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to