Updated build config and profiles and added keyed error reporting for
tasks.
This commit is contained in:
parent
9775c521a4
commit
9e8067c946
15 changed files with 227 additions and 209 deletions
|
|
@ -71,7 +71,7 @@
|
|||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>ant-update-schema-cel</id>
|
||||
<id>x4o-update-schema-cel</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
|
@ -80,13 +80,17 @@
|
|||
<version>${maven-antrun-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>update-schema-cel-ant</id>
|
||||
<id>x4o-update-schema-cel-run-ant</id>
|
||||
<phase>generate-resources</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<property name="coredir" value="${basedir}/../../x4o-driver/src/main/resources/META-INF" />
|
||||
<taskdef name="writeLanguageSchema" classname="org.x4o.plugin.ant.X4OWriteLanguageSchemaTask" classpathref="maven.plugin.classpath" />
|
||||
<writeLanguageSchema destdir="${coredir}/cel" languageName="cel" />
|
||||
<property name="licesefile" value="${basedir}/../../license.txt"/>
|
||||
<taskdef name="x4oTask" classname="org.x4o.tool.ant.plugin.X4OTask" classpathref="maven.plugin.classpath"/>
|
||||
<x4oTask languageName="cel" taskId="eld-xsd">
|
||||
<x4oTaskProperty key="http://x4o.org/properties/eld-xsd/output/path" value="${coredir}/cel"/>
|
||||
<x4oTaskProperty key="http://x4o.org/properties/eld-xsd/prolog/licence-file" value="${licesefile}"/>
|
||||
</x4oTask>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
|
|
@ -96,8 +100,8 @@
|
|||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.x4o.plugin</groupId>
|
||||
<artifactId>x4o-plugin-ant</artifactId>
|
||||
<groupId>org.x4o.tool</groupId>
|
||||
<artifactId>x4o-tool-ant-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
@ -106,7 +110,7 @@
|
|||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>ant-update-schema-eld</id>
|
||||
<id>x4o-update-schema-eld</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
|
@ -115,13 +119,17 @@
|
|||
<version>${maven-antrun-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>update-schema-eld-ant</id>
|
||||
<id>x4o-update-schema-eld-run-ant</id>
|
||||
<phase>generate-resources</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<property name="coredir" value="${basedir}/../../x4o-driver/src/main/resources/META-INF" />
|
||||
<taskdef name="writeLanguageSchema" classname="org.x4o.plugin.ant.X4OWriteLanguageSchemaTask" classpathref="maven.plugin.classpath" />
|
||||
<writeLanguageSchema destdir="${coredir}/eld" languageName="eld" />
|
||||
<property name="licesefile" value="${basedir}/../../license.txt"/>
|
||||
<taskdef name="x4oTask" classname="org.x4o.tool.ant.plugin.X4OTask" classpathref="maven.plugin.classpath"/>
|
||||
<x4oTask languageName="eld" taskId="eld-xsd">
|
||||
<x4oTaskProperty key="http://x4o.org/properties/eld-xsd/output/path" value="${coredir}/eld"/>
|
||||
<x4oTaskProperty key="http://x4o.org/properties/eld-xsd/prolog/licence-file" value="${licesefile}"/>
|
||||
</x4oTask>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
|
|
@ -131,8 +139,8 @@
|
|||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.x4o.plugin</groupId>
|
||||
<artifactId>x4o-plugin-ant</artifactId>
|
||||
<groupId>org.x4o.tool</groupId>
|
||||
<artifactId>x4o-tool-ant-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
@ -141,7 +149,7 @@
|
|||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>ant-site-elddoc</id>
|
||||
<id>x4o-build-site-doc</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
|
@ -150,22 +158,46 @@
|
|||
<version>${maven-antrun-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>site-elddoc-ant</id>
|
||||
<id>x4o-build-site-doc-run-ant</id>
|
||||
<phase>pre-site</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<property name="coredir" value="${basedir}/../../target/site/elddocs" />
|
||||
<mkdir dir="${coredir}/cel" />
|
||||
<mkdir dir="${coredir}/eld" />
|
||||
<mkdir dir="${coredir}/junit-test" />
|
||||
<mkdir dir="${coredir}/junit-swixml2" />
|
||||
<mkdir dir="${coredir}/junit-swixml3" />
|
||||
<taskdef name="writeLanguageDoc" classname="org.x4o.plugin.ant.X4OWriteLanguageDocTask" classpathref="maven.plugin.classpath" />
|
||||
<writeLanguageDoc destdir="${coredir}/cel" languageName="cel" />
|
||||
<writeLanguageDoc destdir="${coredir}/eld" languageName="eld" />
|
||||
<writeLanguageDoc destdir="${coredir}/junit-test" languageName="test" />
|
||||
<writeLanguageDoc destdir="${coredir}/junit-swixml2" languageName="swixml" languageVersion="2.0" />
|
||||
<writeLanguageDoc destdir="${coredir}/junit-swixml3" languageName="swixml" />
|
||||
<property name="coredir" value="${basedir}/../../target/site/x4o-support" />
|
||||
<taskdef name="x4oTask" classname="org.x4o.tool.ant.plugin.X4OTask" classpathref="maven.plugin.classpath"/>
|
||||
|
||||
<x4oTask languageName="cel" taskId="eld-doc">
|
||||
<x4oTaskProperty key="http://x4o.org/properties/eld-doc/output/path" value="${coredir}/doc-cel-1.0"/>
|
||||
<x4oTaskProperty key="http://x4o.org/properties/eld-doc/javadoc/link" value="http://docs.oracle.com/javase/7/docs/api/"/>
|
||||
</x4oTask>
|
||||
<x4oTask languageName="eld" taskId="eld-doc">
|
||||
<x4oTaskProperty key="http://x4o.org/properties/eld-doc/output/path" value="${coredir}/doc-eld-1.0"/>
|
||||
<x4oTaskProperty key="http://x4o.org/properties/eld-doc/javadoc/link" value="http://docs.oracle.com/javase/7/docs/api/"/>
|
||||
</x4oTask>
|
||||
<x4oTask languageName="test" taskId="eld-doc">
|
||||
<x4oTaskProperty key="http://x4o.org/properties/eld-doc/output/path" value="${coredir}/doc-test-1.0"/>
|
||||
</x4oTask>
|
||||
<x4oTask languageName="swixml" taskId="eld-doc" languageVersion="2.0">
|
||||
<x4oTaskProperty key="http://x4o.org/properties/eld-doc/output/path" value="${coredir}/doc-swixml-2.0"/>
|
||||
</x4oTask>
|
||||
<x4oTask languageName="swixml" taskId="eld-doc">
|
||||
<x4oTaskProperty key="http://x4o.org/properties/eld-doc/output/path" value="${coredir}/doc-swixml-3.0"/>
|
||||
</x4oTask>
|
||||
|
||||
<x4oTask languageName="cel" taskId="eld-xsd">
|
||||
<x4oTaskProperty key="http://x4o.org/properties/eld-xsd/output/path" value="${coredir}/xsd-cel-1.0"/>
|
||||
</x4oTask>
|
||||
<x4oTask languageName="eld" taskId="eld-xsd">
|
||||
<x4oTaskProperty key="http://x4o.org/properties/eld-xsd/output/path" value="${coredir}/xsd-eld-1.0"/>
|
||||
</x4oTask>
|
||||
<x4oTask languageName="test" taskId="eld-xsd">
|
||||
<x4oTaskProperty key="http://x4o.org/properties/eld-xsd/output/path" value="${coredir}/xsd-test-1.0"/>
|
||||
</x4oTask>
|
||||
<x4oTask languageName="swixml" taskId="eld-xsd" languageVersion="2.0">
|
||||
<x4oTaskProperty key="http://x4o.org/properties/eld-xsd/output/path" value="${coredir}/xsd-swixml-2.0"/>
|
||||
</x4oTask>
|
||||
<x4oTask languageName="swixml" taskId="eld-xsd">
|
||||
<x4oTaskProperty key="http://x4o.org/properties/eld-xsd/output/path" value="${coredir}/xsd-swixml-3.0"/>
|
||||
</x4oTask>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
|
|
@ -175,8 +207,8 @@
|
|||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.x4o.plugin</groupId>
|
||||
<artifactId>x4o-plugin-ant</artifactId>
|
||||
<groupId>org.x4o.tool</groupId>
|
||||
<artifactId>x4o-tool-ant-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -23,26 +23,26 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>3.0</version>
|
||||
<version>${maven-plugin-api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||
<artifactId>maven-plugin-annotations</artifactId>
|
||||
<version>3.2</version>
|
||||
<version>${maven-plugin-annotations.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugin-testing</groupId>
|
||||
<artifactId>maven-plugin-testing-harness</artifactId>
|
||||
<version>2.0</version>
|
||||
<version>${maven-plugin-testing-harness.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- generated help mojo has a dependency to plexus-utils -->
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<version>${plexus-utils.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-plugin-plugin</artifactId>
|
||||
<version>3.2</version>
|
||||
<version>${maven-plugin-plugin.version}</version>
|
||||
<configuration>
|
||||
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
|
||||
</configuration>
|
||||
|
|
@ -67,66 +67,4 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>build-site-x4o-support</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.x4o.plugin</groupId>
|
||||
<artifactId>x4o-plugin-maven</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-site-x4o-support</id>
|
||||
<phase>pre-site</phase>
|
||||
<configuration>
|
||||
<languageName>cel</languageName>
|
||||
<taskId>eld-xsd</taskId>
|
||||
<taskPropertyValues>
|
||||
<taskPropertyValue>http://language.x4o.org/xml/properties/eld-xsd/output/path=${basedir}/../../target/site/x4o-support</taskPropertyValue>
|
||||
</taskPropertyValues>
|
||||
<!-- TODO: add exe'ids
|
||||
<outputDirectory>${basedir}/../../target/site/x4o-support</outputDirectory>
|
||||
<languages>
|
||||
<cel>ALL</cel>
|
||||
<eld>ALL</eld>
|
||||
<test>ALL</test>
|
||||
<swixml>2.0-3.0</swixml>
|
||||
</languages>
|
||||
-->
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>x4o-language-task</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.x4o</groupId>
|
||||
<artifactId>x4o-driver</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.x4o</groupId>
|
||||
<artifactId>x4o-driver</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.x4o</groupId>
|
||||
<artifactId>x4o-eld-doc</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.odysseus.juel</groupId>
|
||||
<artifactId>juel</artifactId>
|
||||
<version>${juel.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -45,16 +45,16 @@ public class X4OLanguageTaskMojo extends AbstractMojo {
|
|||
|
||||
static public final String GOAL = "x4o-language-task";
|
||||
|
||||
@Parameter
|
||||
@Parameter(property="languageName")
|
||||
private String languageName = null;
|
||||
|
||||
@Parameter
|
||||
@Parameter(property="languageVersion")
|
||||
private String languageVersion = null;
|
||||
|
||||
@Parameter
|
||||
@Parameter(property="taskId")
|
||||
private String taskId = null;
|
||||
|
||||
@Parameter
|
||||
@Parameter(property="taskPropertyValues")
|
||||
private List<String> taskPropertyValues;
|
||||
|
||||
@Parameter(defaultValue="false",property="verbose")
|
||||
|
|
@ -85,7 +85,11 @@ public class X4OLanguageTaskMojo extends AbstractMojo {
|
|||
throw new MojoExecutionException("Error while running task: "+getTaskId()+" error: "+e.getMessage(),e);
|
||||
}
|
||||
long stopTime = System.currentTimeMillis();
|
||||
getLog().info("Done "+getTaskId()+" for "+languageName+":"+languageVersion+" in "+(stopTime-startTime)+" ms.");
|
||||
String ver = "";
|
||||
if (languageVersion!=null) {
|
||||
ver = ":"+languageVersion;
|
||||
}
|
||||
getLog().info("Done "+getTaskId()+" for "+languageName+ver+" in "+(stopTime-startTime)+" ms.");
|
||||
}
|
||||
|
||||
public void execute() throws MojoExecutionException {
|
||||
|
|
|
|||
|
|
@ -62,10 +62,8 @@ public class X4OLanguageTaskMojoTest extends AbstractMojoTestCase {
|
|||
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");
|
||||
|
|
@ -74,7 +72,7 @@ public class X4OLanguageTaskMojoTest extends AbstractMojoTestCase {
|
|||
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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue