Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Cannot resolve project dependencies: org.eclipse.xtend.lib.macro(mvn will not compile ESH completely due to missing dependency org.eclipse.xtend.lib.macro)
Cannot resolve project dependencies: org.eclipse.xtend.lib.macro [message #1714039] Mon, 09 November 2015 14:02 Go to next message
Harrison Ssamanya is currently offline Harrison SsamanyaFriend
Messages: 12
Registered: November 2015
Junior Member
Hello ESH friends,
For some days now I have been trying to install ESH. But no matter which method I use, I can't seem to get around the problem below.
tools:
- win 10 x64bit, jdk 8 x86
- maven 3.3.3
- eclipse mars x86 bit

1) using Git, I cloned the ESH to my pc.
2) I create a workspace folder and with eclipse Mars and I create my project in there.
3) I execute "mvn clean install" to get down the dependencies to my ".m2" directory. and here an error happens.


[INFO] {osgi.os=linux, osgi.ws=gtk, org.eclipse.update.install.features=true, osgi.arch=x86}
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: org.eclipse.smarthome.core.transform 0.8.0.qualifier
[ERROR] Missing requirement: org.eclipse.smarthome.model.item 0.8.0.qualifier requires 'bundle org.eclipse.xtend.lib.macro 0.0.0' but it could not be found
[ERROR] Cannot satisfy dependency: org.eclipse.smarthome.core.transform 0.8.0.qualifier depends on: package org.eclipse.smarthome.model.script.engine.action 0.0.0
[ERROR] Cannot satisfy dependency: org.eclipse.smarthome.model.script 0.8.0.qualifier depends on: bundle org.eclipse.smarthome.model.item 0.0.0

My analysis:
maven tries to pull down "org.eclipse.xtend.xxxx" bundles into folder: "..\.m2\repository\org\eclipse\xtend\" for the smarthome project.
e.g: org.eclipse.xtend.core, org.eclipse.xtend.lib, xtend-maven-plugin version 2.6.0

However, the smarthome project also requires a bundle: "org.eclipse.xtend.lib.macro".
As manually observed on the Maven repository site, this bundle exists only in versions higher than 2.6.0. (e.g: 2.7.x) and I think thats why
maven throws the error above, since it tries to get org.eclipse.xtend.lib.macro - version 2.6.0 (or 0.0.0) which does not exist.

