Revision: 19231
          http://sourceforge.net/p/gate/code/19231
Author:   markagreenwood
Date:     2016-04-11 17:23:20 +0000 (Mon, 11 Apr 2016)
Log Message:
-----------
mavenized another plugin

Modified Paths:
--------------
    gate/branches/sawdust2/plugins/Developer_Tools/.classpath
    gate/branches/sawdust2/plugins/Developer_Tools/.project
    
gate/branches/sawdust2/plugins/Developer_Tools/src/main/java/gate/creole/UnusedPluginUnloader.java

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

Removed Paths:
-------------
    gate/branches/sawdust2/plugins/Developer_Tools/build.xml
    gate/branches/sawdust2/plugins/Developer_Tools/creole.xml
    gate/branches/sawdust2/plugins/Developer_Tools/src/gate/
    gate/branches/sawdust2/plugins/Developer_Tools/src/org/

Property Changed:
----------------
    gate/branches/sawdust2/plugins/Developer_Tools/

Index: gate/branches/sawdust2/plugins/Developer_Tools
===================================================================
--- gate/branches/sawdust2/plugins/Developer_Tools      2016-04-11 17:16:45 UTC 
(rev 19230)
+++ gate/branches/sawdust2/plugins/Developer_Tools      2016-04-11 17:23:20 UTC 
(rev 19231)

Property changes on: gate/branches/sawdust2/plugins/Developer_Tools
___________________________________________________________________
Modified: svn:ignore
## -1,2 +1 ##
-classes
-dev_tools.jar
+target
Modified: gate/branches/sawdust2/plugins/Developer_Tools/.classpath
===================================================================
--- gate/branches/sawdust2/plugins/Developer_Tools/.classpath   2016-04-11 
17:16:45 UTC (rev 19230)
+++ gate/branches/sawdust2/plugins/Developer_Tools/.classpath   2016-04-11 
17:23:20 UTC (rev 19231)
@@ -1,7 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry kind="src" path="src/main/java"/>
        <classpathentry combineaccessrules="false" kind="src" path="/GATE"/>
-       <classpathentry kind="output" path="classes"/>
+       <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/Developer_Tools/.project
===================================================================
--- gate/branches/sawdust2/plugins/Developer_Tools/.project     2016-04-11 
17:16:45 UTC (rev 19230)
+++ gate/branches/sawdust2/plugins/Developer_Tools/.project     2016-04-11 
17:23:20 UTC (rev 19231)
@@ -10,8 +10,14 @@
                        <arguments>
                        </arguments>
                </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.m2e.core.maven2Builder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
        </buildSpec>
        <natures>
+               <nature>org.eclipse.m2e.core.maven2Nature</nature>
                <nature>org.eclipse.jdt.core.javanature</nature>
        </natures>
 </projectDescription>

Deleted: gate/branches/sawdust2/plugins/Developer_Tools/build.xml
===================================================================
--- gate/branches/sawdust2/plugins/Developer_Tools/build.xml    2016-04-11 
17:16:45 UTC (rev 19230)
+++ gate/branches/sawdust2/plugins/Developer_Tools/build.xml    2016-04-11 
17:23:20 UTC (rev 19231)
@@ -1,109 +0,0 @@
-<project name="Developer_Tools" basedir="." default="all" >
-       <!-- Prevent Ant from warning about includeantruntime not being set -->
-       <property name="build.sysclasspath" value="ignore" />
-
-       <property file="build.properties" />
-       <property name="plugin.name" value="Developer_Tools"/>
-
-       <!-- 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>
-
-       <property name="gate.home" location="../.." />
-       <property name="gate.lib" location="${gate.home}/lib" />
-       <property name="gate.jar" location="${gate.home}/bin/gate.jar" />
-       <property name="src.dir" location="src" />
-       <!-- <property name="lib.dir" location="lib" /> -->
-       <property name="classes.dir" location="classes" />
-       <property name="jar.location" location="dev_tools.jar" />
-       <property name="doc.dir" location="doc" />
-       <property name="javadoc.dir" location="${doc.dir}/javadoc" />
-       <property name="gate.compile.maxwarnings" value="10000" />
-
-       <!-- Path to compile - includes gate.jar and GATE/lib/*.jar -->
-       <path id="compile.classpath">
-               <!-- <fileset dir="${lib.dir}">
-                       <include name="**/*.jar" />
-               </fileset> -->
-               <pathelement location="${gate.jar}" />
-               <fileset dir="${gate.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"
-           source="1.6"
-           target="1.6">
-                       <compilerarg value="-Xmaxwarns" />
-                       <compilerarg value="${gate.compile.maxwarnings}" />
-                       <compilerarg value="-Xlint:all" />
-               </javac>
-       </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.6">
-                       <sourcepath>
-                               <pathelement location="${src.dir}" />
-                       </sourcepath>
-                       <link href="http://docs.oracle.com/javase/6/docs/api/"; 
/>
-                       <link href="http://gate.ac.uk/gate/doc/javadoc/"; />
-               </javadoc>
-       </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 everything - the code and JavaDoc -->
-       <target name="all" depends="jar, javadoc" />
-
-       <!-- 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/Developer_Tools/creole.xml
===================================================================
--- gate/branches/sawdust2/plugins/Developer_Tools/creole.xml   2016-04-11 
17:16:45 UTC (rev 19230)
+++ gate/branches/sawdust2/plugins/Developer_Tools/creole.xml   2016-04-11 
17:23:20 UTC (rev 19231)
@@ -1,3 +0,0 @@
-<CREOLE-DIRECTORY>
-  <JAR SCAN="true">dev_tools.jar</JAR>
-</CREOLE-DIRECTORY>

Added: gate/branches/sawdust2/plugins/Developer_Tools/pom.xml
===================================================================
--- gate/branches/sawdust2/plugins/Developer_Tools/pom.xml                      
        (rev 0)
+++ gate/branches/sawdust2/plugins/Developer_Tools/pom.xml      2016-04-11 
17:23:20 UTC (rev 19231)
@@ -0,0 +1,178 @@
+
+<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>
+       <groupId>uk.ac.gate.plugins</groupId>
+       <artifactId>developer-tools</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>
+
+       <dependencies>
+               <dependency>
+                       <groupId>uk.ac.gate</groupId>
+                       <artifactId>gate-core</artifactId>
+                       <!-- set this to the version of GATE you want to build 
against -->
+                       <version>9.0-SNAPSHOT</version>
+                       <scope>provided</scope>
+               </dependency>
+
+               <!-- 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</groupId>
+                       <artifactId>gate-compiler-jdt</artifactId>
+                       <version>4.3.2-P20140317-1600</version>
+               </dependency>
+
+       </dependencies>
+
+       <!-- In theory you shouldn't need to change anything below here -->
+
+       <repositories>
+               <repository>
+                       <id>gate.ac.uk</id>
+                       <name>GATE Development Repository</name>
+                       <url>http://repo.gate.ac.uk/content/groups/public/</url>
+               </repository>
+       </repositories>
+
+       <properties>
+               <maven.compiler.source>1.8</maven.compiler.source>
+               <maven.compiler.target>1.8</maven.compiler.target>
+               
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+       </properties>
+
+       <build>
+               <testResources>
+                       <!-- this adds the maven coordinates into the test 
resource file creole.properties 
+                               which is used to help load this plugin for 
testing -->
+                       <testResource>
+                               <directory>src/test/resources</directory>
+                               <filtering>true</filtering>
+                               <includes>
+                                       <include>creole.properties</include>
+                               </includes>
+                       </testResource>
+
+                       <!-- copy all the other resources without altering them 
so we don't accidentally 
+                               corrupt datastores or other binary formats -->
+                       <testResource>
+                               <directory>src/test/resources</directory>
+                               <filtering>false</filtering>
+                               <excludes>
+                                       <exclude>creole.properties</exclude>
+                               </excludes>
+                       </testResource>
+               </testResources>
+
+               <plugins>
+                       <plugin>
+                               <groupId>org.jacoco</groupId>
+                               <artifactId>jacoco-maven-plugin</artifactId>
+                               <version>0.7.6.201602180812</version>
+                               <executions>
+                                       <execution>
+                                               <id>default-prepare-agent</id>
+                                               <goals>
+                                                       
<goal>prepare-agent</goal>
+                                               </goals>
+                                       </execution>
+                                       <execution>
+                                               <id>default-report</id>
+                                               <phase>prepare-package</phase>
+                                               <goals>
+                                                       <goal>report</goal>
+                                               </goals>
+                                       </execution>
+                                       <execution>
+                                               <id>default-check</id>
+                                               <goals>
+                                                       <goal>check</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <rules>
+                                                               <rule>
+                                                                       
<element>BUNDLE</element>
+                                                                       <limits>
+                                                                               
<limit>
+                                                                               
        <counter>COMPLEXITY</counter>
+                                                                               
        <value>COVEREDRATIO</value>
+                                                                               
        <minimum>0.60</minimum>
