[
https://issues.apache.org/jira/browse/CAMEL-10905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16431044#comment-16431044
]
ASF GitHub Bot commented on CAMEL-10905:
----------------------------------------
GitHub user PascalSchumacher opened a pull request:
https://github.com/apache/camel/pull/2284
CAMEL-10905: Make camel-grape work on java 9 by replacing Groovy Ecli…
…pse Compiler with GMavenPlus
Not ready to merge!
The groovy-eclipse-compiler plugin is dead (last release in 2015) and
https://github.com/groovy/groovy-eclipse/issues/265 was closed with being
resolved.
With GMavenPlus `mvn clean test` works on Java 8 and 9. But when I run `mvn
package` I get this error:
```
[INFO] --- camel-package-maven-plugin:2.22.0-SNAPSHOT:validate-components
(validate) @ camel-grape ---
[WARNING] The component: grape has validation errors
[WARNING] Missing @UriPath on endpoint
[WARNING] Missing component documentation for the following options:
metaClass
patchesRepository
```
Any help with this would be greatly appreciated.
With GMavenPlus is should also be possible to make `camel-groovy` and
`camel-example-groovy` build on Java 9.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/PascalSchumacher/camel
CAMEL-10905_groovy_java9
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/2284.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2284
----
commit e5e38ce7cbac093015eb300a26002b47f6eb52f7
Author: Pascal Schumacher <pascalschumacher@...>
Date: 2018-04-09T18:35:28Z
CAMEL-10905: Make camel-grape work on java 9 by replacing Groovy Eclipse
Compiler with GMavenPlus
----
> camel-groovy fails on JAVA 9
> -----------------------------
>
> Key: CAMEL-10905
> URL: https://issues.apache.org/jira/browse/CAMEL-10905
> Project: Camel
> Issue Type: Sub-task
> Components: camel-groovy
> Reporter: John Poth
> Priority: Minor
> Attachments: out.txt
>
>
> I think the underlying problem comes from the
> [groovy-eclipse-compiler|https://github.com/groovy/groovy-eclipse/issues/265]
> and how (if possible) to pass JAVA 9 compiler args (full logs attached).
> Affected modules are camel-grape, camel-groovy and camel-example-groovy.
> {code}
> 240. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/dataformat/XmlParserDataFormat.java
> (at line 52)
> private XmlParser newParser() throws Exception {
> ^^^^^^^^^
> Exception cannot be resolved to a type
> ----------
> 241. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/dataformat/XmlParserDataFormat.java
> (at line 53)
> XmlParser xmlParser = new XmlParser(newSaxParser());
> ^^^^^^^^^^^^
> The method newSaxParser() from the type AbstractXmlDataFormat refers to the
> missing type SAXParser
> ----------
> 242. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/dataformat/XmlParserDataFormat.java
> (at line 54)
> xmlParser.setErrorHandler(getErrorHandler());
> ^^^^^^^^^^^^^^^
> The method getErrorHandler() from the type AbstractXmlDataFormat refers to
> the missing type ErrorHandler
> ----------
> 243. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/dataformat/XmlParserDataFormat.java
> (at line 59)
> private XmlNodePrinter newPrinter(OutputStream stream) {
> ^^^^^^^^^^^^
> OutputStream cannot be resolved to a type
> ----------
> 244. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/dataformat/XmlParserDataFormat.java
> (at line 60)
> XmlNodePrinter xmlNodePrinter = new XmlNodePrinter(new
> PrintWriter(stream));
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> The constructor XmlNodePrinter(PrintWriter) is undefined
> ----------
> 245. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/dataformat/XmlParserDataFormat.java
> (at line 60)
> XmlNodePrinter xmlNodePrinter = new XmlNodePrinter(new
> PrintWriter(stream));
> ^^^^^^^^^^^
> PrintWriter cannot be resolved to a type
> ----------
> ----------
> 246. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 1)
> /**
> ^
> The type javax.xml.transform.Source cannot be resolved. It is indirectly
> referenced from required .class files
> ----------
> 247. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 1)
> /**
> ^
> The type javax.xml.transform.TransformerException cannot be resolved. It is
> indirectly referenced from required .class files
> ----------
> 248. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 1)
> /**
> ^
> The type org.w3c.dom.Node cannot be resolved. It is indirectly referenced
> from required .class files
> ----------
> 249. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 19)
> import java.io.IOException;
> ^^^^^^^^^^^^^^^^^^^
> The import java.io.IOException cannot be resolved
> ----------
> 250. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 20)
> import javax.xml.parsers.ParserConfigurationException;
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> The import javax.xml.parsers.ParserConfigurationException cannot be resolved
> ----------
> 251. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 21)
> import javax.xml.transform.TransformerException;
> ^^^^^^^^^^^^^^^^^^^
> The import javax.xml.transform cannot be resolved
> ----------
> 252. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 23)
> import org.w3c.dom.Node;
> ^^^^^^^
> The import org.w3c cannot be resolved
> ----------
> 253. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 24)
> import org.xml.sax.SAXException;
> ^^^^^^^^^^^^^^^^^^^^^^^^
> The import org.xml.sax.SAXException cannot be resolved
> ----------
> 254. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 34)
> public class GPathResultConverter {
> ^^^^^^^^^^^^^^^^^^^^
> Implicit super constructor Object() is undefined for default constructor.
> Must define an explicit constructor
> ----------
> 255. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 39)
> public GPathResult fromString(String input) throws
> ParserConfigurationException, SAXException, IOException {
> ^^^^^^
> String cannot be resolved to a type
> ----------
> 256. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 39)
> public GPathResult fromString(String input) throws
> ParserConfigurationException, SAXException, IOException {
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ParserConfigurationException cannot be resolved to a type
> ----------
> 257. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 39)
> public GPathResult fromString(String input) throws
> ParserConfigurationException, SAXException, IOException {
>
> ^^^^^^^^^^^^
> SAXException cannot be resolved to a type
> ----------
> 258. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 39)
> public GPathResult fromString(String input) throws
> ParserConfigurationException, SAXException, IOException {
>
> ^^^^^^^^^^^
> IOException cannot be resolved to a type
> ----------
> 259. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 40)
> return new XmlSlurper().parseText(input);
> ^^^^^^^^^^^^^^^^
> The constructor XmlSlurper() refers to the missing type
> ParserConfigurationException
> ----------
> 260. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 44)
> public GPathResult fromStringSource(StringSource input) throws
> IOException, SAXException, ParserConfigurationException {
>
> ^^^^^^^^^^^
> IOException cannot be resolved to a type
> ----------
> 261. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 44)
> public GPathResult fromStringSource(StringSource input) throws
> IOException, SAXException, ParserConfigurationException {
>
> ^^^^^^^^^^^^
> SAXException cannot be resolved to a type
> ----------
> 262. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 44)
> public GPathResult fromStringSource(StringSource input) throws
> IOException, SAXException, ParserConfigurationException {
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ParserConfigurationException cannot be resolved to a type
> ----------
> 263. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 45)
> return fromString(input.getText());
> ^^^^^^^
> The method getText() from the type StringSource refers to the missing type
> String
> ----------
> 264. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 49)
> public GPathResult fromNode(Node input, Exchange exchange) throws
> IOException, SAXException, ParserConfigurationException, TransformerException
> {
> ^^^^
> Node cannot be resolved to a type
> ----------
> 265. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 49)
> public GPathResult fromNode(Node input, Exchange exchange) throws
> IOException, SAXException, ParserConfigurationException, TransformerException
> {
>
> ^^^^^^^^^^^
> IOException cannot be resolved to a type
> ----------
> 266. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 49)
> public GPathResult fromNode(Node input, Exchange exchange) throws
> IOException, SAXException, ParserConfigurationException, TransformerException
> {
>
> ^^^^^^^^^^^^
> SAXException cannot be resolved to a type
> ----------
> 267. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 49)
> public GPathResult fromNode(Node input, Exchange exchange) throws
> IOException, SAXException, ParserConfigurationException, TransformerException
> {
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ParserConfigurationException cannot be resolved to a type
> ----------
> 268. ERROR in
> /home/jpoth/dev/git/apache/camel/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
> (at line 49)
> public GPathResult fromNode(Node input, Exchange exchange) throws
> IOException, SAXException, ParserConfigurationException, TransformerException
> {
>
> ^^^^^^^^^^^^^^^^^^^^
> TransformerException cannot be resolved to a type
> ----------
> 268 problems (268 errors)
> at
> org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1029)
> at
> org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:137)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
> ... 20 more
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)