GithubHelp home page GithubHelp logo

maven-xtext-example's People

Contributors

arnedeutsch avatar asheiduk avatar cdietrich avatar dependabot[bot] avatar dhuebner avatar holgerschill avatar lorenzobettini avatar michael-schnell avatar oehme avatar schubmat avatar svenefftinge avatar tjuerge avatar vorburger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maven-xtext-example's Issues

Maven build fails if Xtext version 2.12 is used

Steps to reproduce:

  1. Edit file: maven-xtext-example/pom.xml
  2. Increase version of "xtext.version" from 2.11.0 to 2.12.0
  3. Start maven build
    cd maven-xtext-example
    ./mvnw package

[INFO] --- xtend-maven-plugin:2.12.0:compile (default) @ my.mavenized.herolanguage ---
[WARNING] Error injecting: org.eclipse.xtend.maven.XtendCompile
com.google.inject.ProvisionException: Unable to provision, see the following errors:

  1. Error injecting constructor, java.lang.NoClassDefFoundError: org/eclipse/xtext/ISetup
    at org.eclipse.xtend.maven.XtendCompile.(Unknown Source)
    while locating org.eclipse.xtend.maven.XtendCompile

1 error
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:65)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at org.eclipse.sisu.inject.Guice4$1.get(Guice4.java:162)

Better handling of output folders in example project

Hi,

Would be best if the example project was using two different output folders for xtend and the hero language.

And by the way, I'm surprised that one has to explicitly tell maven to add the source folder of xtend (or hero?) and to clean it...

I know that with the xtend-maven-plugin there is no need for that, is that needed for xtext-maven-plugin? If yes... why? :)

Problem between maven-exec-plugin and asm 5

Hi,

Problem

