Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtend + tycho maven + JDK 17 ==> java.lang.IllegalArgumentException: (java.lang.IllegalArgumentException: The annotation property 'deprecationPolicy' is not declared on t)
Xtend + tycho maven + JDK 17 ==> java.lang.IllegalArgumentException: [message #1867584] Sun, 30 June 2024 17:09 Go to next message
Venu J is currently offline Venu JFriend
Messages: 2
Registered: June 2024
Junior Member
Hello All,

I update to Xtext version from 2.20.0 to 2.26.0.
In the 2.20.0 and java 11, i was getting com.google.inject.internal.InternalProvisionException. then updated to 2.26.0. Some blogs are suggested to update 2.26.0 version.

Currently i use to build product
Tycho maven 2.7.5 + JDK 17 + eclipse 2020-06 target

getting following error. Xtend compilation error


45: Error during annotation processing:
java.lang.IllegalArgumentException: The annotation property 'deprecationPolicy' is not declared on the annotation type 'org.eclipse.xtend.lib.annotations.Accessors'.
at org.eclipse.xtend.core.macro.declaration.JvmAnnotationReferenceImpl.findOperation(JvmAnnotationReferenceImpl.java:94)
at org.eclipse.xtend.core.macro.declaration.JvmAnnotationReferenceImpl.getValue(JvmAnnotationReferenceImpl.java:61)
at org.eclipse.xtend.core.macro.declaration.JvmAnnotationReferenceImpl.getEnumValue(JvmAnnotationReferenceImpl.java:249)
at org.eclipse.xtend.lib.annotations.AccessorsProcessor$Util.getDeprecationPolicyAsEnum(AccessorsProcessor.java:162)
at org.eclipse.xtend.lib.annotations.AccessorsProcessor$Util.lambda$addGetter$5(AccessorsProcessor.java:225)
at org.eclipse.xtend.core.macro.declaration.JvmTypeDeclarationImpl.addMethod(JvmTypeDeclarationImpl.java:119)
at org.eclipse.xtend.lib.annotations.AccessorsProcessor$Util.addGetter(AccessorsProcessor.java:274)
at org.eclipse.xtend.lib.annotations.AccessorsProcessor._transform(AccessorsProcessor.java:449)
at org.eclipse.xtend.lib.annotations.AccessorsProcessor.transform(AccessorsProcessor.java:510)
at org.eclipse.xtend.lib.annotations.AccessorsProcessor.lambda$doTransform$0(AccessorsProcessor.java:438)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at org.eclipse.xtend.lib.annotations.AccessorsProcessor.doTransform(AccessorsProcessor.java:440)
Re: Xtend + tycho maven + JDK 17 ==> java.lang.IllegalArgumentException: [message #1867587 is a reply to message #1867584] Sun, 30 June 2024 17:40 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14698
Registered: July 2009
Senior Member
This looks like you are still using 2.20 somewhere in your Codebase

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtend + tycho maven + JDK 17 ==> java.lang.IllegalArgumentException: [message #1867611 is a reply to message #1867587] Mon, 01 July 2024 18:03 Go to previous messageGo to next message
Venu J is currently offline Venu JFriend
Messages: 2
Registered: June 2024
Junior Member
Thank you Christian for the quick replay.

Yes, your right Xtext version using 22 via intermediate dependency from eclipse-2020-06.
I found in artifactory.xml
<artifact classifier='osgi.bundle' id='org.eclipse.xtend.lib' version='2.22.0.v20200602-0713'>
<properties size='1'>
<property name='download.size' value='106621'/>
</properties>
</artifact>

I really don't want to move to next version of eclipse now or xtext that is 2.26.0.

I'm fine with 2.22.0 but,

6:12:46  [WARNING] Error injecting: org.eclipse.tycho.build.TychoGraphBuilder
06:12:46  java.lang.UnsupportedClassVersionError: org/eclipse/core/runtime/IProgressMonitor has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0



build started failing, i need to update java version hence i updated java 17 and tycho 2.7.5, After the update failing due following

 A required class was missing while executing org.eclipse.xtend:xtend-maven-plugin:2.22.0:compile:com/compare/ui/views/SessionInfoProvider
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.eclipse.xtend:xtend-maven-plugin:2.22.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/3529_8/.m2/repository_tycho275/org/eclipse/xtend/xtend-maven-plugin/2.22.0/xtend-maven-plugin-2.22.0.jar
[ERROR] urls[1] = file:/C:/Users/3529_8/.m2/repository_tycho275/com/google/inject/guice/5.1.0/guice-5.1.0.jar
[ERROR] urls[2] = file:/C:/Users/3529_8/.m2/repository_tycho275/aopalliance/aopalliance/1.0/aopalliance-1.0.jar 


While search i found some workaround but still build failing for me.

<plugin>
                <groupId>org.eclipse.xtend</groupId>
                <artifactId>xtend-maven-plugin</artifactId>
                <version>${xtext.version}</version>
                    <executions>
                        <execution>
                            <phase>generate-sources</phase>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                                    <configuration>
                                        <outputDirectory>xtend-gen</outputDirectory>
                                    </configuration>
                            </execution>
                    </executions>
                    <configuration>
                        <includePluginDependencies>true</includePluginDependencies>
                        <outputDirectory>xtend-gen</outputDirectory>
                    </configuration>
					
					 <dependencies>
					 
						<!-- Guice Dependency -->
						<dependency>
							<groupId>com.google.inject</groupId>
							<artifactId>guice</artifactId>
							<version>5.1.0</version>
						</dependency>
						<!-- Guava Dependency -->
						<dependency>
							<groupId>com.google.guava</groupId>
							<artifactId>guava</artifactId>
							<version>27.1-jre</version>
						</dependency>
						<!-- Plexus Component API Dependency -->
						<dependency>
							<groupId>org.codehaus.plexus</groupId>
							<artifactId>plexus-component-api</artifactId>
							<version>1.0-alpha-33</version>
						</dependency>
       
					</dependencies>
					
					
                 <!--    <dependencies>
                       <dependency>
                            <groupId>org.eclipse.platform</groupId>
                            <artifactId>org.eclipse.equinox.common</artifactId>
                            <version>3.10.0</version>
                        </dependency>
                        <dependency>
                            <groupId>com.google.inject</groupId>
                            <artifactId>guice</artifactId>
                            <version>5.0.1</version> 
                        </dependency>
                       <dependency>
                            <groupId>org.eclipse.jdt</groupId>
                            <artifactId>org.eclipse.jdt.core</artifactId>
                            <version>3.13.102</version>
                        </dependency>

                        <dependency>
                            <groupId>org.eclipse.jdt</groupId>
                            <artifactId>org.eclipse.jdt.compiler.apt</artifactId>
                            <version>1.3.110</version>
                        </dependency>
                        <dependency>
                            <groupId>org.eclipse.jdt</groupId>
                            <artifactId>org.eclipse.jdt.compiler.tool</artifactId>
                            <version>1.2.101</version>
                        </dependency>
                    </dependencies> -->
                </plugin>



Could you please suggest me what exactly i have to focus.

Thank you
VJ

  • Attachment: log.txt
    (Size: 8.12KB, Downloaded 8 times)

[Updated on: Mon, 01 July 2024 18:10]

Report message to a moderator

Re: Xtend + tycho maven + JDK 17 ==> java.lang.IllegalArgumentException: [message #1867614 is a reply to message #1867611] Tue, 02 July 2024 02:42 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14698
Registered: July 2009
Senior Member
I propose you check what the new project wizard generates for the respective version.
(2.26 is quite old)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Embedding Comments in Custom DSL Files
Next Topic:Mix more than one grammar elements in another grammar
Goto Forum:
  


Current Time: Sat Jul 20 01:15:36 GMT 2024

Powered by FUDForum. Page generated in 0.03465 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top