Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven build fails with "Cannot create a resource for" #1

Open
DonatasC opened this issue Jan 13, 2018 · 2 comments
Open

Maven build fails with "Cannot create a resource for" #1

DonatasC opened this issue Jan 13, 2018 · 2 comments

Comments

@DonatasC
Copy link

Checked out the project from GitHub, and ran

mvn deploy

Got:

0    [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] ERROR mf.mwe2.launch.runtime.Mwe2Launcher  - Cannot create a resource for 'c:\dev\xcore-xtend-maven-master\de.nikostotz.xtendxcoremaven/workflow/generateGenModel.mwe2'; a registered resource factory is needed java.lang.RuntimeException: Cannot create a resource for 'c:\dev\xcore-xtend-maven-master\de.nikostotz.xtendxcoremaven/workflow/generateGenModel.mwe2'; a registered resource factory is needed
        at org.eclipse.xtext.resource.XtextResourceSet.getResource(XtextResourceSet.java:262)
        at org.eclipse.xtext.resource.SynchronizedXtextResourceSet.getResource(SynchronizedXtextResourceSet.java:25)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:57)
        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:282)
        at java.lang.Thread.run(Thread.java:748)
@DonatasC
Copy link
Author

I found the source of the above problem. In pom.xml instead of:

<argument>${project.basedir}/workflow/generateGenModel.mwe2</argument>
<argument>-p</argument>
<argument>rootPath=${project.basedir}/..</argument>

we must have "/" added at the beginning of paths:

<argument>/${project.basedir}/workflow/generateGenModel.mwe2</argument>
<argument>-p</argument>
<argument>rootPath=/${project.basedir}/..</argument>

@AlexVasko
Copy link

Thank you very much. It was the problem in my case as well.

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

No branches or pull requests

2 participants