maven-exec-plugin 1.3 itself depends on an old version of asm (see: http://mojo.codehaus.org/exec-maven-plugin/dependencies.html).

When executing Mwe2Launcher with xtext 2.6, which relies on asm 5.0.1, common types can't detect the correct version of asm, it shows the following warning (got it just by changing all the xtext/xtend dependencies of maven-xtext-example from 2.5 to 2.6.0, and the version of maven-exec-plugin from 1.2.1 to 1.3):

0    [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] WARN  pes.access.impl.DeclaredTypeFactory  - --- xtext.common.types ---------------------------------------------------
0    [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] WARN  pes.access.impl.DeclaredTypeFactory  - ASM library is too old. Falling back to java.lang.reflect API.
0    [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] WARN  pes.access.impl.DeclaredTypeFactory  - Please note that no information about compile time constants is available.
0    [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] WARN  pes.access.impl.DeclaredTypeFactory  - It's recommended to use org.objectweb.asm 5.0.1 or better.
1    [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] WARN  pes.access.impl.DeclaredTypeFactory  - --------------------------------------------------------------------------

Solution

For now, the solution I found is to exclude the three asm dependencies of exec-maven-plugin by adding in the dependencies the following along with the 2 dependencies to xtext and xbase:

                    <dependency>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-plugin-plugin</artifactId>
                        <version>3.2</version>
                        <exclusions>
                            <exclusion>
                                <groupId>asm</groupId>
                                <artifactId>asm</artifactId>
                            </exclusion>
                            <exclusion>
                                <groupId>asm</groupId>
                                <artifactId>asm-commons</artifactId>
                            </exclusion>
                            <exclusion>
                                <groupId>asm</groupId>
                                <artifactId>asm-tree</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>

Make the example project more interesting

The example project where we use our herolanguage should show that the DSL can access Java (and Xtend) code in the same project.

This would also let us catch possible problems with the xtext-maven-plugin due to "bad" behaviors of JDT (see the signing problems of the previous 2022-06 release) and other dependency problems (as happened in the past).

Error when executing mvn package twice

Hi,

If maven package is called again without clean being called before, the following error (but which is actually warning) is shown:

 [INFO] Generating stubs into /home/victor/fac/dev/may/xtext2.5/maven-xtext-example/example-project/target/xtext-temp/stubs
 [INFO] Compiling stubs located in /home/victor/fac/dev/may/xtext2.5/maven-xtext-example/example-project/target/xtext-temp/stubs
 [WARNING] ----------
 [WARNING] 1. ERROR in /home/victor/fac/dev/may/xtext2.5/maven-xtext-example/example-project/target/xtext-temp/stubs/my/company/Superman.java
 [WARNING]  (at line 2)
     public class Superman{}
                ^^^^^^^^
 [WARNING] The type Superman is already defined
 [WARNING] ----------
 [WARNING] 1 problem (1 error)

I am not exactly sure what is the difference between the stubs and the generated-sources, but maybe one of them should be removed?

Exception when built from a aggregator pom at project root.

Created a simple pom in the root folder (maven-xtext-example).

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>my.mavenized.herolanguage</groupId>
    <artifactId>my.mavenized.herolanguage.module</artifactId>
    <packaging>pom</packaging>
    <name>${project.artifactId}</name>
    <version>1.0.0-SNAPSHOT</version>

    <modules>
        <module>my.mavenized.herolanguage.releng</module>
        <module>example-project</module>
    </modules>
</project>

During maven build from the root folder (ie without changing directory into releng) the MWE2 workflow fails to find the dsl projects build.properties and MANIFEST.MF.

It looks like the mwe2 build is dependent on the path from which it is triggered.

This is very inconvenient because typically maven projects are organized into many nested multi-module builds, this way building at the root of the project tree builds all projects in it.

Is there anything that can be adjusted in the mwe2 file or the pom to get this to work?

regards,
Varghese Cottagiri

Snippet of error log

[INFO] --- exec-maven-plugin:1.2.1:java (default) @ my.mavenized.herolanguage ---
0    [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Using resourceSet registry. The registered Packages will not be registered in the global EPackage.Registry.INSTANCE!
6    [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Adding URI mapping from 'platform:/resource/org.eclipse.xtext.xbase/' to 'classpath:/'
8    [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Adding URI mapping from 'platform:/resource/org.eclipse.xtext.common.types/' to 'classpath:/'
8    [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Registering platform uri 'D:\workspaces\zafin\github'
2914 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Adding generated EPackage 'org.eclipse.xtext.xbase.XbasePackage'
3064 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  clipse.emf.mwe.utils.GenModelHelper  - Registered GenModel 'http://www.eclipse.org/Xtext/Xbase/XAnnotations' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
3068 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  clipse.emf.mwe.utils.GenModelHelper  - Registered GenModel 'http://www.eclipse.org/xtext/xbase/Xtype' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
3083 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  clipse.emf.mwe.utils.GenModelHelper  - Registered GenModel 'http://www.eclipse.org/xtext/xbase/Xbase' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
3084 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  clipse.emf.mwe.utils.GenModelHelper  - Registered GenModel 'http://www.eclipse.org/xtext/common/JavaVMTypes' from 'platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel'
3660 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Adding generated EPackage 'org.eclipse.xtext.common.types.TypesPackage'
3668 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  ipse.emf.mwe.utils.DirectoryCleaner  - Cleaning d:\workspaces\zafin\github\maven-xtext-example\..\my.mavenized.herolanguage\src-gen
3672 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  ipse.emf.mwe.utils.DirectoryCleaner  - Cleaning d:\workspaces\zafin\github\maven-xtext-example\..\my.mavenized.herolanguage\model
3673 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  ipse.emf.mwe.utils.DirectoryCleaner  - Cleaning d:\workspaces\zafin\github\maven-xtext-example\..\my.mavenized.herolanguage.ui\src-gen
3676 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  ipse.emf.mwe.utils.DirectoryCleaner  - Cleaning d:\workspaces\zafin\github\maven-xtext-example\..\my.mavenized.herolanguage.tests\src-gen
3799 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  ipse.xtext.generator.LanguageConfig  - generating infrastructure for my.mavenized.HeroLanguage with fragments : ImplicitRuntimeFragment, ImplicitUiFragment, GrammarAccessFragment, EMFGeneratorFragment, SerializerFragment, ResourceFactoryFragment, XtextAntlrGeneratorFragment, ValidatorFragment, ImportNamespacesScopingFragment, QualifiedNamesFragment, BuilderIntegrationFragment, GeneratorFragment, FormatterFragment, LabelProviderFragment, OutlineTreeProviderFragment, QuickOutlineFragment, QuickfixProviderFragment, ContentAssistFragment, XtextAntlrUiGeneratorFragment, Junit4Fragment, RefactorElementNameFragment, TypesGeneratorFragment, XbaseGeneratorFragment, CodetemplatesGeneratorFragment, CompareFragment
5450 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  clipse.emf.mwe.utils.GenModelHelper  - Registered GenModel 'http://www.mavenized.my/HeroLanguage' from 'file:/D:/workspaces/zafin/github/my.mavenized.herolanguage/model/generated/HeroLanguage.genmodel'
13203 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] WARN  ing.ImportNamespacesScopingFragment  - Skipping stub generation as Xbase is used
16400 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  text.generator.junit.Junit4Fragment  - generating Junit4 Test support classes
16434 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  text.generator.junit.Junit4Fragment  - generating Compare Framework infrastructure
16508 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] ERROR g.eclipse.xtext.generator.Generator  - java.io.FileNotFoundException: ..\my.mavenized.herolanguage\META-INF\MANIFEST.MF (The system cannot find the path specified)
org.eclipse.emf.common.util.WrappedException: java.io.FileNotFoundException: ..\my.mavenized.herolanguage\META-INF\MANIFEST.MF (The system cannot find the path specified)
    at org.eclipse.xtext.generator.Generator.mergeManifest(Generator.java:423)
    at org.eclipse.xtext.generator.Generator.generateManifestRt(Generator.java:390)
    at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:141)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
    at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
    at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
    at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
    at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:74)
    at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.FileNotFoundException: ..\my.mavenized.herolanguage\META-INF\MANIFEST.MF (The system cannot find the path specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:120)
    at org.eclipse.xtext.generator.Generator.mergeManifest(Generator.java:409)
    ... 18 more
16510 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  .emf.mwe2.runtime.workflow.Workflow  - Done.
[INFO] 
[INFO] --- xtend-maven-plugin:2.5.0:compile (default) @ my.mavenized.herolanguage ---
[ERROR] 
ERROR:  HeroLanguageValidator.xtend - 
12: AbstractHeroLanguageValidator cannot be resolved to a type.
[ERROR] 
ERROR:  HeroLanguageValidator.xtend - 
12: Superclass must be a class
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] parent ............................................ SUCCESS [0.195s]
[INFO] My Hero Language Core ............................. FAILURE [25.194s]
[INFO] My Hero Language UI ............................... SKIPPED
[INFO] My Hero Language Tests ............................ SKIPPED
[INFO] My Hero Language Feature .......................... SKIPPED
[INFO] My Hero Language Update Site ...................... SKIPPED
[INFO] example-project ................................... SKIPPED
[INFO] my.mavenized.herolanguage.module .................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

Tycho generates "Unknown OSGi execution environment: 'JavaSE-20'" error upon Maven 'clean install' command

Hi,
I get the above error when I try to perform the "Build the language" step (step 2) of the procedure. That is running "mvn clean install" from my 'git\maven-xtext-example' directory. The exact errors produced are:

[ERROR] Internal error: org.eclipse.tycho.core.ee.UnknownEnvironmentException: Unknown OSGi execution environment: 'JavaSE-20' -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: org.eclipse.tycho.core.ee.UnknownEnvironmentException: Unknown OSGi execution environment: 'JavaSE-20'
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:109)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:910)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
at java.lang.reflect.Method.invoke (Method.java:578)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: org.eclipse.tycho.core.ee.UnknownEnvironmentException: Unknown OSGi execution environment: 'JavaSE-20'
at org.eclipse.tycho.core.ee.ExecutionEnvironmentUtils.getExecutionEnvironment (ExecutionEnvironmentUtils.java:96)
at org.eclipse.tycho.core.osgitools.OsgiBundleProject.applyBestOfCurrentOrConfiguredProfile (OsgiBundleProject.java:778)
at org.eclipse.tycho.core.osgitools.OsgiBundleProject.readExecutionEnvironmentConfiguration (OsgiBundleProject.java:748)
at org.eclipse.tycho.core.resolver.DefaultTychoResolver.setupProject (DefaultTychoResolver.java:103)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead (TychoMavenLifecycleParticipant.java:111)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:223)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:910)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
at java.lang.reflect.Method.invoke (Method.java:578)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException

Please note that the preceding "Increase memory" step 1 did NOT work for me, as when I try the command (or at least the equivalent windows - I am using Windows 11 machine - to the Unix one) given, the subsequent 'clean install' generates the following error:

C:\Users\Alison\git\maven-xtext-example>set MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=256m"

C:\Users\Alison\git\maven-xtext-example>mvn clean install
Invalid maximum heap size: -Xmx512m -XX:MaxPermSize=256m
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Invalid characters in .xtextbin

Hi,

When I built the project, I found invalid characters (like below ones) in .xtextbin file which caused to build fail (Invalid byte 1 of 1-byte UTF-8 sequence) :

塭m

Is there any way to fix it?

thanks

Building maven-xtext-example fails

[WARNING] The POM for org.eclipse.xtext:org.eclipse.xtext.xtext.generator:jar:2.11.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
1 [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] ERROR mf.mwe2.launch.runtime.Mwe2Launcher - [XtextLinkingDiagnostic: null:10 Couldn't resolve reference to JvmType 'XtextGenerator'., XtextLinkingDiagnostic: null:11 Couldn't resolve reference to JvmIdentifiableElement 'configuration'., XtextLinkingDiagnostic: null:12 Couldn't resolve reference to JvmIdentifiableElement 'project'., XtextLinkingDiagnostic: null:12 Couldn't resolve reference to JvmType 'StandardProjectConfig'., XtextLinkingDiagnostic: null:13 Couldn't resolve reference to JvmIdentifiableElement 'baseName'., XtextLinkingDiagnostic: null:14 Couldn't resolve reference to JvmIdentifiableElement 'rootPath'., XtextLinkingDiagnostic: null:15 Couldn't resolve reference to JvmIdentifiableElement 'runtimeTest'., XtextLinkingDiagnostic: null:16 Couldn't resolve reference to JvmIdentifiableElement 'enabled'., XtextLinkingDiagnostic: null:18 Couldn't resolve reference to JvmIdentifiableElement 'eclipsePlugin'., XtextLinkingDiagnostic: null:19 Couldn't resolve reference to JvmIdentifiableElement 'enabled'., XtextLinkingDiagnostic: null:21 Couldn't resolve reference to JvmIdentifiableElement 'createEclipseMetaData'., XtextLinkingDiagnostic: null:24 Couldn't resolve reference to JvmIdentifiableElement 'code'., XtextLinkingDiagnostic: null:25 Couldn't resolve reference to JvmIdentifiableElement 'encoding'., XtextLinkingDiagnostic: null:26 Couldn't resolve reference to JvmIdentifiableElement 'lineDelimiter'., XtextLinkingDiagnostic: null:27 Couldn't resolve reference to JvmIdentifiableElement 'fileHeader'., XtextLinkingDiagnostic: null:30 Couldn't resolve reference to JvmIdentifiableElement 'language'., XtextLinkingDiagnostic: null:30 Couldn't resolve reference to JvmType 'StandardLanguage'., XtextLinkingDiagnostic: null:31 Couldn't resolve reference to JvmIdentifiableElement 'name'., XtextLinkingDiagnostic: null:32 Couldn't resolve reference to JvmIdentifiableElement 'fileExtensions'., XtextLinkingDiagnostic: null:34 Couldn't resolve reference to JvmIdentifiableElement 'serializer'., XtextLinkingDiagnostic: null:35 Couldn't resolve reference to JvmIdentifiableElement 'generateStub'., XtextLinkingDiagnostic: null:37 Couldn't resolve reference to JvmIdentifiableElement 'validator'.]
java.lang.IllegalStateException: [XtextLinkingDiagnostic: null:10 Couldn't resolve reference to JvmType 'XtextGenerator'., XtextLinkingDiagnostic: null:11 Couldn't resolve reference to JvmIdentifiableElement 'configuration'., XtextLinkingDiagnostic: null:12 Couldn't resolve reference to JvmIdentifiableElement 'project'., XtextLinkingDiagnostic: null:12 Couldn't resolve reference to JvmType 'StandardProjectConfig'., XtextLinkingDiagnostic: null:13 Couldn't resolve reference to JvmIdentifiableElement 'baseName'., XtextLinkingDiagnostic: null:14 Couldn't resolve reference to JvmIdentifiableElement 'rootPath'., XtextLinkingDiagnostic: null:15 Couldn't resolve reference to JvmIdentifiableElement 'runtimeTest'., XtextLinkingDiagnostic: null:16 Couldn't resolve reference to JvmIdentifiableElement 'enabled'., XtextLinkingDiagnostic: null:18 Couldn't resolve reference to JvmIdentifiableElement 'eclipsePlugin'., XtextLinkingDiagnostic: null:19 Couldn't resolve reference to JvmIdentifiableElement 'enabled'., XtextLinkingDiagnostic: null:21 Couldn't resolve reference to JvmIdentifiableElement 'createEclipseMetaData'., XtextLinkingDiagnostic: null:24 Couldn't resolve reference to JvmIdentifiableElement 'code'., XtextLinkingDiagnostic: null:25 Couldn't resolve reference to JvmIdentifiableElement 'encoding'., XtextLinkingDiagnostic: null:26 Couldn't resolve reference to JvmIdentifiableElement 'lineDelimiter'., XtextLinkingDiagnostic: null:27 Couldn't resolve reference to JvmIdentifiableElement 'fileHeader'., XtextLinkingDiagnostic: null:30 Couldn't resolve reference to JvmIdentifiableElement 'language'., XtextLinkingDiagnostic: null:30 Couldn't resolve reference to JvmType 'StandardLanguage'., XtextLinkingDiagnostic: null:31 Couldn't resolve reference to JvmIdentifiableElement 'name'., XtextLinkingDiagnostic: null:32 Couldn't resolve reference to JvmIdentifiableElement 'fileExtensions'., XtextLinkingDiagnostic: null:34 Couldn't resolve reference to JvmIdentifiableElement 'serializer'., XtextLinkingDiagnostic: null:35 Couldn't resolve reference to JvmIdentifiableElement 'generateStub'., XtextLinkingDiagnostic: null:37 Couldn't resolve reference to JvmIdentifiableElement 'validator'.]
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:88)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
at java.lang.Thread.run(Thread.java:748)

build status on: https://dhuebner.ci.cloudbees.com/job/maven-xtext-example/
"This DEV@cloud account is currently unavailable"

Travis CI with xText 2.9+

Hi, I'm pretty new to xText and just wonderd what it means that "If you use Xtext 2.9 or higher, the Maven build for your language is auto-generated."?

I noticed that I'm using xText 2.11.
I try to set-up a Continuous Integration using Travis CI.

Could you please quickly outline the steps of your README I should follow and which are unnecessary since version 2.9?

Many thanks! 😄

Example doesn't work with Java 11

Hello! Example does not build with Java 11 because of depedencies needing Java 17:
[ERROR] org.eclipse.core.jobs 3.15.0.v20230808-1403 requires Execution Environment that matches (&(osgi.ee=JavaSE)(version=17)) but the current resolution context uses [a.jre.javase 11.0.0]

Compile error: MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence

Hi,

I encountered below issue when I built example project. Could anyone help it out?

Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-12T04:58:10+08:00)
Maven home: D:\Program Files\Java\apache-maven-3.2.3
Java version: 1.8.0_102, vendor: Oracle Corporation
Java home: D:\Program Files\Java\jdk1.8.0_102\jre
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"

......................

[DEBUG] Configuring mojo org.eclipse.xtend:xtend-maven-plugin:2.9.0:compile from plugin realm ClassRealm[plugin>org.eclipse.xtend:xtend-maven-plugin:2.9.0, parent: sun.misc.Launcher$AppClassLoader@5c647e05]
[WARNING] Error injecting: org.eclipse.xtend.maven.XtendCompile
com.google.inject.ProvisionException: Guice provision errors:

  1. Error injecting constructor, com.google.inject.CreationException: Guice creation errors:

  2. Error injecting constructor, org.eclipse.emf.common.util.WrappedException: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
    at org.eclipse.xtext.xbase.services.XtypeGrammarAccess.(XtypeGrammarAccess.java:728)
    at org.eclipse.xtext.xbase.services.XtypeGrammarAccess.class(XtypeGrammarAccess.java:728)
    while locating org.eclipse.xtext.xbase.services.XtypeGrammarAccess
    for parameter 1 at org.eclipse.xtext.xbase.services.XbaseGrammarAccess.(XbaseGrammarAccess.java:3353)
    at org.eclipse.xtext.xbase.services.XbaseGrammarAccess.class(XbaseGrammarAccess.java:3353)
    while locating org.eclipse.xtext.xbase.services.XbaseGrammarAccess
    for field at org.eclipse.xtext.xbase.validation.XbaseValidator.grammarAccess(XbaseValidator.java:154)
    at org.eclipse.xtext.service.MethodBasedModule.configure(MethodBasedModule.java:57)
    while locating org.eclipse.xtext.xbase.validation.XbaseValidator
    Caused by: org.eclipse.emf.common.util.WrappedException: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
    at org.eclipse.xtext.parser.BaseEPackageAccess.loadResource(BaseEPackageAccess.java:57)
    at org.eclipse.xtext.parser.BaseEPackageAccess.loadGrammarFile(BaseEPackageAccess.java:44)
    at org.eclipse.xtext.service.GrammarProvider.getGrammar(GrammarProvider.java:61)
    at org.eclipse.xtext.xbase.services.XtypeGrammarAccess.internalFindGrammar(XtypeGrammarAccess.java:756)
    at org.eclipse.xtext.xbase.services.XtypeGrammarAccess.(XtypeGrammarAccess.java:729)
    at org.eclipse.xtext.xbase.services.XtypeGrammarAccess$$FastClassByGuice$$c92f962a.newInstance()
    at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
    at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60)
    at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
    at com.google.inject.Scopes$1$1.get(Scopes.java:65)
    at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
    at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
    at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
    at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
    at com.google.inject.Scopes$1$1.get(Scopes.java:65)
    at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
    at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:53)
    at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:110)
    at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:94)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
    at com.google.inject.Scopes$1$1.get(Scopes.java:65)
    at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
    at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:204)
    at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:198)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
    at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:198)
    at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:179)
    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)
    at com.google.inject.Guice.createInjector(Guice.java:95)
    at com.google.inject.Guice.createInjector(Guice.java:72)
    at com.google.inject.Guice.createInjector(Guice.java:62)
    at org.eclipse.xtext.xbase.XbaseStandaloneSetupGenerated.createInjector(XbaseStandaloneSetupGenerated.java:30)
    at org.eclipse.xtext.xbase.XbaseStandaloneSetupGenerated.createInjectorAndDoEMFRegistration(XbaseStandaloneSetupGenerated.java:24)
    at org.eclipse.xtext.xbase.XbaseStandaloneSetup.createInjectorAndDoEMFRegistration(XbaseStandaloneSetup.java:31)
    at org.eclipse.xtext.xbase.XbaseStandaloneSetup.doSetup(XbaseStandaloneSetup.java:24)
    at org.eclipse.xtext.xbase.annotations.XbaseWithAnnotationsStandaloneSetupGenerated.createInjectorAndDoEMFRegistration(XbaseWithAnnotationsStandaloneSetupGenerated.java:23)
    at org.eclipse.xtext.xbase.annotations.XbaseWithAnnotationsStandaloneSetup.createInjectorAndDoEMFRegistration(XbaseWithAnnotationsStandaloneSetup.java:30)
    at org.eclipse.xtext.xbase.annotations.XbaseWithAnnotationsStandaloneSetup.doSetup(XbaseWithAnnotationsStandaloneSetup.java:23)
    at org.eclipse.xtend.maven.XtendMavenStandaloneSetup.createInjectorAndDoEMFRegistration(XtendMavenStandaloneSetup.java:19)
    at org.eclipse.xtend.maven.AbstractXtendMojo.injectMembers(AbstractXtendMojo.java:44)
    at org.eclipse.xtend.maven.AbstractXtendMojo.(AbstractXtendMojo.java:31)
    at org.eclipse.xtend.maven.AbstractXtendCompilerMojo.(AbstractXtendCompilerMojo.java:43)
    at org.eclipse.xtend.maven.XtendCompile.(XtendCompile.java:27)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:86)
    at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:109)
    at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)
    at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:92)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:116)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
    at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
    at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1054)
    at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993)
    at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1032)
    at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
    at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
    at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
    at org.eclipse.sisu.plexus.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:133)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
    at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
    at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1047)
    at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993)
    at com.google.inject.Scopes$1$1.get(Scopes.java:59)
    at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:82)
    at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:260)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:252)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:462)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:119)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Compile error

Hi Sven, I just tried building this from scratch and get the following error:

ERROR: HeroLanguageProposalProvider.xtend -
6: my.mavenized.ui.contentassist.AbstractHeroLanguageProposalProvider cannot be resolved to a type.

I'm running with Java 8 and maven 3.2.1.

[SECURITY] Build executes in the context of insecure/untrusted code

CWE-829: Inclusion of Functionality from Untrusted Control Sphere
CWE-494: Download of Code Without Integrity Check

The build files indicate that this project is resolving dependencies over HTTP instead of HTTPS. Any of these artifacts could have been MITM to maliciously compromise them and infect the build artifacts that were produced. Additionally, if any of these JARs or other dependencies were compromised, any developers using these could continue to be infected past updating to fix this.

This vulnerability has a CVSS v3.0 Base Score of 8.1/10
https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

This isn't just theoretical

POC code has existed since 2014 to maliciously compromise a JAR file inflight.
See:

MITM Attacks Increasingly Common

See:

Source Locations

<repositories>
<repository>
<id>eclipse</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/2019-03/</url>
</repository>
<repository>
<id>Xtext Update Site</id>
<layout>p2</layout>
<url>http://download.eclipse.org/modeling/tmf/xtext/updates/releases/${xtext.version}/</url>
</repository>
</repositories>

[ERROR] ERROR:The type Superman is already defined in Super.hero

I observe the same problem like the following
#12 with the master of maven-xtext-example project.

When I compile (mvn install) this example project I got:

[ERROR] ERROR:The type Superman is already defined in Super.hero. (file:/F:/javaee/eclipse_mars_workspace/maven-xtext-example/example-project/src/main/java/Super.model line : 1)

The workaround is mvn clean install, but when we have deals with big projects, this is not suitable workaround.

my.company.Superman cannot be resolved

On importing the example projects into eclipse - there is this one error for the following xtend test

 9: @Test def void testSimple() {
10:   assertEquals("Hello I can fly!", new my.company.Superman().helloSuperman)
11: }
Description : my.company.Superman cannot be resolved
Resource : SuperManTest.xtend
Path : /example-project/src/test/java/my/hero
Location : line: 10 /example-project/src/test/java/my/hero/SuperManTest.xtend
Type : Xtend Problem

but the code generated is in line with the type not found issue

@Test
public void testSimple() {
    throw new Error("Unresolved compilation problems:"
      + "\nmy.company.Superman cannot be resolved."
      + "\nhelloSuperman cannot be resolved");
}

Is this something that you purposely intended to do?

Include .hero and .xtend files to the generated jar

Hi,

When producing a .jar with mvn package, it seems that the .hero and the .xtend files are not included in it, only the generated one.

I'm wondering if there is a way to keep it there, either done by the maven xtext plugin, or as a configuration in the example-project project pom.

Strangely, the xtend files are present in the plugin my.mavenized.herolanguage generated jars...

Installing language feature into my IDE on photon does not work

Hi,
I cloned the master branch, ran mvn clean install on the parent pom and was able to get to build without issues, however trying to install the language feature into my photon IDE by pointing to the target/repository folder of the update site project i am getting the error below. Have tried it in both oxygen and photon and wondering how to resolve it. Thanks

Cannot complete the install because one or more required items could not be found.
Software being installed: HeroLanguage SDK Feature 1.0.0.201901232258 (my.mavenized.herolanguage.sdk.feature.group 1.0.0.201901232258)
Missing requirement: my.mavenized.herolanguage.ui 1.0.0.201901232258 (my.mavenized.herolanguage.ui 1.0.0.201901232258) requires 'osgi.bundle; my.mavenized.herolanguage.ide 0.0.0' but it could not be found
Cannot satisfy dependency:
From: HeroLanguage SDK Feature 1.0.0.201901232258 (my.mavenized.herolanguage.sdk.feature.group 1.0.0.201901232258)
To: org.eclipse.equinox.p2.iu; my.mavenized.herolanguage.ui [1.0.0.201901232258,1.0.0.201901232258]

BUILD FAILURE The type Superman is already

Hi,

I did a clean checkout and run a maven install in parent (my.mavenized.herolanguage.releng). If I run a mvn install in example-project, I get the following error.

[INFO] Validate and generate.
[INFO] Starting validation for input: 'Super.hero'
[ERROR] ERROR:The type Superman is already defined in Super.hero. (file:/private/tmp/maven-xtext-example/example-project/src/main/java/Super.hero line : 1)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.699 s
[INFO] Finished at: 2015-06-17T20:34:32+01:00
[INFO] Final Memory: 20M/310M

Any Ideas?

Build failure because org.eclipse.xtext:org.eclipse.xtext.xtext:jar:2.5.0-SNAPSHOT could not be resolved

It works when xtext-2.5.0-SNAPSHOT is changed to just xtext-2.5.0 in my.mavenized.herolanguage/pom.xml

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] My Hero Language Core ............................. FAILURE [1.401s]
[INFO] My Hero Language UI ............................... SKIPPED
[INFO] My Hero Language Tests ............................ SKIPPED
[INFO] My Hero Language Feature .......................... SKIPPED
[INFO] My Hero Language Update Site ...................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.644s
[INFO] Finished at: Wed Jan 01 15:46:45 EST 2014
[INFO] Final Memory: 59M/304M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default) on project my.mavenized.herolanguage: 
Execution default of goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java failed: Plugin org.codehaus.mojo:exec-maven-plugin:1.2.1 or one of its dependencies could not be resolved: 
The following artifacts could not be resolved: org.eclipse.xtext:org.eclipse.xtext.xtext:jar:2.5.0-SNAPSHOT, org.eclipse.xtext:org.eclipse.xtext.xbase:jar:2.5.0-SNAPSHOT: 
Could not find artifact org.eclipse.xtext:org.eclipse.xtext.xtext:jar:2.5.0-SNAPSHOT in codehaus.org (http://snapshots.repository.codehaus.org) -> [Help 1]

build fails with a custom AntlrFragment

Hi,

I followed the steps from doc for building xtext projects with maven and it works OK for normal xtext projects.

My project had a custom AntlrFragment that extends XtextAntlrGeneratorFragment and it is declared in my *.mwe2 file.

When I try to build with maven, I got this: Couldn't resolve reference to JvmType parse.antlr.AntlrGeneratorFragmentWithCustomLexer

Thanks

Error when using xcore model

Hello

Xtext version 2.12.0

When I try to create a maven xtext project that uses a xcore model I get the following error:

591  [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] ERROR textGeneratorResourceSetInitializer  - Couldn't initialize Xcore support. Is it on the classpath?
594  [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] ERROR textGeneratorResourceSetInitializer  - Could not load XcoreLang.xcore.
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: java.io.IOException: The path '/org.eclipse.emf.ecore.xcore.lib/model/XcoreLang.xcore' is unmapped
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
	at org.eclipse.xtext.resource.XtextResourceSet.getResource(XtextResourceSet.java:265)
	at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.ensureResourceCanBeLoaded(XtextGeneratorResourceSetInitializer.java:120)
	at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.loadResource(XtextGeneratorResourceSetInitializer.java:50)
	at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.lambda$initialize$0(XtextGeneratorResourceSetInitializer.java:41)
	at java.util.ArrayList.forEach(ArrayList.java:1249)
	at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.initialize(XtextGeneratorResourceSetInitializer.java:43)
	at org.eclipse.xtext.xtext.generator.XtextGeneratorLanguage.initialize(XtextGeneratorLanguage.java:219)
	at org.eclipse.xtext.xtext.generator.StandardLanguage.initialize(StandardLanguage.java:175)
	at org.eclipse.xtext.xtext.generator.XtextGenerator.initialize(XtextGenerator.java:185)
	at org.eclipse.xtext.xtext.generator.XtextGenerator.checkConfigurationInternal(XtextGenerator.java:139)
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2.checkConfiguration(AbstractWorkflowComponent2.java:21)
	at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.preInvoke(Mwe2Bridge.java:65)
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.preInvoke(AbstractWorkflowComponent.java:197)
	at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.preInvoke(AbstractCompositeWorkflowComponent.java:29)
	at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:18)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: The path '/org.eclipse.emf.ecore.xcore.lib/model/XcoreLang.xcore' is unmapped
	at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl.createInputStream(PlatformResourceURIHandlerImpl.java:535)
	at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
	at org.eclipse.xtext.resource.XtextResourceSet$1.createInputStream(XtextResourceSet.java:298)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1269)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
	... 26 more
612  [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] ERROR mf.mwe2.launch.runtime.Mwe2Launcher  - Problems running workflow io.hughestech.drupals2i.GenerateDsl: java.io.IOException: The path '/test-models/model/testmodel.xcore' is unmapped
java.lang.RuntimeException: Problems running workflow io.hughestech.drupals2i.GenerateDsl: java.io.IOException: The path '/test-models/model/testmodel.xcore' is unmapped
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:104)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: java.io.IOException: The path '/test-models/model/testmodel.xcore' is unmapped
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
	at org.eclipse.xtext.resource.XtextResourceSet.getResource(XtextResourceSet.java:265)
	at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.loadResource(XtextGeneratorResourceSetInitializer.java:51)
	at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.lambda$initialize$0(XtextGeneratorResourceSetInitializer.java:41)
	at java.util.ArrayList.forEach(ArrayList.java:1249)
	at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.initialize(XtextGeneratorResourceSetInitializer.java:43)
	at org.eclipse.xtext.xtext.generator.XtextGeneratorLanguage.initialize(XtextGeneratorLanguage.java:219)
	at org.eclipse.xtext.xtext.generator.StandardLanguage.initialize(StandardLanguage.java:175)
	at org.eclipse.xtext.xtext.generator.XtextGenerator.initialize(XtextGenerator.java:185)
	at org.eclipse.xtext.xtext.generator.XtextGenerator.checkConfigurationInternal(XtextGenerator.java:139)
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2.checkConfiguration(AbstractWorkflowComponent2.java:21)
	at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.preInvoke(Mwe2Bridge.java:65)
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.preInvoke(AbstractWorkflowComponent.java:197)
	at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.preInvoke(AbstractCompositeWorkflowComponent.java:29)
	at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:18)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
	... 10 more
Caused by: java.io.IOException: The path '/test-models/model/testmodel.xcore' is unmapped
	at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl.createInputStream(PlatformResourceURIHandlerImpl.java:535)
	at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
	at org.eclipse.xtext.resource.XtextResourceSet$1.createInputStream(XtextResourceSet.java:298)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1269)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
	... 25 more

Build failure

Hi!

typing "mvn clean install" after a fresh checkout/clone results in a build failure.

Bests,
Dirk

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] parent ............................................. SUCCESS [ 0.135 s]
[INFO] My Hero Language Core .............................. FAILURE [ 0.637 s]
[INFO] My Hero Language UI ................................ SKIPPED
[INFO] My Hero Language Tests ............................. SKIPPED
[INFO] My Hero Language Feature ........................... SKIPPED
[INFO] My Hero Language Update Site ....................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.935 s
[INFO] Finished at: 2016-03-29T12:57:39+02:00
[INFO] Final Memory: 56M/266M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default) on project my.mavenized.herolanguage: Execution default of goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java failed: Plugin org.codehaus.mojo:exec-maven-plugin:1.2.1 or one of its dependencies could not be resolved: Failed to collect dependencies at org.codehaus.mojo:exec-maven-plugin:jar:1.2.1 -> org.eclipse.xtext:org.eclipse.xtext.xtext:jar:2.9.0 -> org.eclipse.xtext:org.eclipse.xtext.generator:jar:2.9.0 -> org.eclipse.xtext:org.eclipse.xtext.ecore:jar:2.9.0 -> org.eclipse.xtext:org.eclipse.xtext:jar:2.9.0 -> org.eclipse.xtend:org.eclipse.xtend.lib:jar:[2.9.0]: No versions available for org.eclipse.xtend:org.eclipse.xtend.lib:jar:[2.9.0] within specified range -> [Help 1]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.