Easter cleaning

This commit is contained in:
Willem Cazander 2025-05-07 21:46:32 +02:00
commit 9e36078b2e
1862 changed files with 270281 additions and 0 deletions

View file

@ -0,0 +1,120 @@
/*
* Copyright (c) 2004-2014, 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.tool.maven.plugin;
import java.io.File;
import org.apache.maven.plugin.Mojo;
import org.apache.maven.plugin.testing.AbstractMojoTestCase;
/**
* XX4OLanguageTaskMojoTest.
*
* @author Willem Cazander
* @version 1.0 Apr 6, 2013
*/
public class X4OLanguageTaskMojoTest extends AbstractMojoTestCase {
/** {@inheritDoc} */
protected void setUp() throws Exception {
super.setUp(); // required
}
/** {@inheritDoc} */
protected void tearDown() throws Exception {
super.tearDown(); // required
}
private void executeGoal(String goal,String testFile) throws Exception {
File pom = getTestFile(testFile);
assertNotNull(pom);
assertTrue(pom.exists());
X4OLanguageTaskMojo mojo = (X4OLanguageTaskMojo) lookupMojo(goal,pom);
assertNotNull(mojo);
mojo.execute();
}
public void testHelp() throws Exception {
File pom = getTestFile("src/test/resources/junit/test-plugin-defaults.pom");
assertNotNull(pom);
assertTrue(pom.exists());
Mojo mojo = lookupMojo("help",pom);
assertNotNull(mojo);
mojo.execute();
}
public void testConfAllWriteDoc() throws Exception {
executeGoal(X4OLanguageTaskMojo.GOAL,"src/test/resources/junit/test-plugin-conf-all.pom");
File outputDir = new File("target/jtest/test-plugin-conf-all/doc-eld-1.0");
if (!outputDir.exists()) {
return; // TODO: fix fails in maven test run ?
}
assertTrue(outputDir.exists());
int files = outputDir.listFiles().length;
assertEquals("Should created more then two files", true, files>2);
}
/*
public void testConfLangWriteDoc() throws Exception {
executeGoal(X4OLanguageTaskMojo.GOAL,"src/test/resources/junit/test-plugin-conf-lang.pom");
File outputDir = new File("target/jtest/test-plugin-conf-lang/cel");
int files = outputDir.listFiles().length;
assertEquals("Should created more then one files", true, files>1);
}
public void testConfDefaultsWriteDoc() throws Exception {
executeGoal(X4OLanguageTaskMojo.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 testConfAllWriteSchema() throws Exception {
executeGoal(X4OLanguageTaskMojo.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(X4OLanguageTaskMojo.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(X4OLanguageTaskMojo.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);
}
*/
}

View file

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.x4o.plugin.junit</groupId>
<artifactId>x4o-plugin-maven-test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>x4o-plugin-maven-test</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>nx01-x4o-tool-maven-plugin</artifactId>
<configuration>
<languageName>cel</languageName>
<taskId>eld-xsd</taskId>
<taskPropertyValues>
<taskPropertyValue>http://x4o.org/properties/eld-xsd/output/path=target/jtest/test-plugin-conf-all/cel</taskPropertyValue>
</taskPropertyValues>
<verbose>false</verbose>
<failOnError>false</failOnError>
</configuration>
</plugin>
</plugins>
</build>
</project>

View file

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.x4o.plugin.junit</groupId>
<artifactId>x4o-plugin-maven-test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>x4o-plugin-maven-test</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>nx01-x4o-tool-maven-plugin</artifactId>
<configuration>
<languageName>cel</languageName>
<taskId>eld-xsd</taskId>
<taskPropertyValues>
<taskPropertyValue>http://x4o.org/properties/eld-xsd/output/path=target/jtest/test-plugin-conf-lang/cel</taskPropertyValue>
</taskPropertyValues>
</configuration>
</plugin>
</plugins>
</build>
</project>

View file

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.x4o.plugin.junit</groupId>
<artifactId>x4o-plugin-maven-test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>x4o-plugin-maven-test</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>nx01-x4o-tool-maven-plugin</artifactId>
<configuration>
</configuration>
</plugin>
</plugins>
</build>
</project>