From 897fe803575a25618a3d34a0ad4b983e7e8e2971 Mon Sep 17 00:00:00 2001 From: Willem Cazander Date: Sun, 14 Apr 2013 21:59:26 +0200 Subject: [PATCH] finisched x4o maven plugin and fixed javadoc errors. --- build.txt | 10 +- src/site/site.xml | 20 ++- .../java/org/x4o/xml/X4ODriverManager.java | 18 +++ .../xml/conv/text/StringSplitConverter.java | 2 +- .../java/org/x4o/xml/eld/EldModuleLoader.java | 6 +- .../org/x4o/xml/eld/EldModuleLoaderCore.java | 22 ++-- .../ElementClassAttributeBindingHandler.java | 6 + .../eld/lang/ElementClassBindingHandler.java | 5 +- .../lang/ElementInterfaceBindingHandler.java | 5 +- .../eld/lang/ElementModuleBindingHandler.java | 5 +- ...ElementNamespaceContextBindingHandler.java | 5 +- .../lang/ElementRefectionBindingHandler.java | 5 +- .../StringSplitConverterBindingHandler.java | 2 +- ...tringSplitConverterStepBindingHandler.java | 2 +- ...faultElementNamespaceInstanceProvider.java | 11 +- .../xml/element/ElementBindingHandler.java | 7 +- .../org/x4o/xml/io/AbstractX4OReader.java | 9 +- .../x4o/xml/io/AbstractX4OReaderContext.java | 9 +- .../main/java/org/x4o/xml/io/X4OReader.java | 9 +- .../java/org/x4o/xml/io/X4OReaderContext.java | 9 +- .../org/x4o/xml/io/sax/X4OErrorHandler.java | 18 +-- .../java/org/x4o/xml/io/sax/XMLWriter.java | 2 +- .../xml/lang/AbstractX4OLanguageContext.java | 16 +-- .../org/x4o/xml/lang/DefaultX4OLanguage.java | 14 +- .../lang/DefaultX4OLanguageConfiguration.java | 14 +- .../xml/lang/DefaultX4OLanguageLoader.java | 4 +- .../java/org/x4o/xml/lang/X4OLanguage.java | 9 +- .../org/x4o/xml/lang/X4OLanguageLoader.java | 6 +- .../lang/X4OLanguageModuleLoaderSibling.java | 4 +- .../lang/phase/DefaultX4OPhaseManager.java | 3 +- .../org/x4o/xml/X4ODriverManagerTest.java | 123 ++++++++++++++++++ .../java/org/x4o/xml/eld/EldParserTest.java | 2 +- .../eld/doc/X4OWriteLanguageDocExecutor.java | 8 +- .../xml/meta/MetaLanguageSiblingLoader.java | 24 ++-- x4o-plugin/x4o-plugin-ant/pom.xml | 6 +- x4o-plugin/x4o-plugin-maven/pom.xml | 43 +++--- .../plugin/maven/AbstractX4OLanguageMojo.java | 85 ++++++++---- .../plugin/maven/X4OWriteLanguageDocMojo.java | 4 + .../maven/X4OWriteLanguageSchemaMojo.java | 4 + .../maven/X4OWriteLanguageDocMojoTest.java | 65 ++++----- .../maven/X4OWriteLanguageSchemaMojoTest.java | 72 ++++++++++ .../resources/junit/test-plugin-conf-all.pom | 59 +++++++++ .../resources/junit/test-plugin-conf-lang.pom | 57 ++++++++ .../resources/junit/test-plugin-defaults.pom | 53 ++++++++ .../junit/test-write-language-doc.pom | 33 ----- 45 files changed, 656 insertions(+), 239 deletions(-) create mode 100644 x4o-plugin/x4o-plugin-maven/src/test/java/org/x4o/plugin/maven/X4OWriteLanguageSchemaMojoTest.java create mode 100644 x4o-plugin/x4o-plugin-maven/src/test/resources/junit/test-plugin-conf-all.pom create mode 100644 x4o-plugin/x4o-plugin-maven/src/test/resources/junit/test-plugin-conf-lang.pom create mode 100644 x4o-plugin/x4o-plugin-maven/src/test/resources/junit/test-plugin-defaults.pom delete mode 100644 x4o-plugin/x4o-plugin-maven/src/test/resources/junit/test-write-language-doc.pom diff --git a/build.txt b/build.txt index 170a8db..f2679f5 100644 --- a/build.txt +++ b/build.txt @@ -32,11 +32,12 @@ mvn clean install; -- Update schemas in src -- +-- note; rm after auto schema creation cd project-root/; mvn clean install; -mvn -Pupdate-schema-cel package; -mvn -Pupdate-schema-eld package; +mvn -Pant-update-schema-cel package; +mvn -Pant-update-schema-eld package; - Add the license as manual step in xsd files. (todo in ant task) note: the do 'install' is because of circle plugins. @@ -54,7 +55,7 @@ src/main/build/gnu-up.sh -- Make site -- cd project-root/; -MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m" mvn -Psite-elddoc clean package site site:stage +MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m" mvn -Pbuild-site-x4o-support clean package site site:stage -- Check for code style -- @@ -81,4 +82,5 @@ mvn versions:display-dependency-updates; cd project-root/; mvn clean install; mvn org.x4o.plugin:x4o-plugin-maven:help -mvn org.x4o.plugin:x4o-plugin-maven:write-language-doc -Dlanguages=cel -DoutputDirectory=/tmp/dd -Dverbose=true +mvn org.x4o.plugin:x4o-plugin-maven:write-language-doc -DoutputDirectory=/tmp/doc1 +mvn org.x4o.plugin:x4o-plugin-maven:write-language-doc -DoutputDirectory=/tmp/doc2 -Dlanguages={eld=ALL,swixml=1.0-2.0} -Dverbose=true diff --git a/src/site/site.xml b/src/site/site.xml index 621c55c..bb32aa0 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -51,13 +51,19 @@ - - - - - - - + + + + + + + + + + + + + diff --git a/x4o-driver/src/main/java/org/x4o/xml/X4ODriverManager.java b/x4o-driver/src/main/java/org/x4o/xml/X4ODriverManager.java index 0680232..f43395a 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/X4ODriverManager.java +++ b/x4o-driver/src/main/java/org/x4o/xml/X4ODriverManager.java @@ -146,16 +146,31 @@ public final class X4ODriverManager { } static public void registerX4ODriver(X4ODriver driver) { + if (driver==null) { + throw new NullPointerException("Can't register null driver."); + } if (driver.getLanguageName()==null) { throw new NullPointerException("Error in driver impl languageName is null in: "+driver.getClass()); } + if (driver.getLanguageName().length()==0) { + throw new IllegalArgumentException("Error in driver impl languageName is empty in: "+driver.getClass()); + } if (driver.getLanguageVersions()==null) { throw new NullPointerException("Error in driver impl languageVersions is null in: "+driver.getClass()); } + if (driver.getLanguageVersions().length==0) { + throw new IllegalArgumentException("Error in driver impl languageVersions is empty in: "+driver.getClass()); + } instance.drivers.put(driver.getLanguageName(), driver); } static public void deregisterX4ODriver(X4ODriver driver) { + if (driver==null) { + throw new NullPointerException("Can't deregister null driver."); + } + if (driver.getLanguageName()==null) { + throw new NullPointerException("Error in driver impl languageName is null in: "+driver.getClass()); + } instance.drivers.remove(driver.getLanguageName()); } @@ -166,6 +181,9 @@ public final class X4ODriverManager { if (language.isEmpty()) { throw new IllegalArgumentException("Can't provider driver for empty language."); } + if (instance.drivers.containsKey(language)) { + return instance.drivers.get(language); + } try { instance.lazyInit(); } catch (IOException e) { diff --git a/x4o-driver/src/main/java/org/x4o/xml/conv/text/StringSplitConverter.java b/x4o-driver/src/main/java/org/x4o/xml/conv/text/StringSplitConverter.java index 1a4823f..ad810bf 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/conv/text/StringSplitConverter.java +++ b/x4o-driver/src/main/java/org/x4o/xml/conv/text/StringSplitConverter.java @@ -136,7 +136,7 @@ public class StringSplitConverter extends AbstractStringObjectConverter { * Converts object into string. * * @see org.x4o.xml.conv.AbstractStringObjectConverter#convertStringBack(java.lang.Object, java.util.Locale) - * @param obj The object to convert to string. + * @param object The object to convert to string. * @param locale The locale to convert the object from. * @return The string converted from the object. * @throws ObjectConverterException When conversion fails. diff --git a/x4o-driver/src/main/java/org/x4o/xml/eld/EldModuleLoader.java b/x4o-driver/src/main/java/org/x4o/xml/eld/EldModuleLoader.java index 18c2b70..7ff6864 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/eld/EldModuleLoader.java +++ b/x4o-driver/src/main/java/org/x4o/xml/eld/EldModuleLoader.java @@ -61,8 +61,6 @@ public class EldModuleLoader implements X4OLanguageModuleLoader { /** The EL key to access the parent language element langauge. */ public static final String EL_PARENT_LANGUAGE = "parentLanguage"; - - /** * Creates an ELD/CEL module loader. * @param eldResource The resource to load. @@ -79,10 +77,10 @@ public class EldModuleLoader implements X4OLanguageModuleLoader { /** * Loads the ELD language into the module. - * @param elementLanguage The langauge to load for. + * @param language The langauge to load for. * @param elementLanguageModule The module to load it in. * @throws X4OLanguageModuleLoaderException When eld language could not be loaded. - * @see org.x4o.xml.lang.X4OLanguageModuleLoader#loadLanguageModule(org.x4o.xml.lang.X4OLanguageContext, org.x4o.xml.lang.X4OLanguageModule) + * @see org.x4o.xml.lang.X4OLanguageModuleLoader#loadLanguageModule(org.x4o.xml.lang.X4OLanguageLocal, org.x4o.xml.lang.X4OLanguageModule) */ public void loadLanguageModule(X4OLanguageLocal language,X4OLanguageModule elementLanguageModule) throws X4OLanguageModuleLoaderException { logger.fine("Loading name eld file from resource: "+eldResource); diff --git a/x4o-driver/src/main/java/org/x4o/xml/eld/EldModuleLoaderCore.java b/x4o-driver/src/main/java/org/x4o/xml/eld/EldModuleLoaderCore.java index 89d9975..7e45a5c 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/eld/EldModuleLoaderCore.java +++ b/x4o-driver/src/main/java/org/x4o/xml/eld/EldModuleLoaderCore.java @@ -82,9 +82,9 @@ public class EldModuleLoaderCore implements X4OLanguageModuleLoader { /** * Loads the CEL language into the module. - * @param elementLanguage The langauge to load for. - * @param elementLanguageModule The module to load it in. - * @see org.x4o.xml.lang.X4OLanguageModuleLoader#loadLanguageModule(org.x4o.xml.element.ElementLanguage, org.x4o.xml.lang.X4OLanguageModule) + * @param language The langauge to load for. + * @param languageModule The module to load it in. + * @see org.x4o.xml.lang.X4OLanguageModuleLoader#loadLanguageModule(org.x4o.xml.lang.X4OLanguageLocal, org.x4o.xml.lang.X4OLanguageModule) */ public void loadLanguageModule(X4OLanguageLocal language,X4OLanguageModule languageModule) throws X4OLanguageModuleLoaderException { @@ -113,8 +113,8 @@ public class EldModuleLoaderCore implements X4OLanguageModuleLoader { /** * Adds only Element class beans which need extra meta info for schema. - * - * @param elementClassList The list to fill. + * @param namespace The namespace to config. + * @param language The language to config for. * @throws X4OLanguageModuleLoaderException */ private void configElementClasses(X4OLanguage language,ElementNamespaceContext namespace) throws X4OLanguageModuleLoaderException { @@ -243,8 +243,11 @@ public class EldModuleLoaderCore implements X4OLanguageModuleLoader { } /** - * Creates new ElementClassAttribute instance. - * @param elementLanguage The ElementLanguage to create from. + * Creates new configed ElementClassAttribute instance. + * @param language The X4OLanguage to create from. + * @param name The name of the attribute. + * @param required Is the attribute required. + * @param converter The converter for the attribute. * @return The new ElementClassAttribute instance. * @throws X4OLanguageModuleLoaderException When class could not be created. */ @@ -269,9 +272,10 @@ public class EldModuleLoaderCore implements X4OLanguageModuleLoader { /** * Adds binding handler to module. - * @param id The id to set on the handler. + * @param languageModule The language module. * @param handler The handler to add the the module. - * @param languageModule The module to add the handler to. + * @param id The handler id. + * @param description The handler descripion. */ private void addBindingHandler(X4OLanguageModule languageModule,ElementBindingHandler handler,String id,String description) { handler.setId(id); diff --git a/x4o-driver/src/main/java/org/x4o/xml/eld/lang/ElementClassAttributeBindingHandler.java b/x4o-driver/src/main/java/org/x4o/xml/eld/lang/ElementClassAttributeBindingHandler.java index 1ec8a54..c8359d5 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/eld/lang/ElementClassAttributeBindingHandler.java +++ b/x4o-driver/src/main/java/org/x4o/xml/eld/lang/ElementClassAttributeBindingHandler.java @@ -56,12 +56,18 @@ public class ElementClassAttributeBindingHandler extends AbstractElementBindingH return CLASSES_CHILD; } + /** + * @see org.x4o.xml.element.AbstractElementBindingHandler#bindChild(org.x4o.xml.element.Element, java.lang.Object, java.lang.Object) + */ public void bindChild(Element childElement,ElementClassAttribute parentObject,Object childObject) throws ElementBindingHandlerException { if (childObject instanceof ObjectConverter) { parentObject.setObjectConverter((ObjectConverter)childObject); } } + /** + * @see org.x4o.xml.element.AbstractElementBindingHandler#createChilderen(org.x4o.xml.element.Element, java.lang.Object) + */ public void createChilderen(Element parentElement,ElementClassAttribute parentObject) throws ElementBindingHandlerException { createChild(parentElement, parentObject.getObjectConverter()); } diff --git a/x4o-driver/src/main/java/org/x4o/xml/eld/lang/ElementClassBindingHandler.java b/x4o-driver/src/main/java/org/x4o/xml/eld/lang/ElementClassBindingHandler.java index 88e4dc6..e71ee14 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/eld/lang/ElementClassBindingHandler.java +++ b/x4o-driver/src/main/java/org/x4o/xml/eld/lang/ElementClassBindingHandler.java @@ -59,7 +59,7 @@ public class ElementClassBindingHandler extends AbstractElementBindingHandler extends AbstractX4OReaderContext i * @throws NullPointerException * @throws SAXException * @throws IOException - * @see org.x4o.xml.sax.AbstractXMLreadr#read(java.io.InputStream,java.lang.String,java.net.URL) + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ public T readFile(String fileName) throws ParserConfigurationException,FileNotFoundException,SecurityException,NullPointerException,SAXException,IOException { if (fileName==null) { @@ -90,7 +90,7 @@ abstract public class AbstractX4OReader extends AbstractX4OReaderContext i * @throws NullPointerException * @throws SAXException * @throws IOException - * @see org.x4o.xml.sax.AbstractXMLreadr#read(java.io.InputStream,java.lang.String,java.net.URL) + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ public T readFile(File file) throws ParserConfigurationException,FileNotFoundException,SecurityException,NullPointerException,SAXException,IOException { if (file==null) { @@ -122,6 +122,7 @@ abstract public class AbstractX4OReader extends AbstractX4OReaderContext i * @throws NullPointerException * @throws SAXException * @throws IOException + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ public T readResource(String resourceName) throws ParserConfigurationException,FileNotFoundException,SecurityException,NullPointerException,SAXException,IOException { if (resourceName==null) { @@ -156,7 +157,7 @@ abstract public class AbstractX4OReader extends AbstractX4OReaderContext i * @throws SAXException * @throws IOException * @throws NullPointerException - * @see org.x4o.xml.sax.AbstractXMLreadr#read(java.io.InputStream,java.lang.String,java.net.URL) + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ public T readString(String xmlString) throws ParserConfigurationException,SAXException,IOException,NullPointerException { if (xmlString==null) { @@ -173,7 +174,7 @@ abstract public class AbstractX4OReader extends AbstractX4OReaderContext i * @throws SAXException * @throws IOException * @throws NullPointerException - * @see org.x4o.xml.sax.AbstractXMLreadr#read(java.io.InputStream,java.lang.String,java.net.URL) + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ public T readUrl(URL url) throws ParserConfigurationException,SAXException,IOException,NullPointerException { if (url==null) { diff --git a/x4o-driver/src/main/java/org/x4o/xml/io/AbstractX4OReaderContext.java b/x4o-driver/src/main/java/org/x4o/xml/io/AbstractX4OReaderContext.java index b5fc80c..76a928f 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/io/AbstractX4OReaderContext.java +++ b/x4o-driver/src/main/java/org/x4o/xml/io/AbstractX4OReaderContext.java @@ -57,7 +57,7 @@ abstract public class AbstractX4OReaderContext extends AbstractX4OConnection * @throws NullPointerException * @throws SAXException * @throws IOException - * @see org.x4o.xml.sax.AbstractXMLreadr#read(java.io.InputStream,java.lang.String,java.net.URL) + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ public X4OLanguageContext readFileContext(String fileName) throws ParserConfigurationException,FileNotFoundException,SecurityException,NullPointerException,SAXException,IOException { if (fileName==null) { @@ -75,7 +75,7 @@ abstract public class AbstractX4OReaderContext extends AbstractX4OConnection * @throws NullPointerException * @throws SAXException * @throws IOException - * @see org.x4o.xml.sax.AbstractXMLreadr#read(java.io.InputStream,java.lang.String,java.net.URL) + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ public X4OLanguageContext readFileContext(File file) throws ParserConfigurationException,FileNotFoundException,SecurityException,NullPointerException,SAXException,IOException { if (file==null) { @@ -107,6 +107,7 @@ abstract public class AbstractX4OReaderContext extends AbstractX4OConnection * @throws NullPointerException * @throws SAXException * @throws IOException + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ public X4OLanguageContext readResourceContext(String resourceName) throws ParserConfigurationException,FileNotFoundException,SecurityException,NullPointerException,SAXException,IOException { if (resourceName==null) { @@ -141,7 +142,7 @@ abstract public class AbstractX4OReaderContext extends AbstractX4OConnection * @throws SAXException * @throws IOException * @throws NullPointerException - * @see org.x4o.xml.sax.AbstractXMLreadr#read(java.io.InputStream,java.lang.String,java.net.URL) + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ public X4OLanguageContext readStringContext(String xmlString) throws ParserConfigurationException,SAXException,IOException,NullPointerException { if (xmlString==null) { @@ -158,7 +159,7 @@ abstract public class AbstractX4OReaderContext extends AbstractX4OConnection * @throws SAXException * @throws IOException * @throws NullPointerException - * @see org.x4o.xml.sax.AbstractXMLreadr#read(java.io.InputStream,java.lang.String,java.net.URL) + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ public X4OLanguageContext readUrlContext(URL url) throws ParserConfigurationException,SAXException,IOException,NullPointerException { if (url==null) { diff --git a/x4o-driver/src/main/java/org/x4o/xml/io/X4OReader.java b/x4o-driver/src/main/java/org/x4o/xml/io/X4OReader.java index 18bd13b..585d73d 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/io/X4OReader.java +++ b/x4o-driver/src/main/java/org/x4o/xml/io/X4OReader.java @@ -61,7 +61,7 @@ public interface X4OReader extends X4OConnection { * @throws NullPointerException * @throws SAXException * @throws IOException - * @see org.x4o.xml.io.AbstractX4OReader#parse(java.io.InputStream,java.lang.String,java.net.URL) + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ T readFile(String fileName) throws ParserConfigurationException,FileNotFoundException,SecurityException,NullPointerException,SAXException,IOException; @@ -74,7 +74,7 @@ public interface X4OReader extends X4OConnection { * @throws NullPointerException * @throws SAXException * @throws IOException - * @see org.x4o.xml.io.AbstractX4OReader#parse(java.io.InputStream,java.lang.String,java.net.URL) + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ T readFile(File file) throws ParserConfigurationException,FileNotFoundException,SecurityException,NullPointerException,SAXException,IOException; @@ -87,6 +87,7 @@ public interface X4OReader extends X4OConnection { * @throws NullPointerException * @throws SAXException * @throws IOException + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ T readResource(String resourceName) throws ParserConfigurationException,FileNotFoundException,SecurityException,NullPointerException,SAXException,IOException; @@ -97,7 +98,7 @@ public interface X4OReader extends X4OConnection { * @throws SAXException * @throws IOException * @throws NullPointerException - * @see org.x4o.xml.io.AbstractX4OReader#parse(java.io.InputStream,java.lang.String,java.net.URL) + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ T readString(String xmlString) throws ParserConfigurationException,SAXException,IOException,NullPointerException; @@ -108,7 +109,7 @@ public interface X4OReader extends X4OConnection { * @throws SAXException * @throws IOException * @throws NullPointerException - * @see org.x4o.xml.io.AbstractX4OReader#parse(java.io.InputStream,java.lang.String,java.net.URL) + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ T readUrl(URL url) throws ParserConfigurationException,SAXException,IOException,NullPointerException; } diff --git a/x4o-driver/src/main/java/org/x4o/xml/io/X4OReaderContext.java b/x4o-driver/src/main/java/org/x4o/xml/io/X4OReaderContext.java index 9bd2204..04e6fb1 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/io/X4OReaderContext.java +++ b/x4o-driver/src/main/java/org/x4o/xml/io/X4OReaderContext.java @@ -63,7 +63,7 @@ public interface X4OReaderContext extends X4OReader { * @throws NullPointerException * @throws SAXException * @throws IOException - * @see org.x4o.xml.io.AbstractX4OReader#parse(java.io.InputStream,java.lang.String,java.net.URL) + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ X4OLanguageContext readFileContext(String fileName) throws ParserConfigurationException,FileNotFoundException,SecurityException,NullPointerException,SAXException,IOException; @@ -76,7 +76,7 @@ public interface X4OReaderContext extends X4OReader { * @throws NullPointerException * @throws SAXException * @throws IOException - * @see org.x4o.xml.io.AbstractX4OReader#parse(java.io.InputStream,java.lang.String,java.net.URL) + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ X4OLanguageContext readFileContext(File file) throws ParserConfigurationException,FileNotFoundException,SecurityException,NullPointerException,SAXException,IOException; @@ -89,6 +89,7 @@ public interface X4OReaderContext extends X4OReader { * @throws NullPointerException * @throws SAXException * @throws IOException + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ X4OLanguageContext readResourceContext(String resourceName) throws ParserConfigurationException,FileNotFoundException,SecurityException,NullPointerException,SAXException,IOException; @@ -99,7 +100,7 @@ public interface X4OReaderContext extends X4OReader { * @throws SAXException * @throws IOException * @throws NullPointerException - * @see org.x4o.xml.io.AbstractX4OReader#parse(java.io.InputStream,java.lang.String,java.net.URL) + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ X4OLanguageContext readStringContext(String xmlString) throws ParserConfigurationException,SAXException,IOException,NullPointerException; @@ -110,7 +111,7 @@ public interface X4OReaderContext extends X4OReader { * @throws SAXException * @throws IOException * @throws NullPointerException - * @see org.x4o.xml.io.AbstractX4OReader#parse(java.io.InputStream,java.lang.String,java.net.URL) + * @see org.x4o.xml.io.X4OReaderContext#readContext(java.io.InputStream,java.lang.String,java.net.URL) */ X4OLanguageContext readUrlContext(URL url) throws ParserConfigurationException,SAXException,IOException,NullPointerException; } diff --git a/x4o-driver/src/main/java/org/x4o/xml/io/sax/X4OErrorHandler.java b/x4o-driver/src/main/java/org/x4o/xml/io/sax/X4OErrorHandler.java index 0278fd0..147ced8 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/io/sax/X4OErrorHandler.java +++ b/x4o-driver/src/main/java/org/x4o/xml/io/sax/X4OErrorHandler.java @@ -38,31 +38,31 @@ import org.xml.sax.SAXParseException; */ public class X4OErrorHandler implements ErrorHandler { - private X4OLanguageContext elementContext = null; + private X4OLanguageContext languageContext = null; private ErrorHandler errorHandler = null; /** * Construct a new SAXErrorPrinter - * @param language The language to get errors to. + * @param languageContext The language to get errors to. */ - public X4OErrorHandler(X4OLanguageContext elementContext) { - if (elementContext==null) { - throw new NullPointerException("Can't debug and proxy errors with null elementContext."); + public X4OErrorHandler(X4OLanguageContext languageContext) { + if (languageContext==null) { + throw new NullPointerException("Can't debug and proxy errors with null languageContext."); } - this.elementContext=elementContext; - this.errorHandler=(ErrorHandler)elementContext.getLanguageProperty(X4OLanguageProperty.CONFIG_ERROR_HANDLER); + this.languageContext=languageContext; + this.errorHandler=(ErrorHandler)languageContext.getLanguageProperty(X4OLanguageProperty.CONFIG_ERROR_HANDLER); } /** * Prints the error message to debug output. */ private void printError(boolean isError, SAXParseException exception) throws SAXException { - if (elementContext.hasX4ODebugWriter()==false) { + if (languageContext.hasX4ODebugWriter()==false) { return; } String message = printErrorString(isError,exception); try { - elementContext.getX4ODebugWriter().debugPhaseMessage(message, X4OErrorHandler.class); + languageContext.getX4ODebugWriter().debugPhaseMessage(message, X4OErrorHandler.class); } catch (ElementException e) { throw new SAXException(e); } diff --git a/x4o-driver/src/main/java/org/x4o/xml/io/sax/XMLWriter.java b/x4o-driver/src/main/java/org/x4o/xml/io/sax/XMLWriter.java index 9e3b664..68b106f 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/io/sax/XMLWriter.java +++ b/x4o-driver/src/main/java/org/x4o/xml/io/sax/XMLWriter.java @@ -260,7 +260,7 @@ public class XMLWriter extends DefaultHandler2 { public void endElement(String uri, String localName, String name) throws SAXException { if (startElement!=null) { String tag = startElement.toString(); - write(tag.substring(0,tag.length()-1)); + write(tag.substring(0,tag.length()-1));// rm normal close write(XMLConstants.TAG_CLOSE_EMPTY); startElement=null; indent--; diff --git a/x4o-driver/src/main/java/org/x4o/xml/lang/AbstractX4OLanguageContext.java b/x4o-driver/src/main/java/org/x4o/xml/lang/AbstractX4OLanguageContext.java index 0b16899..05df29a 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/lang/AbstractX4OLanguageContext.java +++ b/x4o-driver/src/main/java/org/x4o/xml/lang/AbstractX4OLanguageContext.java @@ -152,7 +152,7 @@ public abstract class AbstractX4OLanguageContext implements X4OLanguageContextLo } /** - * @see org.x4o.xml.lang.X4OLanguageContext#setCurrentPhase(org.x4o.xml.lang.phase.X4OPhase) + * @see org.x4o.xml.lang.X4OLanguageContextLocal#setCurrentPhase(org.x4o.xml.lang.phase.X4OPhase) */ public void setCurrentPhase(X4OPhase currentX4OPhase) { this.currentX4OPhase = currentX4OPhase; @@ -205,14 +205,14 @@ public abstract class AbstractX4OLanguageContext implements X4OLanguageContextLo } /** - * @see org.x4o.xml.lang.X4OLanguageConfiguration#getLanguageProperty(org.x4o.xml.lang.X4OLanguageProperty) + * */ public Object getLanguageProperty(X4OLanguageProperty property) { return getLanguageProperty(property.toUri()); } /** - * @see org.x4o.xml.lang.X4OLanguageConfiguration#setLanguageProperty(org.x4o.xml.lang.X4OLanguageProperty, java.lang.Object) + * */ public void setLanguageProperty(X4OLanguageProperty property, Object value) { if (property.isValueValid(value)==false) { @@ -222,7 +222,7 @@ public abstract class AbstractX4OLanguageContext implements X4OLanguageContextLo } /** - * @see org.x4o.xml.lang.X4OLanguageConfiguration#getLanguagePropertyBoolean(org.x4o.xml.lang.X4OLanguageProperty) + * */ public boolean getLanguagePropertyBoolean(X4OLanguageProperty property) { Object value = getLanguageProperty(property); @@ -233,7 +233,7 @@ public abstract class AbstractX4OLanguageContext implements X4OLanguageContextLo } /** - * @see org.x4o.xml.lang.X4OLanguageConfiguration#getLanguagePropertyInteger(org.x4o.xml.lang.X4OLanguageProperty) + * */ public int getLanguagePropertyInteger(X4OLanguageProperty property) { Object value = getLanguageProperty(property); @@ -252,21 +252,21 @@ public abstract class AbstractX4OLanguageContext implements X4OLanguageContextLo } /** - * @see org.x4o.xml.lang.X4OLanguageConfiguration#getX4ODebugWriter() + * @see org.x4o.xml.lang.X4OLanguageContext#getX4ODebugWriter() */ public X4ODebugWriter getX4ODebugWriter() { return debugWriter; } /** - * @see org.x4o.xml.lang.X4OLanguageConfiguration#hasX4ODebugWriter() + * @see org.x4o.xml.lang.X4OLanguageContext#hasX4ODebugWriter() */ public boolean hasX4ODebugWriter() { return debugWriter!=null; } /** - * @see org.x4o.xml.lang.X4OLanguageConfiguration#setX4ODebugWriter(org.x4o.xml.io.sax.X4ODebugWriter) + * @see org.x4o.xml.lang.X4OLanguageContextLocal#setX4ODebugWriter(org.x4o.xml.io.sax.X4ODebugWriter) */ public void setX4ODebugWriter(X4ODebugWriter debugWriter) { this.debugWriter=debugWriter; diff --git a/x4o-driver/src/main/java/org/x4o/xml/lang/DefaultX4OLanguage.java b/x4o-driver/src/main/java/org/x4o/xml/lang/DefaultX4OLanguage.java index e9c90ba..b34bd94 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/lang/DefaultX4OLanguage.java +++ b/x4o-driver/src/main/java/org/x4o/xml/lang/DefaultX4OLanguage.java @@ -73,7 +73,7 @@ public class DefaultX4OLanguage implements X4OLanguageLocal { } /** - * @see org.x4o.xml.lang.X4OLanguageContext#addLanguageModule(org.x4o.xml.lang.X4OLanguageModule) + * @see org.x4o.xml.lang.X4OLanguageLocal#addLanguageModule(org.x4o.xml.lang.X4OLanguageModule) */ public void addLanguageModule(X4OLanguageModule elementLanguageModule) { if (elementLanguageModule.getId()==null) { @@ -83,7 +83,7 @@ public class DefaultX4OLanguage implements X4OLanguageLocal { } /** - * @see org.x4o.xml.lang.X4OLanguageContext#getLanguageModules() + * @see org.x4o.xml.lang.X4OLanguage#getLanguageModules() */ public List getLanguageModules() { return elementLanguageModules; @@ -132,7 +132,7 @@ public class DefaultX4OLanguage implements X4OLanguageLocal { } /** - * @see org.x4o.xml.lang.X4OLanguage#createElementInstance(java.lang.Class) + * @see org.x4o.xml.lang.X4OLanguage#createElementInstance(org.x4o.xml.lang.X4OLanguageContext,java.lang.Class) */ public Element createElementInstance(X4OLanguageContext context,Class objectClass) { for (X4OLanguageModule modContext:getLanguageModules()) { @@ -152,7 +152,7 @@ public class DefaultX4OLanguage implements X4OLanguageLocal { } /** - * @see org.x4o.xml.lang.X4OLanguageContext#findElementBindingHandlers(java.lang.Object) + * @see org.x4o.xml.lang.X4OLanguage#findElementBindingHandlers(java.lang.Object) */ public List findElementBindingHandlers(Object parent) { List result = new ArrayList(50); @@ -167,7 +167,7 @@ public class DefaultX4OLanguage implements X4OLanguageLocal { } /** - * @see org.x4o.xml.lang.X4OLanguageContext#findElementBindingHandlers(java.lang.Object,java.lang.Object) + * @see org.x4o.xml.lang.X4OLanguage#findElementBindingHandlers(java.lang.Object,java.lang.Object) */ public List findElementBindingHandlers(Object parent,Object child) { List result = new ArrayList(50); @@ -213,7 +213,7 @@ public class DefaultX4OLanguage implements X4OLanguageLocal { } /** - * @see org.x4o.xml.lang.X4OLanguageContext#findElementInterfaces(java.lang.Object) + * @see org.x4o.xml.lang.X4OLanguage#findElementInterfaces(java.lang.Object) */ public List findElementInterfaces(Object elementObject) { if (elementObject==null) { @@ -238,7 +238,7 @@ public class DefaultX4OLanguage implements X4OLanguageLocal { } /** - * @see org.x4o.xml.lang.X4OLanguageContext#findElementNamespaceContext(java.lang.String) + * @see org.x4o.xml.lang.X4OLanguage#findElementNamespaceContext(java.lang.String) */ public ElementNamespaceContext findElementNamespaceContext(String namespaceUri) { diff --git a/x4o-driver/src/main/java/org/x4o/xml/lang/DefaultX4OLanguageConfiguration.java b/x4o-driver/src/main/java/org/x4o/xml/lang/DefaultX4OLanguageConfiguration.java index a09ce06..11160e9 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/lang/DefaultX4OLanguageConfiguration.java +++ b/x4o-driver/src/main/java/org/x4o/xml/lang/DefaultX4OLanguageConfiguration.java @@ -160,14 +160,14 @@ public class DefaultX4OLanguageConfiguration implements X4OLanguageConfiguration } /** - * @see org.x4o.xml.lang.X4OLanguageConfiguration#getDefaultX4OLanguageVersionFilter() + * @see org.x4o.xml.lang.X4OLanguageConfiguration#getDefaultLanguageVersionFilter() */ public Class getDefaultLanguageVersionFilter() { return DefaultX4OLanguageVersionFilter.class; } /** - * @see org.x4o.xml.lang.X4OLanguageConfiguration#getDefaultX4OLanguageLoader() + * @see org.x4o.xml.lang.X4OLanguageConfiguration#getDefaultLanguageLoader() */ public Class getDefaultLanguageLoader() { return DefaultX4OLanguageLoader.class; @@ -181,7 +181,7 @@ public class DefaultX4OLanguageConfiguration implements X4OLanguageConfiguration } /** - * @see org.x4o.xml.lang.X4OLanguageConfiguration#getSAXParserProperties() + * @see org.x4o.xml.lang.X4OLanguageConfiguration#getSAXParserProperties(org.x4o.xml.lang.X4OLanguageContext) */ public Map getSAXParserProperties(X4OLanguageContext elementContext) { Map saxParserProperties = new HashMap(1); @@ -189,7 +189,7 @@ public class DefaultX4OLanguageConfiguration implements X4OLanguageConfiguration } /** - * @see org.x4o.xml.lang.X4OLanguageConfiguration#getSAXParserPropertiesOptional() + * @see org.x4o.xml.lang.X4OLanguageConfiguration#getSAXParserPropertiesOptional(org.x4o.xml.lang.X4OLanguageContext) */ public Map getSAXParserPropertiesOptional(X4OLanguageContext elementContext) { Map saxParserProperties = new HashMap(1); @@ -198,7 +198,7 @@ public class DefaultX4OLanguageConfiguration implements X4OLanguageConfiguration } /** - * @see org.x4o.xml.lang.X4OLanguageConfiguration#getSAXParserFeatures() + * @see org.x4o.xml.lang.X4OLanguageConfiguration#getSAXParserFeatures(org.x4o.xml.lang.X4OLanguageContext) */ public Map getSAXParserFeatures(X4OLanguageContext elementContext) { @@ -247,7 +247,7 @@ public class DefaultX4OLanguageConfiguration implements X4OLanguageConfiguration } /** - * @see org.x4o.xml.lang.X4OLanguageConfiguration#getSAXParserFeaturesOptional() + * @see org.x4o.xml.lang.X4OLanguageConfiguration#getSAXParserFeaturesOptional(org.x4o.xml.lang.X4OLanguageContext) */ public Map getSAXParserFeaturesOptional(X4OLanguageContext elementContext) { Map saxParserFeatures = new HashMap(20); @@ -271,7 +271,7 @@ public class DefaultX4OLanguageConfiguration implements X4OLanguageConfiguration } /** - * @see org.x4o.xml.lang.X4OLanguageConfiguration#getSAXParserFeaturesRequired() + * @see org.x4o.xml.lang.X4OLanguageConfiguration#getSAXParserFeaturesRequired(org.x4o.xml.lang.X4OLanguageContext) */ public List getSAXParserFeaturesRequired(X4OLanguageContext elementContext) { List result = new ArrayList(5); diff --git a/x4o-driver/src/main/java/org/x4o/xml/lang/DefaultX4OLanguageLoader.java b/x4o-driver/src/main/java/org/x4o/xml/lang/DefaultX4OLanguageLoader.java index 809b137..a8d6ff4 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/lang/DefaultX4OLanguageLoader.java +++ b/x4o-driver/src/main/java/org/x4o/xml/lang/DefaultX4OLanguageLoader.java @@ -80,7 +80,7 @@ public class DefaultX4OLanguageLoader implements X4OLanguageLoader { } /** - * @see org.x4o.xml.lang.X4OLanguageLoader#loadLanguage(org.x4o.xml.element.ElementLanguage, java.lang.String, java.lang.String) + * @see org.x4o.xml.lang.X4OLanguageLoader#loadLanguage(org.x4o.xml.lang.X4OLanguageLocal, java.lang.String, java.lang.String) */ public void loadLanguage(X4OLanguageLocal languageLocal, String language,String languageVersion) throws X4OLanguageLoaderException { try { @@ -156,7 +156,7 @@ public class DefaultX4OLanguageLoader implements X4OLanguageLoader { /** * Loads all modules of an language. - * @param elementLanguage The ElementLanguage to load for. + * @param languageLocal The ElementLanguage to load for. * @param language The language to load. */ protected void loadLanguageModules(X4OLanguageLocal languageLocal,String language) throws IOException, SAXException { diff --git a/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguage.java b/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguage.java index e611ae5..b58e11c 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguage.java +++ b/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguage.java @@ -62,15 +62,16 @@ public interface X4OLanguage { X4OLanguageConfiguration getLanguageConfiguration(); /** - * Creates and filles the inital element language used to store the language. + * Creates and fills the initial element language used to store the language. * @return The newly created ElementLanguage. */ X4OLanguageContext createLanguageContext(X4ODriver driver); /** - * Search language for object and create elememt for it. - * @param object The object to search for. - * @return Returns an new Elememt instance for the object. + * Search language for object and create element for it. + * @param context The X4O language context to create for. + * @param objectClass The object to search for. + * @return Returns an new Element instance for the object. */ Element createElementInstance(X4OLanguageContext context,Class objectClass); diff --git a/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguageLoader.java b/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguageLoader.java index a1e45d4..fd6f28e 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguageLoader.java +++ b/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguageLoader.java @@ -33,10 +33,10 @@ public interface X4OLanguageLoader { /** * Loads the language modules. - * @param elementLanguage The elementLanguage to load the module in. - * @param language The language to load. + * @param languageLocal The elementLanguage to load the module in. + * @param languageName The language name to load. * @param languageVersion The language version to load. * @throws X4OLanguageLoaderException When there is an error. */ - void loadLanguage(X4OLanguageLocal languageLocal,String language,String languageVersion) throws X4OLanguageLoaderException; + void loadLanguage(X4OLanguageLocal languageLocal,String languageName,String languageVersion) throws X4OLanguageLoaderException; } diff --git a/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguageModuleLoaderSibling.java b/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguageModuleLoaderSibling.java index ae03903..a265dbd 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguageModuleLoaderSibling.java +++ b/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguageModuleLoaderSibling.java @@ -37,8 +37,8 @@ public interface X4OLanguageModuleLoaderSibling extends X4OLanguageModuleLoader /** * Loads in the sibling language. * @param languageLocal The ElementLanguage for which we load an sibling. - * @param loader The loader to use to load the x4o languages. + * @param languageLoader The loader to use to load the x4o languages. * @throws X4OLanguageLoaderException Gets thrown when there is an error loading the sibling language. */ - void loadLanguageSibling(X4OLanguageLocal languageLocal,X4OLanguageLoader loader) throws X4OLanguageLoaderException; + void loadLanguageSibling(X4OLanguageLocal languageLocal,X4OLanguageLoader languageLoader) throws X4OLanguageLoaderException; } diff --git a/x4o-driver/src/main/java/org/x4o/xml/lang/phase/DefaultX4OPhaseManager.java b/x4o-driver/src/main/java/org/x4o/xml/lang/phase/DefaultX4OPhaseManager.java index bf181d4..e46c9c2 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/lang/phase/DefaultX4OPhaseManager.java +++ b/x4o-driver/src/main/java/org/x4o/xml/lang/phase/DefaultX4OPhaseManager.java @@ -46,8 +46,7 @@ public class DefaultX4OPhaseManager implements X4OPhaseManager { private List x4oPhases = null; /** - * Local package constructor. - * @param elementLanguage The ElementLanguage to run the phases on. + * Constructor. */ public DefaultX4OPhaseManager() { x4oPhases = new ArrayList(25); diff --git a/x4o-driver/src/test/java/org/x4o/xml/X4ODriverManagerTest.java b/x4o-driver/src/test/java/org/x4o/xml/X4ODriverManagerTest.java index 0d7ed50..981954e 100644 --- a/x4o-driver/src/test/java/org/x4o/xml/X4ODriverManagerTest.java +++ b/x4o-driver/src/test/java/org/x4o/xml/X4ODriverManagerTest.java @@ -109,4 +109,127 @@ public class X4ODriverManagerTest extends TestCase { long loopTime = System.currentTimeMillis() - startTime; assertEquals("Language list loop is slow;"+loopTime,true, loopTime<500); } + + public void testRegisterDriverNull() throws Exception { + Exception e = null; + try { + X4ODriverManager.registerX4ODriver(null); + } catch (Exception catchE) { + e = catchE; + } + assertNotNull("No exception",e); + assertEquals("Wrong exception class",NullPointerException.class, e.getClass()); + assertTrue("Wrong exception message",e.getMessage().contains("null")); + } + + public void testRegisterDriverNameNull() throws Exception { + Exception e = null; + try { + X4ODriverManager.registerX4ODriver(new X4ODriver() { + @Override public String[] getLanguageVersions() { return new String[]{"1.0"}; } + @Override public String getLanguageName() { return null; } + + }); + } catch (Exception catchE) { + e = catchE; + } + assertNotNull("No exception",e); + assertEquals("Wrong exception class",NullPointerException.class, e.getClass()); + assertTrue("Wrong exception message",e.getMessage().contains("null")); + } + + public void testRegisterDriverNameEmpty() throws Exception { + Exception e = null; + try { + X4ODriverManager.registerX4ODriver(new X4ODriver() { + @Override public String[] getLanguageVersions() { return new String[]{"1.0"}; } + @Override public String getLanguageName() { return ""; } + + }); + } catch (Exception catchE) { + e = catchE; + } + assertNotNull("No exception",e); + assertEquals("Wrong exception class",IllegalArgumentException.class, e.getClass()); + assertTrue("Wrong exception message",e.getMessage().contains("empty")); + } + + public void testRegisterDriverVersionNull() throws Exception { + Exception e = null; + try { + X4ODriverManager.registerX4ODriver(new X4ODriver() { + @Override public String[] getLanguageVersions() { return null; } + @Override public String getLanguageName() { return "junit-driver-test"; } + + }); + } catch (Exception catchE) { + e = catchE; + } + assertNotNull("No exception",e); + assertEquals("Wrong exception class",NullPointerException.class, e.getClass()); + assertTrue("Wrong exception message",e.getMessage().contains("null")); + } + + public void testRegisterDriverVersionEmpty() throws Exception { + Exception e = null; + try { + X4ODriverManager.registerX4ODriver(new X4ODriver() { + @Override public String[] getLanguageVersions() { return new String[]{}; } + @Override public String getLanguageName() { return "junit-driver-test"; } + + }); + } catch (Exception catchE) { + e = catchE; + } + assertNotNull("No exception",e); + assertEquals("Wrong exception class",IllegalArgumentException.class, e.getClass()); + assertTrue("Wrong exception message",e.getMessage().contains("empty")); + } + + public void testDeregisterDriverNull() throws Exception { + Exception e = null; + try { + X4ODriverManager.deregisterX4ODriver(null); + } catch (Exception catchE) { + e = catchE; + } + assertNotNull("No exception",e); + assertEquals("Wrong exception class",NullPointerException.class, e.getClass()); + assertTrue("Wrong exception message",e.getMessage().contains("null")); + } + + public void testDeregisterDriverNameNull() throws Exception { + Exception e = null; + try { + X4ODriverManager.deregisterX4ODriver(new X4ODriver() { + @Override public String[] getLanguageVersions() { return new String[]{"1.0"}; } + @Override public String getLanguageName() { return null; } + + }); + } catch (Exception catchE) { + e = catchE; + } + assertNotNull("No exception",e); + assertEquals("Wrong exception class",NullPointerException.class, e.getClass()); + assertTrue("Wrong exception message",e.getMessage().contains("null")); + } + + public void testDeregisterDriverInstance() throws Exception { + Exception e = null; + try { + X4ODriver driver = new X4ODriver() { + @Override public String[] getLanguageVersions() { return new String[]{"1.0"}; } + @Override public String getLanguageName() { return "junit-driver-test"; } + }; + X4ODriverManager.registerX4ODriver(driver); + assertEquals(driver.hashCode(), X4ODriverManager.getX4ODriver("junit-driver-test").hashCode()); + X4ODriverManager.deregisterX4ODriver(driver); + X4ODriverManager.getX4ODriver("junit-driver-test"); + } catch (Exception catchE) { + e = catchE; + } + assertNotNull("No exception",e); + assertEquals("Wrong exception class",IllegalArgumentException.class, e.getClass()); + assertTrue("Wrong exception message",e.getMessage().contains("junit-driver-test")); + } } diff --git a/x4o-driver/src/test/java/org/x4o/xml/eld/EldParserTest.java b/x4o-driver/src/test/java/org/x4o/xml/eld/EldParserTest.java index 68370a9..eae41dc 100644 --- a/x4o-driver/src/test/java/org/x4o/xml/eld/EldParserTest.java +++ b/x4o-driver/src/test/java/org/x4o/xml/eld/EldParserTest.java @@ -109,7 +109,7 @@ public class EldParserTest extends TestCase { assertTrue("No elementConfigurator tag found in core eld.", resultTags.contains("elementConfigurator")); */ } catch (Exception e) { - e.printStackTrace(); + //e.printStackTrace(); } finally { // parser.doReleasePhaseManual(); } diff --git a/x4o-elddoc/src/main/java/org/x4o/xml/eld/doc/X4OWriteLanguageDocExecutor.java b/x4o-elddoc/src/main/java/org/x4o/xml/eld/doc/X4OWriteLanguageDocExecutor.java index 10d84d4..0a77a6c 100644 --- a/x4o-elddoc/src/main/java/org/x4o/xml/eld/doc/X4OWriteLanguageDocExecutor.java +++ b/x4o-elddoc/src/main/java/org/x4o/xml/eld/doc/X4OWriteLanguageDocExecutor.java @@ -53,13 +53,13 @@ public class X4OWriteLanguageDocExecutor { String arg = arguIterator.next(); if ("-path".equals(arg) || "-p".equals(arg)) { if (arguIterator.hasNext()==false) { - System.out.println("No argument for "+arg+" given."); + System.err.println("No argument for "+arg+" given."); System.exit(1); return; } File schemaBasePath = new File(arguIterator.next()); if (schemaBasePath.exists()==false) { - System.out.println("path does not exists; "+schemaBasePath); + System.err.println("path does not exists; "+schemaBasePath); System.exit(1); return; } @@ -68,7 +68,7 @@ public class X4OWriteLanguageDocExecutor { } if ("-language".equals(arg) || "-l".equals(arg)) { if (arguIterator.hasNext()==false) { - System.out.println("No argument for "+arg+" given."); + System.err.println("No argument for "+arg+" given."); System.exit(1); return; } @@ -80,7 +80,7 @@ public class X4OWriteLanguageDocExecutor { try { languageSchema.execute(); } catch (ElementException e) { - System.out.println("Error while schema writing: "+e.getMessage()); + System.err.println("Error while schema writing: "+e.getMessage()); e.printStackTrace(); System.exit(1); return; diff --git a/x4o-meta/src/main/java/org/x4o/xml/meta/MetaLanguageSiblingLoader.java b/x4o-meta/src/main/java/org/x4o/xml/meta/MetaLanguageSiblingLoader.java index dfc7d07..4d72e53 100644 --- a/x4o-meta/src/main/java/org/x4o/xml/meta/MetaLanguageSiblingLoader.java +++ b/x4o-meta/src/main/java/org/x4o/xml/meta/MetaLanguageSiblingLoader.java @@ -47,27 +47,27 @@ public class MetaLanguageSiblingLoader implements X4OLanguageModuleLoaderSibling /** * Loads an ElementLanguageModule. * @param language The ElementLanguage to load for. - * @param elementLanguageModule The ElementLanguageModule to load into. + * @param languageModule The ElementLanguageModule to load into. * @throws X4OLanguageModuleLoaderException Is thrown when meta language could not be loaded. - * @see org.x4o.xml.lang.X4OLanguageModuleLoader#loadLanguageModule(org.x4o.xml.element.ElementLanguage, org.x4o.xml.lang.X4OLanguageModule) + * @see org.x4o.xml.lang.X4OLanguageModuleLoader#loadLanguageModule(org.x4o.xml.lang.X4OLanguageLocal, org.x4o.xml.lang.X4OLanguageModule) */ - public void loadLanguageModule(X4OLanguageLocal languageLocal,X4OLanguageModule elementLanguageModule) throws X4OLanguageModuleLoaderException { - elementLanguageModule.setId(META_LANGUAGE); - elementLanguageModule.setName(META_LANGUAGE); - elementLanguageModule.setProviderName(MetaLanguageSiblingLoader.class.getSimpleName()); - elementLanguageModule.setDescription("X4O Meta Language"); + public void loadLanguageModule(X4OLanguageLocal language,X4OLanguageModule languageModule) throws X4OLanguageModuleLoaderException { + languageModule.setId(META_LANGUAGE); + languageModule.setName(META_LANGUAGE); + languageModule.setProviderName(MetaLanguageSiblingLoader.class.getSimpleName()); + languageModule.setDescription("X4O Meta Language"); } /** * Loads an sibling language. - * @param elementLanguage The ElementLanguage to load for. - * @param loader The x4o language loader. + * @param language The ElementLanguage to load for. + * @param languageLoader The x4o language loader. * @throws X4OLanguageLoaderException - * @see org.x4o.xml.lang.X4OLanguageModuleLoaderSibling#loadLanguageSibling(org.x4o.xml.element.ElementLanguage, org.x4o.xml.lang.X4OLanguageLoader) + * @see org.x4o.xml.lang.X4OLanguageModuleLoaderSibling#loadLanguageSibling(org.x4o.xml.lang.X4OLanguageLocal, org.x4o.xml.lang.X4OLanguageLoader) */ - public void loadLanguageSibling(X4OLanguageLocal languageLocal,X4OLanguageLoader loader) throws X4OLanguageLoaderException { + public void loadLanguageSibling(X4OLanguageLocal language,X4OLanguageLoader languageLoader) throws X4OLanguageLoaderException { // Load the meta language. - loader.loadLanguage(languageLocal, META_LANGUAGE, META_LANGUAGE_VERSION); + languageLoader.loadLanguage(language, META_LANGUAGE, META_LANGUAGE_VERSION); } } diff --git a/x4o-plugin/x4o-plugin-ant/pom.xml b/x4o-plugin/x4o-plugin-ant/pom.xml index 1968713..6d5b2b6 100644 --- a/x4o-plugin/x4o-plugin-ant/pom.xml +++ b/x4o-plugin/x4o-plugin-ant/pom.xml @@ -71,7 +71,7 @@ - update-schema-cel + ant-update-schema-cel @@ -106,7 +106,7 @@ - update-schema-eld + ant-update-schema-eld @@ -141,7 +141,7 @@ - site-elddoc2 + ant-site-elddoc diff --git a/x4o-plugin/x4o-plugin-maven/pom.xml b/x4o-plugin/x4o-plugin-maven/pom.xml index 92d3128..22b0700 100644 --- a/x4o-plugin/x4o-plugin-maven/pom.xml +++ b/x4o-plugin/x4o-plugin-maven/pom.xml @@ -47,29 +47,29 @@ - - org.apache.maven.plugins - maven-plugin-plugin - 3.2 - - true - - - - mojo-descriptor - descriptor - - - mojo-help - helpmojo - - - + + org.apache.maven.plugins + maven-plugin-plugin + 3.2 + + true + + + + mojo-descriptor + descriptor + + + mojo-help + helpmojo + + + - site-elddoc + build-site-x4o-support @@ -78,10 +78,10 @@ ${project.version} - site-elddoc-maven + build-site-x4o-support pre-site - ${basedir}/../../target/site/elddocs + ${basedir}/../../target/site/x4o-support ALL ALL @@ -91,6 +91,7 @@ write-language-doc + write-language-schema diff --git a/x4o-plugin/x4o-plugin-maven/src/main/java/org/x4o/plugin/maven/AbstractX4OLanguageMojo.java b/x4o-plugin/x4o-plugin-maven/src/main/java/org/x4o/plugin/maven/AbstractX4OLanguageMojo.java index 597666f..fe0bd6e 100644 --- a/x4o-plugin/x4o-plugin-maven/src/main/java/org/x4o/plugin/maven/AbstractX4OLanguageMojo.java +++ b/x4o-plugin/x4o-plugin-maven/src/main/java/org/x4o/plugin/maven/AbstractX4OLanguageMojo.java @@ -24,8 +24,7 @@ package org.x4o.plugin.maven; import java.io.File; -import java.util.ArrayList; -import java.util.List; +import java.util.HashMap; import java.util.Map; import org.apache.maven.plugin.AbstractMojo; @@ -35,49 +34,77 @@ import org.x4o.xml.X4ODriver; import org.x4o.xml.X4ODriverManager; /** - * X4OWriteLanguageDocMojo creates docs for language. + * AbstractX4OLanguageMojo can perform a task on languages and versions. * * @author Willem Cazander * @version 1.0 Apr 9, 2013 */ public abstract class AbstractX4OLanguageMojo extends AbstractMojo { - @Parameter(property="outputDirectory") + private final static String DEFAULT_OUTPUT_DIRECTORY = "target/x4o"; + + @Parameter(property="outputDirectory",defaultValue=DEFAULT_OUTPUT_DIRECTORY) private File outputDirectory; - @Parameter(required=true,property="languages") + @Parameter private Map languages; + @Parameter(property="languages") + private String languageCommandLineString; + @Parameter(defaultValue="false",property="verbose") private boolean verbose = false; @Parameter(defaultValue="true",property="failOnError") private boolean failOnError = true; + abstract String getLanguageTaskDirectoryLabel(); + abstract String getLanguageTaskName(); abstract void executeLanguageTask(String languageName,String languageVersion,File outputDirectory) throws MojoExecutionException; private void executeLanguageTask() throws MojoExecutionException { - if (outputDirectory==null) { - throw new MojoExecutionException("outputDirectory attribute is not set."); - } if (languages==null) { - throw new MojoExecutionException("languages attribute is not set."); + languages = new HashMap(10); // maven does not support setting map on cmd line ? } - if (languages.size()==0) { - throw new MojoExecutionException("languages attribute is empty."); + if (outputDirectory==null) { + outputDirectory = new File(DEFAULT_OUTPUT_DIRECTORY); } - long startTime = System.currentTimeMillis(); if (verbose) { - getLog().info("Starting "+getLanguageTaskName()); + getLog().info("Output directory: "+outputDirectory); + getLog().info("Verbose: "+verbose); + getLog().info("Fail on error: "+failOnError); } if (outputDirectory.exists()==false) { - outputDirectory.mkdir(); + outputDirectory.mkdirs(); // incl parents if (verbose) { getLog().info("Created directory: "+outputDirectory); } } + if (languageCommandLineString!=null && languageCommandLineString.startsWith("{") && languageCommandLineString.endsWith("}")) { + languages.clear(); + String langString = languageCommandLineString.substring(1,languageCommandLineString.length()-1); + String[] lang = langString.split(","); + for (String l:lang) { + String[] ll = l.split("="); + if (ll.length!=2) { + getLog().warn("Wrong langauge key split: '"+l+"' of languageString: '"+languageCommandLineString+"'"); + continue; + } + String langName = ll[0]; + String langVersion = ll[1]; + languages.put(langName,langVersion); + } + } + if (languages.size()==0) { + if (verbose) { + getLog().info("Defaulting to all languages in classpath."); + } + for (String lang:X4ODriverManager.getX4OLanguages()) { + languages.put(lang, "ALL"); + } + } for (String languageName:languages.keySet()) { String languageVersions = languages.get(languageName); if (languageVersions.contains("*") || languageVersions.contains("ALL")) { @@ -96,12 +123,22 @@ public abstract class AbstractX4OLanguageMojo extends AbstractMojo { executeLanguageTask(languageName,languageVersions); // only one version } } - long stopTime = System.currentTimeMillis(); - getLog().info("Done "+getLanguageTaskName()+" in "+(stopTime-startTime)+" ms."); } private void executeLanguageTask(String languageName,String languageVersion) throws MojoExecutionException { - File outputLanguagPath = new File(outputDirectory.getAbsolutePath()+File.separatorChar+languageName+"-"+languageVersion); + long startTime = System.currentTimeMillis(); + if (verbose) { + getLog().info("Starting "+getLanguageTaskName()+" for "+languageName+":"+languageVersion); + } + StringBuffer buf = new StringBuffer(100); + buf.append(outputDirectory.getAbsolutePath()); + buf.append(File.separatorChar); + buf.append(getLanguageTaskDirectoryLabel()); + buf.append("-"); + buf.append(languageName); + buf.append("-"); + buf.append(languageVersion); + File outputLanguagPath = new File(buf.toString()); if (outputLanguagPath.exists()==false) { outputLanguagPath.mkdir(); if (verbose) { @@ -109,18 +146,12 @@ public abstract class AbstractX4OLanguageMojo extends AbstractMojo { } } executeLanguageTask(languageName,languageVersion,outputLanguagPath); + long stopTime = System.currentTimeMillis(); + getLog().info("Done "+getLanguageTaskName()+" for "+languageName+":"+languageVersion+" in "+(stopTime-startTime)+" ms."); } public void execute() throws MojoExecutionException { try { - if (verbose) { - if (languages!=null) { - getLog().info("X4O Languages: "+languages.size()); - } - getLog().info("Output directory: "+outputDirectory); - getLog().info("Verbose: "+verbose); - getLog().info("Fail on error: "+failOnError); - } executeLanguageTask(); } catch (MojoExecutionException e) { if (failOnError) { @@ -153,7 +184,9 @@ public abstract class AbstractX4OLanguageMojo extends AbstractMojo { } /** - * @param languages the languages to set + * Adds an language with version. + * @param languageName the languageName to set + * @param languageVersion the languageVersion to set */ public void addLanguage(String languageName,String languageVersion) { languages.put(languageName,languageVersion); diff --git a/x4o-plugin/x4o-plugin-maven/src/main/java/org/x4o/plugin/maven/X4OWriteLanguageDocMojo.java b/x4o-plugin/x4o-plugin-maven/src/main/java/org/x4o/plugin/maven/X4OWriteLanguageDocMojo.java index 4a0acb7..041dbe2 100644 --- a/x4o-plugin/x4o-plugin-maven/src/main/java/org/x4o/plugin/maven/X4OWriteLanguageDocMojo.java +++ b/x4o-plugin/x4o-plugin-maven/src/main/java/org/x4o/plugin/maven/X4OWriteLanguageDocMojo.java @@ -43,6 +43,10 @@ public class X4OWriteLanguageDocMojo extends AbstractX4OLanguageMojo { static public final String GOAL = "write-language-doc"; + String getLanguageTaskDirectoryLabel() { + return "doc"; + } + String getLanguageTaskName() { return "X4O Write language documentation"; } diff --git a/x4o-plugin/x4o-plugin-maven/src/main/java/org/x4o/plugin/maven/X4OWriteLanguageSchemaMojo.java b/x4o-plugin/x4o-plugin-maven/src/main/java/org/x4o/plugin/maven/X4OWriteLanguageSchemaMojo.java index bbfc6fb..33dc2a4 100644 --- a/x4o-plugin/x4o-plugin-maven/src/main/java/org/x4o/plugin/maven/X4OWriteLanguageSchemaMojo.java +++ b/x4o-plugin/x4o-plugin-maven/src/main/java/org/x4o/plugin/maven/X4OWriteLanguageSchemaMojo.java @@ -43,6 +43,10 @@ public class X4OWriteLanguageSchemaMojo extends AbstractX4OLanguageMojo { static public final String GOAL = "write-language-schema"; + String getLanguageTaskDirectoryLabel() { + return "xsd"; + } + String getLanguageTaskName() { return "X4O Write language schema"; } diff --git a/x4o-plugin/x4o-plugin-maven/src/test/java/org/x4o/plugin/maven/X4OWriteLanguageDocMojoTest.java b/x4o-plugin/x4o-plugin-maven/src/test/java/org/x4o/plugin/maven/X4OWriteLanguageDocMojoTest.java index cd7d51f..702351c 100644 --- a/x4o-plugin/x4o-plugin-maven/src/test/java/org/x4o/plugin/maven/X4OWriteLanguageDocMojoTest.java +++ b/x4o-plugin/x4o-plugin-maven/src/test/java/org/x4o/plugin/maven/X4OWriteLanguageDocMojoTest.java @@ -45,51 +45,38 @@ public class X4OWriteLanguageDocMojoTest extends AbstractMojoTestCase { super.tearDown(); // required } - private void executeGoal() throws Exception { - File pom = getTestFile( "src/test/resources/junit/test-write-language-doc.pom" ); - assertNotNull( pom ); - assertTrue( pom.exists() ); - - X4OWriteLanguageDocMojo mojo = (X4OWriteLanguageDocMojo) lookupMojo( X4OWriteLanguageDocMojo.GOAL, pom ); - //mojo.s - assertNotNull( mojo ); + private void executeGoal(String goal,String testFile) throws Exception { + File pom = getTestFile(testFile); + assertNotNull(pom); + assertTrue(pom.exists()); + X4OWriteLanguageDocMojo mojo = (X4OWriteLanguageDocMojo) lookupMojo(goal,pom); + assertNotNull(mojo); mojo.execute(); } - public void testEldDocCel() throws Exception { - executeGoal(); //"test-elddoc-cel" - File testDir = new File("target/test-elddoc/cel"); - //int files = testDir.listFiles().length; - //assertEquals("Should created more then two files", true, files>2); - } - - /* - public void testEldDocEld() { - executeTarget("test-elddoc-eld"); - File testDir = new File("target/test-elddoc/eld"); - int files = testDir.listFiles().length; + public void testConfAllWriteDoc() throws Exception { + executeGoal(X4OWriteLanguageDocMojo.GOAL,"src/test/resources/junit/test-plugin-conf-all.pom"); + File outputDir = new File("target/jtest/test-plugin-conf-all/doc-eld-1.0"); + assertTrue(outputDir.exists()); + int files = outputDir.listFiles().length; assertEquals("Should created more then two files", true, files>2); } - public void testEldDocEldVerbose() { - executeTarget("test-elddoc-cel-verbose"); - assertLogContaining("Verbose:"); + + public void testConfLangWriteDoc() throws Exception { + executeGoal(X4OWriteLanguageDocMojo.GOAL,"src/test/resources/junit/test-plugin-conf-lang.pom"); + File outputDir = new File("target/jtest/test-plugin-conf-lang/doc-cel-1.0"); + int files = outputDir.listFiles().length; + assertEquals("Should created more then two files", true, files>2); } - - public void testFailAllMissing() { - expectBuildException("test-fail-all", "Should get exception with no attributes."); + + public void testConfDefaultsWriteDoc() throws Exception { + executeGoal(X4OWriteLanguageDocMojo.GOAL,"src/test/resources/junit/test-plugin-defaults.pom"); + File outputDir = new File("target/x4o/doc-cel-1.0"); + int files = outputDir.listFiles().length; + assertEquals("Should created more then two files", true, files>2); + outputDir = new File("target/x4o/doc-eld-1.0"); + files = outputDir.listFiles().length; + assertEquals("Should created more then two files", true, files>2); } - public void testFailBasePath() { - expectBuildException("test-fail-destdir", "Should get exception id destdir is not set."); - } - public void testFailBasePathError() { - expectBuildException("test-fail-destdir-error", "Should get exception id destdir does not exists."); - } - public void testFailLanguage() { - expectBuildException("test-fail-language", "Should get exception id language is not set."); - } - public void testFailLanguageError() { - expectBuildException("test-fail-language-error", "Should get exception id language throws error."); - } - */ } diff --git a/x4o-plugin/x4o-plugin-maven/src/test/java/org/x4o/plugin/maven/X4OWriteLanguageSchemaMojoTest.java b/x4o-plugin/x4o-plugin-maven/src/test/java/org/x4o/plugin/maven/X4OWriteLanguageSchemaMojoTest.java new file mode 100644 index 0000000..798fe24 --- /dev/null +++ b/x4o-plugin/x4o-plugin-maven/src/test/java/org/x4o/plugin/maven/X4OWriteLanguageSchemaMojoTest.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2004-2012, Willem Cazander + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.x4o.plugin.maven; + +import java.io.File; + +import org.apache.maven.plugin.testing.AbstractMojoTestCase; + +/** + * X4OWriteLanguageSchemaMojoTest. + * + * @author Willem Cazander + * @version 1.0 Apr 14, 2013 + */ +public class X4OWriteLanguageSchemaMojoTest extends AbstractMojoTestCase { + + private void executeGoal(String goal,String testFile) throws Exception { + File pom = getTestFile(testFile); + assertNotNull(pom); + assertTrue(pom.exists()); + X4OWriteLanguageSchemaMojo mojo = (X4OWriteLanguageSchemaMojo) lookupMojo(goal,pom); + assertNotNull(mojo); + mojo.execute(); + } + + public void testConfAllWriteSchema() throws Exception { + executeGoal(X4OWriteLanguageSchemaMojo.GOAL,"src/test/resources/junit/test-plugin-conf-all.pom"); + File outputDir = new File("target/jtest/test-plugin-conf-all/xsd-eld-1.0"); + assertTrue(outputDir.exists()); + int files = outputDir.listFiles().length; + assertEquals("Should created more then two files", true, files>2); + } + + + public void testConfLangWriteSchema() throws Exception { + executeGoal(X4OWriteLanguageSchemaMojo.GOAL,"src/test/resources/junit/test-plugin-conf-lang.pom"); + File outputDir = new File("target/jtest/test-plugin-conf-lang/xsd-cel-1.0"); + int files = outputDir.listFiles().length; + assertEquals("Should created more then one file", true, files>1); + } + + public void testConfDefaultsWriteSchema() throws Exception { + executeGoal(X4OWriteLanguageSchemaMojo.GOAL,"src/test/resources/junit/test-plugin-defaults.pom"); + File outputDir = new File("target/x4o/xsd-cel-1.0"); + int files = outputDir.listFiles().length; + assertEquals("Should created more then one file", true, files>1); + outputDir = new File("target/x4o/xsd-eld-1.0"); + files = outputDir.listFiles().length; + assertEquals("Should created more then two files", true, files>2); + } +} diff --git a/x4o-plugin/x4o-plugin-maven/src/test/resources/junit/test-plugin-conf-all.pom b/x4o-plugin/x4o-plugin-maven/src/test/resources/junit/test-plugin-conf-all.pom new file mode 100644 index 0000000..1831bcb --- /dev/null +++ b/x4o-plugin/x4o-plugin-maven/src/test/resources/junit/test-plugin-conf-all.pom @@ -0,0 +1,59 @@ + + + + 4.0.0 + org.x4o.plugin.junit + x4o-plugin-maven-test + 1.0.0-SNAPSHOT + jar + x4o-plugin-maven-test + + + junit + junit + 4.10 + test + + + + + + x4o-plugin-maven + + target/jtest/test-plugin-conf-all + + 1.0 + + false + false + + + + + \ No newline at end of file diff --git a/x4o-plugin/x4o-plugin-maven/src/test/resources/junit/test-plugin-conf-lang.pom b/x4o-plugin/x4o-plugin-maven/src/test/resources/junit/test-plugin-conf-lang.pom new file mode 100644 index 0000000..676c030 --- /dev/null +++ b/x4o-plugin/x4o-plugin-maven/src/test/resources/junit/test-plugin-conf-lang.pom @@ -0,0 +1,57 @@ + + + + 4.0.0 + org.x4o.plugin.junit + x4o-plugin-maven-test + 1.0.0-SNAPSHOT + jar + x4o-plugin-maven-test + + + junit + junit + 4.10 + test + + + + + + x4o-plugin-maven + + target/jtest/test-plugin-conf-lang + + 1.0 + + + + + + \ No newline at end of file diff --git a/x4o-plugin/x4o-plugin-maven/src/test/resources/junit/test-plugin-defaults.pom b/x4o-plugin/x4o-plugin-maven/src/test/resources/junit/test-plugin-defaults.pom new file mode 100644 index 0000000..408d183 --- /dev/null +++ b/x4o-plugin/x4o-plugin-maven/src/test/resources/junit/test-plugin-defaults.pom @@ -0,0 +1,53 @@ + + + + 4.0.0 + org.x4o.plugin.junit + x4o-plugin-maven-test + 1.0.0-SNAPSHOT + jar + x4o-plugin-maven-test + + + junit + junit + 4.10 + test + + + + + + x4o-plugin-maven + + + + + + \ No newline at end of file diff --git a/x4o-plugin/x4o-plugin-maven/src/test/resources/junit/test-write-language-doc.pom b/x4o-plugin/x4o-plugin-maven/src/test/resources/junit/test-write-language-doc.pom deleted file mode 100644 index be69750..0000000 --- a/x4o-plugin/x4o-plugin-maven/src/test/resources/junit/test-write-language-doc.pom +++ /dev/null @@ -1,33 +0,0 @@ - - 4.0.0 - org.x4o.plugin.junit - x4o-plugin-maven-test - 1.0.0-SNAPSHOT - jar - x4o-plugin-maven-test - - - junit - junit - 4.10 - test - - - - - - x4o-plugin-maven - - target/jtest/write-language-doc - - ALL - ALL - - - - - - \ No newline at end of file