Goal:
I would love to influence maven to get down for example version 2.7.3 of all these bundles, but I dont know how to do this.
or any other solution would be welcomed. Thanks
Re: Cannot resolve project dependencies: org.eclipse.xtend.lib.macro [message #1714052 is a reply to message #1714039] Mon, 09 November 2015 15:02 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
The Xtend version configured in the target platform is 2.6.2, see https://github.com/eclipse/smarthome/blob/master/targetplatform/smarthome.target#L89

In https://github.com/eclipse/smarthome/blob/master/bundles/model/org.eclipse.smarthome.model.item/META-INF/MANIFEST.MF#L8, I do not see any dependency to the bundle org.eclipse.xtend.lib.macro, so I do not understand why you get this error.

Can you find a reference to org.eclipse.xtend.lib.macro anywhere in your code? https://github.com/eclipse/smarthome/search?utf8=%E2%9C%93&q=macro does not give me any hits...
Re: Cannot resolve project dependencies: org.eclipse.xtend.lib.macro [message #1714106 is a reply to message #1714052] Mon, 09 November 2015 22:49 Go to previous messageGo to next message
Harrison Ssamanya is currently offline Harrison SsamanyaFriend
Messages: 12
Registered: November 2015
Junior Member
Hello Kai,
thanx for the quick reply.

As in the manifest of "org.eclipse.smarthome.model.item", this bundle " org.eclipse.xtend.lib.macro"
has been specified as one of the bundles required for the operation of ""..smarthome.model.item"
The other affected bundles includes: "org.eclipse.smarthome.model.item.ui"

Below is a snapshot of the manifest in text and image.

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Eclipse SmartHome Item Model
Bundle-Vendor: openHABorg
Bundle-Version: 0.8.0.qualifier
Bundle-SymbolicName: org.eclipse.smarthome.model.item;singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.xtext,
org.eclipse.xtext.generator;resolution:=optional,
org.apache.commons.logging;resolution:=optional,
org.eclipse.emf.codegen.ecore;resolution:=optional,
org.eclipse.emf.mwe.utils;resolution:=optional,
org.eclipse.emf.mwe2.launch;resolution:=optional,
com.ibm.icu;resolution:=optional,
org.eclipse.xtext.util,
org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.emf.common,
org.antlr.runtime,
org.eclipse.xtext.common.types,
org.eclipse.smarthome.model.lazygen;resolution:=optional,
com.google.guava,
org.eclipse.xtext.xbase.lib,
org.eclipse.xtend.lib,
org.eclipse.xtend.lib.macro


Thanks again.

[Updated on: Mon, 09 November 2015 22:52]

Report message to a moderator

Re: Cannot resolve project dependencies: org.eclipse.xtend.lib.macro [message #1714138 is a reply to message #1714106] Tue, 10 November 2015 08:39 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Your IDE clearly shows that these files have been modified. The original is this one: https://github.com/eclipse/smarthome/blob/master/bundles/model/org.eclipse.smarthome.model.item/META-INF/MANIFEST.MF#L20

Please try a new checkout and don't even launch the IDE before running the maven build. All should work smoothly then.
Re: Cannot resolve project dependencies: org.eclipse.xtend.lib.macro [message #1714206 is a reply to message #1714138] Tue, 10 November 2015 17:52 Go to previous messageGo to next message
Harrison Ssamanya is currently offline Harrison SsamanyaFriend
Messages: 12
Registered: November 2015
Junior Member
Hello Kai,
thanks again for your help.
As you suggested, I dropped the whole clone and got down a new one. Till now, I have avoided importing the project into the IDE.
I have executed the "mvn clean install", but got another problem while building the "Building Eclipse SmartHome Model"

[INFO] ------------------------------------------------------------------------
[INFO] Building Eclipse SmartHome Model Script 0.8.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ org.eclipse.smarthome.model.script ---
[INFO] Deleting F:\GitFork\smarthome\bundles\model\org.eclipse.smarthome.model.script\xtend-gen (includes = [**], excludes = [.gitignore])
[INFO]
[INFO] --- tycho-packaging-plugin:0.23.1:build-qualifier (default-build-qualifier) @ org.eclipse.smarthome.model.script ---
[INFO] The project's OSGi version is 0.8.0.201511101530
[INFO]
[INFO] --- tycho-packaging-plugin:0.23.1:validate-id (default-validate-id) @ org.eclipse.smarthome.model.script ---
[INFO]
[INFO] --- tycho-packaging-plugin:0.23.1:validate-version (default-validate-version) @ org.eclipse.smarthome.model.script ---
[INFO]
[INFO] >>> exec-maven-plugin:1.2.1:java (default) > validate @ org.eclipse.smarthome.model.script >>>
[INFO]
[INFO] --- tycho-packaging-plugin:0.23.1:build-qualifier (default-build-qualifier) @ org.eclipse.smarthome.model.script ---
[INFO] The project's OSGi version is 0.8.0.201511101530
[INFO]
[INFO] --- tycho-packaging-plugin:0.23.1:validate-id (default-validate-id) @ org.eclipse.smarthome.model.script ---
[INFO]
[INFO] --- tycho-packaging-plugin:0.23.1:validate-version (default-validate-version) @ org.eclipse.smarthome.model.script ---
[INFO]
[INFO] <<< exec-maven-plugin:1.2.1:java (default) < validate @ org.eclipse.smarthome.model.script <<<
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:java (default) @ org.eclipse.smarthome.model.script ---
0 INFO StandaloneSetup - Registering platform uri 'F:\GitFork\smarthome\bundles\model'
342 INFO StandaloneSetup - Adding generated EPackage 'org.eclipse.xtext.xbase.XbasePackage'
493 INFO GenModelHelper - Registered GenModel 'http://www.eclipse.org/Xtext/Xbase/XAnnotations' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
496 INFO GenModelHelper - Registered GenModel 'http://www.eclipse.org/xtext/xbase/Xtype' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
504 INFO GenModelHelper - Registered GenModel 'http://www.eclipse.org/xtext/xbase/Xbase' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
504 INFO GenModelHelper - Registered GenModel 'http://www.eclipse.org/xtext/common/JavaVMTypes' from 'platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel'
1115 INFO StandaloneSetup - Adding generated EPackage 'org.eclipse.xtext.common.types.TypesPackage'
1122 INFO DirectoryCleaner - Cleaning F:\GitFork\smarthome\bundles\model\org.eclipse.smarthome.model.script\src-gen
1123 INFO DirectoryCleaner - Cleaning F:\GitFork\smarthome\bundles\model\org.eclipse.smarthome.model.script.ui\src-gen
3447 INFO GenModelHelper - Registered GenModel 'http://www.eclipse.org/smarthome/model/Script' from 'platform:/resource/org.eclipse.smarthome.model.script/model/generated/Script.genmodel'
error(10): internal error: org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:1279): could not even do k=1 for decision 99; reason: timed out (>1000ms)


44327 INFO CompareFragment - generating Compare Framework infrastructure
44338 ERROR Mwe2Launcher - Problems running workflow org.eclipse.smarthome.model.script.GenerateScript:
[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: LazyGenerator)
org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException
at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(AntlrToolFacade.java:183)
at org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment.generate(XtextAntlrUiGeneratorFragment.java:85)
at org.eclipse.xtext.generator.DefaultGeneratorFragment.generate(DefaultGeneratorFragment.java:122)
at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:154)
at org.eclipse.smarthome.model.lazygen.LazyLanguageConfig.generate(LazyLanguageConfig.java:71)
at org.eclipse.xtext.generator.Generator.generate(Generator.java:396)
at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:138)
at org.eclipse.smarthome.model.lazygen.LazyGenerator.invokeInternal(LazyGenerator.java:32)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:745)
...

Re: Cannot resolve project dependencies: org.eclipse.xtend.lib.macro [message #1714230 is a reply to message #1714206] Tue, 10 November 2015 22:27 Go to previous messageGo to next message
Dennis Nobel is currently offline Dennis NobelFriend
Messages: 166
Registered: September 2014
Senior Member
Which version of Xtext do you have installed in your IDE? Did you use the Eclipse Oomph installer to setup the IDE?
Re: Cannot resolve project dependencies: org.eclipse.xtend.lib.macro [message #1714646 is a reply to message #1714230] Sat, 14 November 2015 20:24 Go to previous message
Harrison Ssamanya is currently offline Harrison SsamanyaFriend
Messages: 12
Registered: November 2015
Junior Member
Hello Dennis,
I had been busy fixing other issues. So i did not see your question.
I have actually tried all solutions. In this case, yes, I used the Oomph eclipse installer.
The version of xtext was 2.6.2.
Thanks for your will to help.
Previous Topic:Dynamic configuration information
Next Topic:Unit Tests in bindings
Goto Forum:
  


Current Time: Wed Apr 24 14:08:22 GMT 2024

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

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

Back to the top