+                                                                               
</limit>
+                                                                       
</limits>
+                                                               </rule>
+                                                       </rules>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+       </build>
+
+       <reporting>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               
<artifactId>maven-surefire-report-plugin</artifactId>
+                               <version>2.19.1</version>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.codehaus.mojo</groupId>
+                               <artifactId>findbugs-maven-plugin</artifactId>
+                               <version>3.0.3</version>
+                               <configuration>
+                                       <xmlOutput>true</xmlOutput>
+                                       <effort>Max</effort>
+                                       <threshold>Low</threshold>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.jacoco</groupId>
+                               <artifactId>jacoco-maven-plugin</artifactId>
+                               <version>0.7.6.201602180812</version>
+                               <configuration>
+                                       <excludes>
+                                               <!-- this excludes known GUI 
code from the code coverage results as 
+                                                       we know we aren't 
testing them so will likely have a 0% coverage -->
+                                               <exclude>gate/gui/**/*</exclude>
+                                               
<exclude>gate/swing/**/*</exclude>
+                                       </excludes>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               
<artifactId>maven-project-info-reports-plugin</artifactId>
+                               <version>2.9</version>
+                               <configuration>
+                                       
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
+                                       <systemPropertyVariables>
+                                               
<jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
+                                       </systemPropertyVariables>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-javadoc-plugin</artifactId>
+                               <version>2.9.1</version>
+                               <configuration>
+                                       <failOnError>false</failOnError>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </reporting>
+
+</project>
\ No newline at end of file

Modified: 
gate/branches/sawdust2/plugins/Developer_Tools/src/main/java/gate/creole/UnusedPluginUnloader.java
===================================================================
--- 
gate/branches/sawdust2/plugins/Developer_Tools/src/gate/creole/UnusedPluginUnloader.java
    2016-04-11 15:13:57 UTC (rev 19227)
+++ 
gate/branches/sawdust2/plugins/Developer_Tools/src/main/java/gate/creole/UnusedPluginUnloader.java
  2016-04-11 17:23:20 UTC (rev 19231)
@@ -14,8 +14,8 @@
 package gate.creole;
 
 import gate.Gate;
-import gate.Gate.DirectoryInfo;
 import gate.Gate.ResourceInfo;
+import gate.Plugin;
 import gate.Resource;
 import gate.creole.metadata.AutoInstance;
 import gate.creole.metadata.CreoleResource;
@@ -73,18 +73,16 @@
         CreoleRegisterImpl reg = (CreoleRegisterImpl)Gate.getCreoleRegister();
 
         // this will hold the set of plugins that are to be unloaded
-        Set<URL> pluginsToUnload = new HashSet<URL>();
+        Set<Plugin> pluginsToUnload = new HashSet<Plugin>();
 
-        for(URL plugin : reg.getDirectories()) {
+        for(Plugin plugin : reg.getPlugins()) {
           // for each registered plugin...
 
           // assume the plugin is unused
           boolean unused = true;
 
           // get the plugin nifo
-          DirectoryInfo dInfo = Gate.getDirectoryInfo(plugin);
-
-          for(ResourceInfo rInfo : dInfo.getResourceInfoList()) {
+          for(ResourceInfo rInfo : plugin.getResourceInfoList()) {
             // for each Resource the plugin defines...
 
             try {
@@ -111,11 +109,11 @@
         if(pluginsToUnload.isEmpty()) {
           System.out.println("No plugin unloaded");
         } else {
-          for(URL plugin : pluginsToUnload) {
+          for(Plugin plugin : pluginsToUnload) {
             // The system logs plugins getting unloaded, so we do not have to 
do
             // it
             System.out.println("Trying to unload plugin: " + plugin);
-            reg.removeDirectory(plugin);           
+            reg.unregisterPlugin(plugin);           
           }
           System.out.println("Plugins unloaded: " + pluginsToUnload.size());
           System.out.println("\nPlugins still loaded:");

Copied: 
gate/branches/sawdust2/plugins/Developer_Tools/src/main/resources/creole.xml 
(from rev 19230, gate/branches/sawdust2/plugins/Developer_Tools/creole.xml)
===================================================================
--- 
gate/branches/sawdust2/plugins/Developer_Tools/src/main/resources/creole.xml    
                            (rev 0)
+++ 
gate/branches/sawdust2/plugins/Developer_Tools/src/main/resources/creole.xml    
    2016-04-11 17:23:20 UTC (rev 19231)
@@ -0,0 +1,3 @@
+<CREOLE-DIRECTORY>
+  
+</CREOLE-DIRECTORY>

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


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to