Packages does not exist from Xtext Maven Example [message #1851750] |
Thu, 14 April 2022 18:47 |
Clark Gable Messages: 3 Registered: April 2022 |
Junior Member |
|
|
Hi,
I am currently new to Xtext and LSP and tried to create a .jar from the sample project to create a language server to use in a VSCode extension. Unfortunately, when I run Maven install on the parent to create the .jar of the language server, the following errors appear:
/org.xtext.example.mydsl.tests/xtend-gen/org/xtext/example/mydsl/tests/MyDslParsingTest.java:[15,29] package org.junit.jupiter.api does not exist
[ERROR]...org.xtext.example.mydsl.parent/org.xtext.example.mydsl.tests/xtend-gen/org/xtext/example/mydsl/tests/MyDslParsingTest.java:[16,29] package org.junit.jupiter.api does not exist
[ERROR].../org.xtext.example.mydsl.parent/org.xtext.example.mydsl.tests/xtend-gen/org/xtext/example/mydsl/tests/MyDslParsingTest.java:[17,39] package org.junit.jupiter.api.extension does not exist
[ERROR].../org.xtext.example.mydsl.parent/org.xtext.example.mydsl.tests/xtend-gen/org/xtext/example/mydsl/tests/MyDslParsingTest.java:[20,2] cannot find symbol
[ERROR] symbol: class ExtendWith
[ERROR].../org.xtext.example.mydsl.parent/org.xtext.example.mydsl.tests/xtend-gen/org/xtext/example/mydsl/tests/MyDslParsingTest.java:[21,2] cannot find symbol
[ERROR] symbol: class InjectWith
[ERROR]...org.xtext.example.mydsl.parent/org.xtext.example.mydsl.tests/xtend-gen/org/xtext/example/mydsl/tests/MyDslParsingTest.java:[25,11] cannot find symbol
[ERROR] symbol: class ParseHelper
[ERROR] location: class org.xtext.example.mydsl.tests.MyDslParsingTest
[ERROR].../org.xtext.example.mydsl.parent/org.xtext.example.mydsl.tests/xtend-gen/org/xtext/example/mydsl/tests/MyDslParsingTest.java:[20,13] cannot find symbol
[ERROR] symbol: class InjectionExtension
[ERROR]...org.xtext.example.mydsl.parent/org.xtext.example.mydsl.tests/xtend-gen/org/xtext/example/mydsl/tests/MyDslParsingTest.java:[21,13] cannot find symbol
[ERROR] symbol: class MyDslInjectorProvider
[ERROR].../org.xtext.example.mydsl.parent/org.xtext.example.mydsl.tests/xtend-gen/org/xtext/example/mydsl/tests/MyDslParsingTest.java:[27,4] cannot find symbol
[ERROR] symbol: class Test
[ERROR] location: class org.xtext.example.mydsl.tests.MyDslParsingTest
[ERROR].../org.xtext.example.mydsl.parent/org.xtext.example.mydsl.tests/xtend-gen/org/xtext/example/mydsl/tests/MyDslParsingTest.java:[34,7] cannot find symbol
[ERROR] symbol: variable Assertions
[ERROR] location: class org.xtext.example.mydsl.tests.MyDslParsingTest
[ERROR].../org.xtext.example.mydsl.parent/org.xtext.example.mydsl.tests/xtend-gen/org/xtext/example/mydsl/tests/MyDslParsingTest.java:[41,7] cannot find symbol
[ERROR] symbol: variable Assertions
[ERROR] location: class org.xtext.example.mydsl.tests.MyDslParsingTest
The build error is only in the tests:
[INFO] Reactor Summary for org.xtext.example.mydsl.parent 1.0.0-SNAPSHOT:
[INFO]
[INFO] org.xtext.example.mydsl.parent ..................... SUCCESS [ 0.273 s]
[INFO] org.xtext.example.mydsl ............................ SUCCESS [ 11.450 s]
[INFO] org.xtext.example.mydsl.ide ........................ SUCCESS [ 3.172 s]
[INFO] org.xtext.example.mydsl.tests ...................... FAILURE [ 0.302 s]
Here is what I did:
1. Create new Xtext Project (Java 11, Maven, Fat Jar)
2. Generate Xtext artifacts from MyDsl.xtext
3. mydsl.parent -> Run As "Maven install"
Eclipse: Version: 2022-03 (4.23.0)
Xtext: Version: 2.26.0.v20220228-0901
Java: 11.0.14
I'm not that familiar with the tools, so can somebody help me with this? Thank you very much in advance!
|
|
|
|
|
Re: Packages does not exist from Xtext Maven Example [message #1851781 is a reply to message #1851778] |
Fri, 15 April 2022 11:23 |
|
this projects builds perfectly fine for me with
org.xtext.example.mydsl.parent]$ mvn clean install -Dmaven.repo.local=.m2
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for org.xtext.example.mydsl.parent 1.0.0-SNAPSHOT:
[INFO]
[INFO] org.xtext.example.mydsl.parent ..................... SUCCESS [ 7.819 s]
[INFO] org.xtext.example.mydsl ............................ SUCCESS [01:09 min]
[INFO] org.xtext.example.mydsl.ide ........................ SUCCESS [ 11.468 s]
[INFO] org.xtext.example.mydsl.tests ...................... SUCCESS [ 7.472 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:37 min
[INFO] Finished at: 2022-04-15T13:21:51+02:00
[INFO] ----------------------------------------------------------------------
so i assume you have some broken files floating around in your local maven repo.
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07623 seconds