petermr avatar petermr committed 3a72a9c

fixed poms

Comments (0)

Files changed (15)

jc-reaction-all/pom.xml

     <dependencies>
         <dependency>
             <groupId>${jc.groupId}</groupId>
-            <artifactId>jc-top-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>${jc.groupId}</groupId>
             <artifactId>jc-reaction-core</artifactId>
             <version>${project.version}</version>
         </dependency>

jc-reaction-all/src/test/java/org/xmlcml/cml/converters/reaction/registry/ReactionConverterRegistryTest.java

+package org.xmlcml.cml.converters.reaction.registry;
+
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.xmlcml.cml.converters.Converter;
+import org.xmlcml.cml.converters.MimeType;
+import org.xmlcml.cml.converters.TypePair;
+import org.xmlcml.cml.converters.cml.CML2CMLLiteConverter;
+import org.xmlcml.cml.converters.cml.CMLCommon;
+import org.xmlcml.cml.converters.reaction.rxn.RXNModule;
+import org.xmlcml.cml.converters.registry.ConverterRegistry;
+
+public class ReactionConverterRegistryTest {
+
+	String CML = "chemical/x-cml";
+	String CDX = "chemical/x-cdx";
+	String FOO = "chemical/x-foo";
+	TypePair PAIR_OK  = new TypePair(FOO, CML);
+	TypePair PAIR_MISSING  = new TypePair(CML, CDX);
+	int MAP_SIZE = 3;
+	int CONVERTER_SIZE = 3;
+
+    @Test
+    public void testMap() {
+    	Map<TypePair, List<Converter>> map = ConverterRegistry.getDefaultConverterRegistry().getMap();
+    	Assert.assertNotNull(map);
+    	// size will change as more are added
+    	Assert.assertEquals(MAP_SIZE, map.size());
+    }
+
+    @Test
+    public void testList() {
+    	List<Converter> converterList = ConverterRegistry.getDefaultConverterRegistry().getConverterList();
+    	Assert.assertNotNull(converterList);
+    	for (Converter converter : converterList) {
+    		System.out.println(converter);
+    	}
+    	Assert.assertEquals(CONVERTER_SIZE, converterList.size());
+    }
+
+    @Test
+    public void testList1() {
+    	List<Converter> converterList = ConverterRegistry.getDefaultConverterRegistry().getConverterList();
+    	boolean found = false;
+    	for (Converter converter : converterList) {
+    		if (CML2CMLLiteConverter.class.equals(converter.getClass())) {
+    			found = true;
+    			break;
+    		}
+    	}
+    	Assert.assertTrue("converter", found);
+    }
+
+    @Test
+    public void testMap1() {
+    	Map<TypePair, List<Converter>> map = ConverterRegistry.getDefaultConverterRegistry().getMap();
+    	Assert.assertTrue(map.containsKey(PAIR_OK));
+    	Assert.assertFalse(map.containsKey(PAIR_MISSING));
+    	for (TypePair typePair1 : map.keySet()) {
+    		System.out.println(typePair1);
+    	}
+    }
+
+    @Test
+    public void testFindConverter() {
+    	List<Converter> converters = ConverterRegistry.getDefaultConverterRegistry().findConverters(
+    			RXNModule.RXN_TYPE.getMimeType(), CMLCommon.CML_TYPE.getMimeType());
+    	Assert.assertNotNull("rxn", converters);
+    	for (Converter converter : converters) {
+    		System.out.println("Converter: "+converter);
+    	}
+    	Assert.assertEquals("rxn", 1, converters.size());
+    	Assert.assertEquals("rxn", "org.xmlcml.cml.converters.reaction.rxn.RXN2CMLConverter", converters.get(0).getClass().getName());
+    }
+
+    @Test
+    public void testFindConverter1() {
+    	List<Converter> converters = ConverterRegistry.getDefaultConverterRegistry().findConverters(CML, CML);
+    	Assert.assertNotNull("cml", converters);
+    	Assert.assertEquals("cml", 1, converters.size());
+    }
+
+	@Test
+	public void testRegistryLoadsConverterList() {
+		List<Converter> list = ConverterRegistry.getDefaultConverterRegistry().getConverterList();
+		assertTrue(list.size()>0);
+	}
+
+	@Test
+	public void testFindFoo2BarConverter() {
+		List<Converter> converterList = ConverterRegistry.getDefaultConverterRegistry().findConverters("foo", "bar");
+		assertNull(converterList);
+	}
+
+	@Test
+	public void testFindTypesFromSuffix() {
+		Set<MimeType> types = ConverterRegistry.getDefaultConverterRegistry().getTypes("cml");
+		Assert.assertNotNull("get types", types);
+		Assert.assertEquals("get types", 1, types.size());
+		Assert.assertEquals("get types", "chemical/x-cml", ((MimeType)types.toArray()[0]).getMimeType());
+	}
+
+	@Test
+	public void testFindTypesFromSuffix1() {
+		Set<MimeType> types = ConverterRegistry.getDefaultConverterRegistry().getTypes("foo");
+		Assert.assertNotNull("get types", types);
+		Assert.assertEquals("types count", 1, types.size());
+		Assert.assertEquals("type", "chemical/x-foo", ((MimeType)types.toArray()[0]).getMimeType());
+	}
+
+	@Test
+	public void testFindSingleTypeFromSuffix() {
+		MimeType type = ConverterRegistry.getDefaultConverterRegistry().getSingleTypeFromSuffix("cml");
+		Assert.assertNotNull("get type", type);
+	}
+
+	@Test
+	public void testSingletonConverterRegistry() {
+		Assert.assertNotNull(ConverterRegistry.getDefaultConverterRegistry());
+	}
+
+	@Test
+	public void testCreateRegistryList0() {
+		ConverterRegistry converterRegistry = new ConverterRegistry(ConverterRegistry.class.getClassLoader());
+		List<Converter> converterList = converterRegistry.getConverterList();
+		Assert.assertNotNull(converterList);
+		converterRegistry.createConvertersList();
+		converterList = converterRegistry.getConverterList();
+		Assert.assertNotNull(converterList);
+	}
+
+	@Test
+	public void testCreateRegistryList() {
+		ConverterRegistry converterRegistry = new ConverterRegistry(ConverterRegistry.class.getClassLoader());
+		converterRegistry.populateAndRegister();
+		List<Converter> converterList = converterRegistry.getConverterList();
+		converterRegistry.createConvertersList();
+		converterList = converterRegistry.getConverterList();
+		// should at least contain org.xmlcml.cml.converters.cml.CML2CMLLiteConverter@76f2d004
+		Assert.assertTrue(converterList.size()>0);
+		boolean hasCmllite = hasConverter(converterList, "org.xmlcml.cml.converters.cml.CML2CMLLiteConverter");
+		Assert.assertTrue("has cmllite", hasCmllite);
+	}
+
+	private boolean hasConverter(List<Converter> converterList, String className) {
+		for (Converter converter : converterList) {
+			if (converter.getClass().getName().equals(className)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	@Test
+	public void testSingletonConverterRegistryList0() {
+		ConverterRegistry converterRegistry = ConverterRegistry.getDefaultConverterRegistry();
+		List<Converter> converterList = converterRegistry.getConverterList();
+		Assert.assertNotNull(converterList);
+		Assert.assertEquals("converterList", CONVERTER_SIZE, converterList.size());
+	}
+
+}

jc-reaction-rxn/pom.xml

 	<name>jc-reaction-rxn</name>
 
 	<dependencies>
-
+        <dependency>
+            <groupId>${jc.groupId}</groupId>
+            <artifactId>jc-reaction-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
 	</dependencies>
 </project>

jc-reaction-rxn/src/main/java/org/xmlcml/cml/converters/reaction/rxn/RXNModule.java

 package org.xmlcml.cml.converters.reaction.rxn;
 
 import java.util.ArrayList;
+
 import java.util.List;
 
 import org.xmlcml.cml.converters.AbstractConverterModule;

jc-reaction-rxn/src/test/java/org/xmlcml/cml/converters/reaction/rxn/RXN2CMLConverterTest.java

 
 import java.io.IOException;
 
+
 import org.junit.Ignore;
 import org.junit.Test;
-import org.xmlcml.cml.converters.testutils.RegressionSuite;
+import org.xmlcml.cml.converters.testutils.JumboConvertersRegressionSuite;
 
 public class RXN2CMLConverterTest {
 
    @Test
    @Ignore
    public void testConvertToXMLElement() throws IOException {
-//      RegressionSuite.run("cdx/cdx", "cdx", "cdx.xml",
-//                            new RXN2CMLConverter());
+       JumboConvertersRegressionSuite.run("cdx/cdx", "cdx", "cdx.xml",
+                            new RXN2CMLConverter());
    }
 }

jc-reaction-test/.classpath

-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
-	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
-	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
-	<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>

jc-reaction-test/.project

-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>jc-reaction-test</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<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>

jc-reaction-test/.settings/org.eclipse.core.resources.prefs

-#Thu Feb 23 22:16:55 GMT 2012
-eclipse.preferences.version=1
-encoding//src/main/java=UTF-8
-encoding//src/main/resources=UTF-8
-encoding//src/test/java=UTF-8
-encoding//src/test/resources=UTF-8
-encoding/<project>=UTF-8

jc-reaction-test/.settings/org.eclipse.jdt.core.prefs

-#Thu Feb 23 19:21:31 GMT 2012
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.source=1.6

jc-reaction-test/.settings/org.eclipse.m2e.core.prefs

-#Thu Feb 23 19:21:25 GMT 2012
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1

jc-reaction-test/pom.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<project
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
-	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion>
-
-	<parent>
-		<groupId>org.xml-cml.jc</groupId>
-		<artifactId>jc-reaction</artifactId>
-		<version>0.3-SNAPSHOT</version>
-	</parent>
-
-	<artifactId>jc-reaction-test</artifactId>
-	<name>jc-reaction-test</name>
-
-	<dependencies>
-        <dependency>
-            <groupId>${jc.groupId}</groupId>
-            <artifactId>jc-reaction-rxn</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-		<dependency>
-			<groupId>${jc.groupId}</groupId>
-			<artifactId>jc-reaction-all</artifactId>
-            <version>${project.version}</version>
-		</dependency>
-	</dependencies>
-</project>

jc-reaction-test/src/main/java/org/xmlcml/cml/converters/reaction/registry/ReactionConverterRegistry.java

-package org.xmlcml.cml.converters.reaction.registry;
-
-// Mavens needs something here/
-public class ReactionConverterRegistry {
-	public ReactionConverterRegistry() {
-		
-	}
-}

jc-reaction-test/src/main/resources/META-INF/jumbo-converters

-org.xmlcml.cml.converters.molecule.xyz.XYZModule

jc-reaction-test/src/test/java/org/xmlcml/cml/converters/reaction/registry/ReactionConverterRegistryTest.java

-package org.xmlcml.cml.converters.reaction.registry;
-
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.xmlcml.cml.converters.Converter;
-import org.xmlcml.cml.converters.MimeType;
-import org.xmlcml.cml.converters.TypePair;
-import org.xmlcml.cml.converters.cml.CML2CMLLiteConverter;
-import org.xmlcml.cml.converters.cml.CMLCommon;
-import org.xmlcml.cml.converters.reaction.rxn.RXNModule;
-import org.xmlcml.cml.converters.registry.ConverterRegistry;
-
-public class ReactionConverterRegistryTest {
-
-	String CML = "chemical/x-cml";
-	String CDX = "chemical/x-cdx";
-	String FOO = "chemical/x-foo";
-	TypePair PAIR_OK  = new TypePair(FOO, CML);
-	TypePair PAIR_MISSING  = new TypePair(CML, CDX);
-	int MAP_SIZE = 3;
-	int CONVERTER_SIZE = 3;
-
-    @Test
-    public void testMap() {
-    	Map<TypePair, List<Converter>> map = ConverterRegistry.getDefaultConverterRegistry().getMap();
-    	Assert.assertNotNull(map);
-    	// size will change as more are added
-    	Assert.assertEquals(MAP_SIZE, map.size());
-    }
-
-    @Test
-    public void testList() {
-    	List<Converter> converterList = ConverterRegistry.getDefaultConverterRegistry().getConverterList();
-    	Assert.assertNotNull(converterList);
-    	for (Converter converter : converterList) {
-    		System.out.println(converter);
-    	}
-    	Assert.assertEquals(CONVERTER_SIZE, converterList.size());
-    }
-
-    @Test
-    public void testList1() {
-    	List<Converter> converterList = ConverterRegistry.getDefaultConverterRegistry().getConverterList();
-    	boolean found = false;
-    	for (Converter converter : converterList) {
-    		if (CML2CMLLiteConverter.class.equals(converter.getClass())) {
-    			found = true;
-    			break;
-    		}
-    	}
-    	Assert.assertTrue("converter", found);
-    }
-
-    @Test
-    public void testMap1() {
-    	Map<TypePair, List<Converter>> map = ConverterRegistry.getDefaultConverterRegistry().getMap();
-    	Assert.assertTrue(map.containsKey(PAIR_OK));
-    	Assert.assertFalse(map.containsKey(PAIR_MISSING));
-    	for (TypePair typePair1 : map.keySet()) {
-    		System.out.println(typePair1);
-    	}
-    }
-
-    @Test
-    public void testFindConverter() {
-    	List<Converter> converters = ConverterRegistry.getDefaultConverterRegistry().findConverters(
-    			RXNModule.RXN_TYPE.getMimeType(), CMLCommon.CML_TYPE.getMimeType());
-    	Assert.assertNotNull("rxn", converters);
-    	for (Converter converter : converters) {
-    		System.out.println("Converter: "+converter);
-    	}
-    	Assert.assertEquals("rxn", 1, converters.size());
-    	Assert.assertEquals("rxn", "org.xmlcml.cml.converters.reaction.rxn.RXN2CMLConverter", converters.get(0).getClass().getName());
-    }
-
-    @Test
-    public void testFindConverter1() {
-    	List<Converter> converters = ConverterRegistry.getDefaultConverterRegistry().findConverters(CML, CML);
-    	Assert.assertNotNull("cml", converters);
-    	Assert.assertEquals("cml", 1, converters.size());
-    }
-
-	@Test
-	public void testRegistryLoadsConverterList() {
-		List<Converter> list = ConverterRegistry.getDefaultConverterRegistry().getConverterList();
-		assertTrue(list.size()>0);
-	}
-
-	@Test
-	public void testFindFoo2BarConverter() {
-		List<Converter> converterList = ConverterRegistry.getDefaultConverterRegistry().findConverters("foo", "bar");
-		assertNull(converterList);
-	}
-
-	@Test
-	public void testFindTypesFromSuffix() {
-		Set<MimeType> types = ConverterRegistry.getDefaultConverterRegistry().getTypes("cml");
-		Assert.assertNotNull("get types", types);
-		Assert.assertEquals("get types", 1, types.size());
-		Assert.assertEquals("get types", "chemical/x-cml", ((MimeType)types.toArray()[0]).getMimeType());
-	}
-
-	@Test
-	public void testFindTypesFromSuffix1() {
-		Set<MimeType> types = ConverterRegistry.getDefaultConverterRegistry().getTypes("foo");
-		Assert.assertNotNull("get types", types);
-		Assert.assertEquals("types count", 1, types.size());
-		Assert.assertEquals("type", "chemical/x-foo", ((MimeType)types.toArray()[0]).getMimeType());
-	}
-
-	@Test
-	public void testFindSingleTypeFromSuffix() {
-		MimeType type = ConverterRegistry.getDefaultConverterRegistry().getSingleTypeFromSuffix("cml");
-		Assert.assertNotNull("get type", type);
-	}
-
-	@Test
-	public void testSingletonConverterRegistry() {
-		Assert.assertNotNull(ConverterRegistry.getDefaultConverterRegistry());
-	}
-
-	@Test
-	public void testCreateRegistryList0() {
-		ConverterRegistry converterRegistry = new ConverterRegistry(ConverterRegistry.class.getClassLoader());
-		List<Converter> converterList = converterRegistry.getConverterList();
-		Assert.assertNotNull(converterList);
-		converterRegistry.createConvertersList();
-		converterList = converterRegistry.getConverterList();
-		Assert.assertNotNull(converterList);
-	}
-
-	@Test
-	public void testCreateRegistryList() {
-		ConverterRegistry converterRegistry = new ConverterRegistry(ConverterRegistry.class.getClassLoader());
-		converterRegistry.populateAndRegister();
-		List<Converter> converterList = converterRegistry.getConverterList();
-		converterRegistry.createConvertersList();
-		converterList = converterRegistry.getConverterList();
-		// should at least contain org.xmlcml.cml.converters.cml.CML2CMLLiteConverter@76f2d004
-		Assert.assertTrue(converterList.size()>0);
-		boolean hasCmllite = hasConverter(converterList, "org.xmlcml.cml.converters.cml.CML2CMLLiteConverter");
-		Assert.assertTrue("has cmllite", hasCmllite);
-	}
-
-	private boolean hasConverter(List<Converter> converterList, String className) {
-		for (Converter converter : converterList) {
-			if (converter.getClass().getName().equals(className)) {
-				return true;
-			}
-		}
-		return false;
-	}
-
-	@Test
-	public void testSingletonConverterRegistryList0() {
-		ConverterRegistry converterRegistry = ConverterRegistry.getDefaultConverterRegistry();
-		List<Converter> converterList = converterRegistry.getConverterList();
-		Assert.assertNotNull(converterList);
-		Assert.assertEquals("converterList", CONVERTER_SIZE, converterList.size());
-	}
-
-}
         <module>jc-reaction-core</module>
         <module>jc-reaction-rxn</module>
         <module>jc-reaction-all</module>
-        <module>jc-reaction-test</module>
     </modules>
 
    <dependencies>
-        <dependency>
-            <groupId>${jc.groupId}</groupId>
-            <artifactId>jc-top-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
 		<dependency>
 			<groupId>junit</groupId>
 			<artifactId>junit</artifactId>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.