exec-maven-plugin with Xtext [message #1856950] |
Tue, 10 January 2023 11:06  |
Eclipse User |
|
|
|
Is there a way of configuring `exec-maven-plugin` to work with Xtext/Tycho?
I have a main file `GenerateTmGrammar` that needs grammar access to my DSL, i.e., it needs to run
Injector inj = new MyDSLStandaloneSetup().createInjectorAndDoEMFRegistration();
MyDSLGrammarAccess grammarAccess = inj.getInstance(MyDSLGrammarAccess.class);
Grammar grammar = grammarAccess.getGrammar();
Set<String> keywords = GrammarUtil.getAllKeywords(grammar);
However, when running a `mvn clean install` on the parent project, I'm getting the following error:
An exception occurred while executing the Java class. com.google.common.util.concurrent.UncheckedExecutionException: java.lang.SecurityException: class "org.eclipse.core.runtime.OperationCanceledException"'s signer information does not match signer information of other classes in the same package
Interestingly, I'm not getting this error when I run `mvn clean install` on the actual submodule containing `GenerateTmGrammar.java`.
Before I imported anything related to Xtext the plugin was running fine.
Does anybody have experience with setting this up? Any solutions/workarounds?
`exec-maven-plugin` configuration:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>Generate TextMate grammar json file</id>
<phase>prepare-package</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>com.example.mydsl.ide.textmate.GenerateTmLanguage</mainClass>
<arguments>
<argument>${project.basedir}/mydsl.tmLanguage.yaml</argument>
<argument>${project.basedir}/src-gen/syntaxes/mydsl.tmLanguage.json</argument>
</arguments>
<classpathScope>compile</classpathScope>
</configuration>
</execution>
</executions>
</plugin>
Note that I've added `<classpathScope>compile</classpathScope>`. Before that, it wasn't finding my dependency on SnakeYAML, which I added to the target file of my project. I'm not sure why.
[Updated on: Tue, 10 January 2023 11:32] by Moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05932 seconds