Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

[xtend-maven-plugin][java11] Maven plugin fails to compile Xtend files when present in same folder as Java files #697

Closed
ghillairet opened this issue Jan 22, 2019 · 15 comments
Assignees
Milestone

Comments

@ghillairet
Copy link

Xtend maven plugin version: 2.16.0
Java version: OpenJDK 11.0.2

Steps to reproduce:

  • Create a maven project with xtend and maven plugin dependencies
  • Create a Java class in src/main/java
  • Create an Xtend class in src/main/java that references the Java class
  • Run mvn clean install

This results in a compilation error saying that a method from the Java class refers to the missing type Object.

This can be fixed if the Xtend class is moved to src/main/xtend. This seems to be an issue only with Java 11 and not prior Java versions.

@kthoms kthoms added the invalid label Jan 22, 2019
@kthoms
Copy link

kthoms commented Jan 22, 2019

Xtend 2.16 does and will not support Java 11. This is planned for 2.17.

@kthoms kthoms closed this as completed Jan 22, 2019
@ghillairet
Copy link
Author

@kthoms Is that even if the source and target are set to 1.8 but maven is running on Java 11? That's actually the case in this issue that I forgot to mention.

@cdietrich
Copy link
Member

well yes and no.on non mac it will accidentally work

@cdietrich
Copy link
Member

@ghillairet
Copy link
Author

Ok thanks.

@cdietrich
Copy link
Member

can you share a minimal example @ghillairet
so that i can test with our java 11 branch

@kthoms
Copy link

kthoms commented Jan 22, 2019

Then let's reopen it.

@kthoms kthoms reopened this Jan 22, 2019
@ghillairet
Copy link
Author

@cdietrich Here is my example https://github.com/ghillairet/xtend-java11

@cdietrich
Copy link
Member

can you test with

<repositories>
		<repository>
			<id>codehaus-snapshots</id>
			<name>disable dead 'Codehaus Snapshots' repository, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=481478</name>
			<url>http://nexus.codehaus.org/snapshots/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>x211</id>
			<url>https://projects.itemis.de/nexus/content/groups/xtext_java11/</url>
		</repository>
	</repositories>
	<pluginRepositories>
		<pluginRepository>
			<id>codehaus-snapshots</id>
			<name>disable dead 'Codehaus Snapshots' repository, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=481478</name>
			<url>http://nexus.codehaus.org/snapshots/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</pluginRepository>
		<pluginRepository>
			<id>x211</id>
			<url>https://projects.itemis.de/nexus/content/groups/xtext_java11/</url>
		</pluginRepository>
	</pluginRepositories>

and <version>2.17.0-SNAPSHOT</version>

@cdietrich cdietrich added this to the Release_2.17 milestone Jan 22, 2019
@ghillairet
Copy link
Author

@cdietrich It's working as expected with 2.17.0-SNAPSHOT.

@cdietrich cdietrich self-assigned this Jan 23, 2019
@cdietrich
Copy link
Member

Fixed in Xtext/Xtend 2.17

@georgschmidtdumont
Copy link

Good morning @cdietrich,

I upgraded from Java 8 to Java 11 yesterday and unfortunately ran into this problem as well. I am using Xtext/Xtend 1.19.
I did check out the example from @ghillairet, but unfortunately when I build that project using Java 11 it fails to compile as well.

Can you please look into this again? If required I can provide a small sample of my own.

Thanks!

@cdietrich
Copy link
Member

@georgschmidtdumont i currently have no time to create and debug an example.
please provide yours

@cdietrich
Copy link
Member

p.s.:

https://github.com/ghillairet/xtend-java11

works perfectly fine with Xtext/Xtend 2.19

@georgschmidtdumont
Copy link

Hi @cdietrich,
building my own sample revealed the error of my ways. We still had the workaround for the xText issue 1231 in the project where I am updating Java. This caused the compilation problems.

Thanks for your quick response!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants