Updated build config and profiles and added keyed error reporting for
tasks.
This commit is contained in:
parent
9775c521a4
commit
9e8067c946
35
build.txt
35
build.txt
|
@ -19,15 +19,15 @@ mvn clean install;
|
|||
|
||||
|
||||
-- Update schemas in src --
|
||||
-- note; rm after auto schema creation
|
||||
-- note; only needed after change in eld or cel langauge.
|
||||
-- note2; maybe rm/mv after auto schema creation
|
||||
|
||||
cd project-root/;
|
||||
mvn clean install;
|
||||
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)
|
||||
mvn -Px4o-update-schema-cel compile;
|
||||
mvn -Px4o-update-schema-eld compile;
|
||||
|
||||
note: the do 'install' is because of circle plugins.
|
||||
note: the do 'install' is (once) because of circle plugins.
|
||||
|
||||
|
||||
-- Run multi jvm test --
|
||||
|
@ -53,7 +53,7 @@ src/main/build/gnu-up.sh <scm_username> <version>
|
|||
|
||||
cd project-root/;
|
||||
mvn clean install; # (installs the snapshots plugins so we can run the current eld-doc task in site phase)
|
||||
MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m" mvn -Pbuild-site-x4o-support clean package site site:stage;
|
||||
MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m" mvn -Px4o-build-site-doc clean package site site:stage;
|
||||
cp -r target/staging/x4o-* target/site/;
|
||||
cp -r target/site/ ~/public_html/site-x4o;
|
||||
|
||||
|
@ -66,10 +66,10 @@ mvn checkstyle:checkstyle
|
|||
-- Check for licenses --
|
||||
|
||||
cd project-root/;
|
||||
mvn -Pcheck-license license:check
|
||||
mvn -Px4o-check-license license:check
|
||||
|
||||
To update all files from check output;
|
||||
mvn -Pcheck-license license:format
|
||||
mvn -Px4o-check-license license:format
|
||||
|
||||
-- Check for versions-updates --
|
||||
|
||||
|
@ -78,10 +78,21 @@ mvn versions:display-plugin-updates;
|
|||
mvn versions:display-dependency-updates;
|
||||
|
||||
|
||||
-- Run x4o-plugin-maven from cmd --
|
||||
-- Run x4o task from cmd --
|
||||
|
||||
cd project-root/;
|
||||
mvn clean compile;
|
||||
cd x4o-driver;
|
||||
mvn exec:java -Dexec.mainClass="org.x4o.xml.lang.task.X4OLanguageTaskCommandLine" -Dexec.args="-h"
|
||||
mvn exec:java -Dexec.mainClass="org.x4o.xml.lang.task.X4OLanguageTaskCommandLine" -Dexec.args="-ll"
|
||||
mvn exec:java -Dexec.mainClass="org.x4o.xml.lang.task.X4OLanguageTaskCommandLine" -Dexec.args="-llt"
|
||||
mvn exec:java -Dexec.mainClass="org.x4o.xml.lang.task.X4OLanguageTaskCommandLine" -Dexec.args="-l eld -t eld-xsd -p http://language.x4o.org/xml/properties/eld-xsd/output/path=/tmp/test-task-cmd"
|
||||
|
||||
|
||||
-- Run x4o-tool-maven-plugin from cmd --
|
||||
|
||||
cd project-root/;
|
||||
mvn clean install;
|
||||
mvn org.x4o.plugin:x4o-plugin-maven:help
|
||||
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
|
||||
mvn org.x4o.tool:x4o-tool-maven-plugin:help
|
||||
mvn org.x4o.tool:x4o-tool-maven-plugin:x4o-language-task -Dverbose=true -DtaskId=eld-xsd -DlanguageName=cel -DtaskPropertyValues=http://x4o.org/properties/eld-xsd/output/path=/tmp/test-maven-cmd
|
||||
|
||||
|
|
28
pom.xml
28
pom.xml
|
@ -102,6 +102,13 @@
|
|||
<!-- Application lib versions -->
|
||||
<jasper-el.version>6.0.20</jasper-el.version>
|
||||
<juel.version>2.1.0</juel.version>
|
||||
|
||||
<!-- Maven plugin building -->
|
||||
<maven-plugin-api.version>3.0</maven-plugin-api.version>
|
||||
<maven-plugin-annotations.version>3.2</maven-plugin-annotations.version>
|
||||
<maven-plugin-testing-harness.version>2.0</maven-plugin-testing-harness.version>
|
||||
<plexus-utils.version>3.0.1</plexus-utils.version>
|
||||
<maven-plugin-plugin.version>3.2</maven-plugin-plugin.version>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
|
@ -339,25 +346,38 @@
|
|||
</reporting>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>notest</id>
|
||||
<id>x4o-test-none</id>
|
||||
<properties>
|
||||
<skipTests>true</skipTests>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>update-schema-cel</id>
|
||||
<id>x4o-test-speed</id>
|
||||
<properties>
|
||||
<skipTests>false</skipTests>
|
||||
<make-work>todo</make-work>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>x4o-update-schema-cel</id>
|
||||
<properties>
|
||||
<skipTests>true</skipTests>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>update-schema-eld</id>
|
||||
<id>x4o-update-schema-eld</id>
|
||||
<properties>
|
||||
<skipTests>true</skipTests>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>check-license</id>
|
||||
<id>x4o-build-site-doc</id>
|
||||
<properties>
|
||||
<skipTests>true</skipTests>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>x4o-check-license</id>
|
||||
<properties>
|
||||
<skipTests>true</skipTests>
|
||||
</properties>
|
||||
|
|
|
@ -50,7 +50,7 @@ public class EldXsdLanguageTask extends AbstractX4OLanguageTask {
|
|||
/**
|
||||
* Executes this language task.
|
||||
*/
|
||||
public X4OLanguageTaskExecutor createTaskExecutor(final PropertyConfig config) {
|
||||
protected X4OLanguageTaskExecutor createTaskExecutorChecked(final PropertyConfig config) {
|
||||
return new X4OLanguageTaskExecutor() {
|
||||
public void execute(X4OLanguage language) throws X4OLanguageTaskException {
|
||||
try {
|
||||
|
|
|
@ -211,15 +211,15 @@ public final class PropertyConfig implements Cloneable {
|
|||
return getPropertyKeysRequired().contains(key);
|
||||
}
|
||||
|
||||
public final Collection<String> getPropertyKeysRequired() {
|
||||
public final List<String> getPropertyKeysRequired() {
|
||||
return findPropertyKeysRequired(false);
|
||||
}
|
||||
|
||||
public final Collection<String> getPropertyKeysRequiredValues() {
|
||||
public final List<String> getPropertyKeysRequiredValues() {
|
||||
return findPropertyKeysRequired(true);
|
||||
}
|
||||
|
||||
private final Collection<String> findPropertyKeysRequired(boolean checkValue) {
|
||||
private final List<String> findPropertyKeysRequired(boolean checkValue) {
|
||||
List<String> result = new ArrayList<String>(10);
|
||||
for (String key:getPropertyKeys()) {
|
||||
PropertyConfigItem item = getPropertyConfigItem(key);
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
*/
|
||||
package org.x4o.xml.lang.task;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.x4o.xml.io.sax.ext.PropertyConfig;
|
||||
|
||||
/**
|
||||
|
@ -48,6 +50,34 @@ public abstract class AbstractX4OLanguageTask implements X4OLanguageTask {
|
|||
this.propertyConfig=propertyConfig;
|
||||
}
|
||||
|
||||
protected abstract X4OLanguageTaskExecutor createTaskExecutorChecked(PropertyConfig config);
|
||||
|
||||
/**
|
||||
* @see org.x4o.xml.lang.task.X4OLanguageTask#createTaskExecutor(org.x4o.xml.io.sax.ext.PropertyConfig)
|
||||
*/
|
||||
public X4OLanguageTaskExecutor createTaskExecutor(PropertyConfig config) {
|
||||
return createTaskExecutorChecked(checkConfig(config));
|
||||
}
|
||||
|
||||
private PropertyConfig checkConfig(PropertyConfig config) {
|
||||
List<String> keys = config.getPropertyKeysRequiredValues();
|
||||
if (keys.isEmpty()) {
|
||||
return config;
|
||||
}
|
||||
StringBuffer buf = new StringBuffer(100);
|
||||
buf.append("Error missing value(s) for key(s) {");
|
||||
for (int i=0;i<keys.size();i++) {
|
||||
buf.append('"');
|
||||
buf.append(keys.get(i));
|
||||
buf.append('"');
|
||||
if (i<keys.size()-1) {
|
||||
buf.append(',');
|
||||
}
|
||||
buf.append('}');
|
||||
}
|
||||
throw new IllegalArgumentException(buf.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.x4o.xml.lang.task.X4OLanguageTask#createTaskConfig()
|
||||
*/
|
||||
|
|
|
@ -24,19 +24,16 @@
|
|||
|
||||
-->
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<!-- ===== Automatic generated schema for language: cel ===== -->
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<!--
|
||||
ID: cel-module
|
||||
Id: cel-module
|
||||
ProviderName: Core Element Languag Module
|
||||
ProviderHost: cel.x4o.org
|
||||
Namespaces: 2
|
||||
Uri: http://cel.x4o.org/xml/ns/cel-core
|
||||
Uri schema: http://cel.x4o.org/xml/ns/cel-core-1.0.xsd
|
||||
Created on: Sat Aug 24 22:02:08 CEST 2013
|
||||
Uri schema http://cel.x4o.org/xml/ns/cel-core-1.0.xsd
|
||||
Created on: Sun Sep 01 12:08:48 CEST 2013
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:this="http://cel.x4o.org/xml/ns/cel-core"
|
||||
|
@ -49,9 +46,9 @@
|
|||
</choice>
|
||||
<attribute name="required" type="boolean"/>
|
||||
<attribute name="defaultValue" type="string"/>
|
||||
<attribute name="objectConverter" type="string"/>
|
||||
<attribute name="runResolveEL" type="boolean"/>
|
||||
<attribute name="runConverters" type="boolean"/>
|
||||
<attribute name="objectConverter" type="string"/>
|
||||
<attribute name="runBeanValue" type="boolean"/>
|
||||
<attribute name="writeOrder" type="integer"/>
|
||||
<attribute name="description" type="string"/>
|
||||
|
@ -75,12 +72,12 @@
|
|||
</choice>
|
||||
<attribute name="uri" type="string" use="required"/>
|
||||
<attribute name="name" type="string"/>
|
||||
<attribute name="prefixMapping" type="string"/>
|
||||
<attribute name="schemaUri" type="string"/>
|
||||
<attribute name="schemaResource" type="string"/>
|
||||
<attribute name="languageRoot" type="boolean"/>
|
||||
<attribute name="schemaPrefix" type="string"/>
|
||||
<attribute name="elementNamespaceInstanceProvider" type="string"/>
|
||||
<attribute name="prefixMapping" type="string"/>
|
||||
<attribute name="description" type="string"/>
|
||||
<attribute name="id" type="string"/>
|
||||
</complexType>
|
||||
|
@ -108,10 +105,10 @@
|
|||
</choice>
|
||||
<attribute name="objectClass" type="string"/>
|
||||
<attribute name="elementClass" type="string"/>
|
||||
<attribute name="schemaContentMixed" type="boolean"/>
|
||||
<attribute name="autoAttributes" type="boolean"/>
|
||||
<attribute name="schemaContentBase" type="string"/>
|
||||
<attribute name="schemaContentComplex" type="boolean"/>
|
||||
<attribute name="schemaContentMixed" type="boolean"/>
|
||||
<attribute name="description" type="string"/>
|
||||
<attribute name="id" type="string"/>
|
||||
</complexType>
|
||||
|
|
|
@ -24,19 +24,16 @@
|
|||
|
||||
-->
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<!-- ===== Automatic generated schema for language: cel ===== -->
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<!--
|
||||
ID: cel-module
|
||||
Id: cel-module
|
||||
ProviderName: Core Element Languag Module
|
||||
ProviderHost: cel.x4o.org
|
||||
Namespaces: 2
|
||||
Uri: http://cel.x4o.org/xml/ns/cel-root
|
||||
Uri schema: http://cel.x4o.org/xml/ns/cel-root-1.0.xsd
|
||||
Created on: Sat Aug 24 22:02:08 CEST 2013
|
||||
Uri schema http://cel.x4o.org/xml/ns/cel-root-1.0.xsd
|
||||
Created on: Sun Sep 01 12:08:48 CEST 2013
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:cel-core="http://cel.x4o.org/xml/ns/cel-core"
|
||||
|
|
|
@ -24,19 +24,16 @@
|
|||
|
||||
-->
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<!-- ===== Automatic generated schema for language: eld ===== -->
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<!--
|
||||
ID: eld-module
|
||||
Id: eld-module
|
||||
ProviderName: Element Language Definition
|
||||
ProviderHost: eld.x4o.org
|
||||
Namespaces: 3
|
||||
Uri: http://eld.x4o.org/xml/ns/eld-conv
|
||||
Uri schema: http://eld.x4o.org/xml/ns/eld-conv-0.8.xsd
|
||||
Created on: Sat Aug 24 21:57:18 CEST 2013
|
||||
Uri schema http://eld.x4o.org/xml/ns/eld-conv-0.8.xsd
|
||||
Created on: Sun Sep 01 12:13:10 CEST 2013
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:this="http://eld.x4o.org/xml/ns/eld-conv"
|
||||
|
|
|
@ -24,19 +24,16 @@
|
|||
|
||||
-->
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<!-- ===== Automatic generated schema for language: eld ===== -->
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<!--
|
||||
ID: eld-module
|
||||
Id: eld-module
|
||||
ProviderName: Element Language Definition
|
||||
ProviderHost: eld.x4o.org
|
||||
Namespaces: 3
|
||||
Uri: http://eld.x4o.org/xml/ns/eld-lang
|
||||
Uri schema: http://eld.x4o.org/xml/ns/eld-lang-0.8.xsd
|
||||
Created on: Sat Aug 24 21:57:18 CEST 2013
|
||||
Uri schema http://eld.x4o.org/xml/ns/eld-lang-0.8.xsd
|
||||
Created on: Sun Sep 01 12:13:10 CEST 2013
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:conv="http://eld.x4o.org/xml/ns/eld-conv"
|
||||
|
@ -68,9 +65,9 @@
|
|||
</attribute>
|
||||
<attribute name="name" type="string"/>
|
||||
<attribute name="required" type="boolean"/>
|
||||
<attribute name="runResolveEL" type="boolean"/>
|
||||
<attribute name="defaultValue" type="string"/>
|
||||
<attribute name="objectConverter" type="string"/>
|
||||
<attribute name="runResolveEL" type="boolean"/>
|
||||
<attribute name="runConverters" type="boolean"/>
|
||||
<attribute name="runBeanValue" type="boolean"/>
|
||||
<attribute name="writeOrder" type="integer"/>
|
||||
|
@ -110,13 +107,13 @@
|
|||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="name" type="string"/>
|
||||
<attribute name="languageRoot" type="boolean"/>
|
||||
<attribute name="schemaPrefix" type="string"/>
|
||||
<attribute name="elementNamespaceInstanceProvider" type="string"/>
|
||||
<attribute name="prefixMapping" type="string"/>
|
||||
<attribute name="uri" type="string"/>
|
||||
<attribute name="schemaUri" type="string"/>
|
||||
<attribute name="schemaResource" type="string"/>
|
||||
<attribute name="elementNamespaceInstanceProvider" type="string"/>
|
||||
<attribute name="uri" type="string"/>
|
||||
<attribute name="languageRoot" type="boolean"/>
|
||||
<attribute name="schemaPrefix" type="string"/>
|
||||
<attribute name="description" type="string"/>
|
||||
</complexType>
|
||||
<complexType name="descriptionType">
|
||||
|
@ -177,10 +174,10 @@
|
|||
<documentation xml:lang="en">An custom element class to config object.</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="schemaContentMixed" type="boolean"/>
|
||||
<attribute name="autoAttributes" type="boolean"/>
|
||||
<attribute name="schemaContentBase" type="string"/>
|
||||
<attribute name="schemaContentComplex" type="boolean"/>
|
||||
<attribute name="schemaContentMixed" type="boolean"/>
|
||||
<attribute name="description" type="string"/>
|
||||
</complexType>
|
||||
<complexType name="attributeAliasType">
|
||||
|
|
|
@ -24,19 +24,16 @@
|
|||
|
||||
-->
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<!-- ===== Automatic generated schema for language: eld ===== -->
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<!--
|
||||
ID: eld-module
|
||||
Id: eld-module
|
||||
ProviderName: Element Language Definition
|
||||
ProviderHost: eld.x4o.org
|
||||
Namespaces: 3
|
||||
Uri: http://eld.x4o.org/xml/ns/eld-root
|
||||
Uri schema: http://eld.x4o.org/xml/ns/eld-root-1.0.xsd
|
||||
Created on: Sat Aug 24 21:57:18 CEST 2013
|
||||
Uri schema http://eld.x4o.org/xml/ns/eld-root-1.0.xsd
|
||||
Created on: Sun Sep 01 12:13:10 CEST 2013
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:conv="http://eld.x4o.org/xml/ns/eld-conv"
|
||||
|
|
|
@ -48,7 +48,7 @@ public class EldDocLanguageTask extends AbstractX4OLanguageTask {
|
|||
/**
|
||||
* Executes this language task.
|
||||
*/
|
||||
public X4OLanguageTaskExecutor createTaskExecutor(final PropertyConfig config) {
|
||||
protected X4OLanguageTaskExecutor createTaskExecutorChecked(final PropertyConfig config) {
|
||||
return new X4OLanguageTaskExecutor() {
|
||||
public void execute(X4OLanguage language) throws X4OLanguageTaskException {
|
||||
try {
|
||||
|
|
|
@ -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>
|
|
@ -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…
Reference in a new issue