taverna-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stian Soiland-Reyes (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TAVERNA-1041) Java 9 support: replace maven-jaxb2-plugin?
Date Wed, 18 Apr 2018 12:27:00 GMT

    [ https://issues.apache.org/jira/browse/TAVERNA-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16442414#comment-16442414

Stian Soiland-Reyes commented on TAVERNA-1041:

Using [cxf-xjc-plugin|http://cxf.apache.org/cxf-xjc-plugin.html] instead seems to work. It
is a bit different configuration, so I changed that in taverna-language.

Note that [http://cxf.apache.org/cxf-xjc-plugin.html] is quite out of date, the latest version
is 3.2.1 and there is a very useful option {{<xsdDir>}} to process a full directory.
We need to use \{{{$project.basedir}/}} in the paths to ensure the build works in multi-module

Taverna Language has not currently got much consistency in where the XSDs live, and in how
they define their namespaces. Some use bindings.xjb, some use JAXB annotations inline in the
XSD, and some use parameters to xjc in pom.xml. One variation is also if the XSDs are in src/main/resources
(to be in JAR classpath) or src/main/xsd – the first is preferable for our own XSDs, and
the second is preferable for third-party XSDs of non-AL licenses.

So I have mainly kept the same structure. See [https://github.com/apache/incubator-taverna-language/compare/4224fb082ac206f0a69af1f5ee836ca92e5a35a8...97052ae2884631a81a0e1771a1d39e6a8cb5bb70]
for details.


Rough (combined) example:
          <!-- single file (and its imports) go to fixed packagename -->
         <!-- mapping to package name given in binding.xjb -->
          <!-- XSD files declare their package names with JAXB annotations -->
+ <version>3.2.1</version>

> Java 9 support: replace maven-jaxb2-plugin?
> -------------------------------------------
>                 Key: TAVERNA-1041
>                 URL: https://issues.apache.org/jira/browse/TAVERNA-1041
>             Project: Apache Taverna
>          Issue Type: Bug
>          Components: Taverna Language, Taverna OSGi, Taverna Plugin Component, Taverna
>         Environment: JDK 9
>            Reporter: Stian Soiland-Reyes
>            Assignee: Stian Soiland-Reyes
>            Priority: Major
> It would be good if our project can compile (and not just run) with Java 9. This might
require updating/replacing some Maven plugins. I ran into an issue with maven-jaxb2-plugin
when [compiling taverna-language on JDK9|https://builds.apache.org/user/stain/my-views/view/taverna/job/incubator-taverna-language/469/console].
> {{[ERROR] Failed to execute goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.13.3:generate
(default) on project taverna-baclava-language: Execution default of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.13.3:generate
failed: Prefix '' is already bound to '' -> [Help 1]}}
> It seems maven-jaxb2-plugin is [still working on Java 9 support|https://github.com/highsource/maven-jaxb2-plugin/issues/114],
in particular an issue with setting [package names|https://github.com/highsource/maven-jaxb2-plugin/issues/120],
which probably would affect us.
> This issue will investigate if there are workarounds for the current release of maven-jaxb2-plugin
or if we should switch to alternatives like Apache [cxf-xjc-plugin|http://cxf.apache.org/cxf-xjc-plugin.html]

This message was sent by Atlassian JIRA

View raw message