Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Maven build failing for green house project checked out from GIthub
icon9.gif  Maven build failing for green house project checked out from GIthub [message #1701829] Thu, 16 July 2015 04:51 Go to next message
Krishna Murthy Mirajkar is currently offline Krishna Murthy MirajkarFriend
Messages: 38
Registered: July 2009
Member
I pulled the code from
https://github.com/kartben/kura-greenhouse-demo

I also have kura code line checked out from
https://github.com/eclipse/kura.git

When I try to build kura-greenhouse-demo it complains as follows -

Any help is appreciated.
regards,
Krishna


C:\Users\al1398\git\kura-greenhouse-demo>mvn install
[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: org.eclipse.iot.greenhouse:or
g.eclipse.iot.greenhouse.coap:0.1.0-SNAPSHOT @ C:\Users\al1398\git\kura-greenhou
se-demo\org.eclipse.iot.greenhouse.coap\pom.xml
[INFO] Adding repository file:/C:/Users/al1398/git/kura-greenhouse-demo/../kura/
kura/target-definition/equinox_3.8.1/repository
[INFO] Adding repository file:/C:/Users/al1398/git/kura-greenhouse-demo/../kura/
kura/target-definition/common/repository
[INFO] Resolving dependencies of MavenProject: org.eclipse.iot.greenhouse:org.ec
lipse.iot.greenhouse.coap:0.1.0-SNAPSHOT @ C:\Users\al1398\git\kura-greenhouse-d
emo\org.eclipse.iot.greenhouse.coap\pom.xml
[INFO] Resolving class path of MavenProject: org.eclipse.iot.greenhouse:org.ecli
pse.iot.greenhouse.coap:0.1.0-SNAPSHOT @ C:\Users\al1398\git\kura-greenhouse-dem
o\org.eclipse.iot.greenhouse.coap\pom.xml
[INFO] Computing target platform for MavenProject: org.eclipse.iot.greenhouse:or
g.eclipse.iot.greenhouse.publisher:0.1.0-SNAPSHOT @ C:\Users\al1398\git\kura-gre
enhouse-demo\org.eclipse.iot.greenhouse.publisher\pom.xml
[INFO] Resolving dependencies of MavenProject: org.eclipse.iot.greenhouse:org.ec
lipse.iot.greenhouse.publisher:0.1.0-SNAPSHOT @ C:\Users\al1398\git\kura-greenho
use-demo\org.eclipse.iot.greenhouse.publisher\pom.xml
[INFO] Cannot complete the request. Generating details.
[INFO] Cannot complete the request. Generating details.
[INFO] {osgi.os=linux, osgi.ws=gtk, org.eclipse.update.install.features=true, os
gi.arch=x86}
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: org.eclipse.iot.greenhouse.publisher 0.1.0.S
NAPSHOT
[ERROR] Missing requirement: org.eclipse.iot.greenhouse.publisher 0.1.0.SNAPSH
OT requires 'package org.eclipse.kura 0.0.0' but it could not be found
[ERROR]
[ERROR] Internal error: java.lang.RuntimeException: No solution found because th
e problem is unsatisfiable.: [Unable to satisfy dependency from org.eclipse.iot.
greenhouse.publisher 0.1.0.SNAPSHOT to package org.eclipse.kura 0.0.0.; Unable t
o satisfy dependency from org.eclipse.iot.greenhouse.publisher 0.1.0.SNAPSHOT to
package org.eclipse.kura.configuration 0.0.0.; Unable to satisfy dependency fro
m org.eclipse.iot.greenhouse.publisher 0.1.0.SNAPSHOT to package org.eclipse.kur
a.data 0.0.0.; No solution found because the problem is unsatisfiable.] -> [Help
1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeExcept
ion: No solution found because the problem is unsatisfiable.: [Unable to satisfy
dependency from org.eclipse.iot.greenhouse.publisher 0.1.0.SNAPSHOT to package
org.eclipse.kura 0.0.0.; Unable to satisfy dependency from org.eclipse.iot.green
house.publisher 0.1.0.SNAPSHOT to package org.eclipse.kura.configuration 0.0.0.;
Unable to satisfy dependency from org.eclipse.iot.greenhouse.publisher 0.1.0.SN
APSHOT to package org.eclipse.kura.data 0.0.0.; No solution found because the pr
oblem is unsatisfiable.]
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:121)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: java.lang.RuntimeException: No solution found because the problem is
unsatisfiable.: [Unable to satisfy dependency from org.eclipse.iot.greenhouse.pu
blisher 0.1.0.SNAPSHOT to package org.eclipse.kura 0.0.0.; Unable to satisfy dep
endency from org.eclipse.iot.greenhouse.publisher 0.1.0.SNAPSHOT to package org.
eclipse.kura.configuration 0.0.0.; Unable to satisfy dependency from org.eclipse
.iot.greenhouse.publisher 0.1.0.SNAPSHOT to package org.eclipse.kura.data 0.0.0.
; No solution found because the problem is unsatisfiable.]
at org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.newResolutio
nException(AbstractResolutionStrategy.java:98)
at org.eclipse.tycho.p2.resolver.ProjectorResolutionStrategy.resolve(Pro
jectorResolutionStrategy.java:88)
at org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.resolve(Abst
ractResolutionStrategy.java:63)
at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies
(P2ResolverImpl.java:157)
at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies
(P2ResolverImpl.java:107)
at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.doResolveDepen
dencies(P2TargetPlatformResolver.java:348)
at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.resolveDepende
ncies(P2TargetPlatformResolver.java:321)
at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolv
eProject(DefaultTychoDependencyResolver.java:109)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProj
ectsRead(TychoMavenLifecycleParticipant.java:75)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:266)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
... 11 more
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorE
xception
Re: Maven build failing for green house project checked out from GIthub [message #1701909 is a reply to message #1701829] Thu, 16 July 2015 15:19 Go to previous messageGo to next message
Benjamin Cabé is currently offline Benjamin CabéFriend
Messages: 201
Registered: July 2009
Location: Toulouse, France
Senior Member

Did you try and compile/build Kura first? You need to have all the Kura bundles in your local Maven repo so as the greenhouse demo can be built against them.
See https://wiki.eclipse.org/Kura/Getting_Started#Building


Re: Maven build failing for green house project checked out from GIthub [message #1701919 is a reply to message #1701909] Thu, 16 July 2015 16:40 Go to previous messageGo to next message
Krishna Murthy Mirajkar is currently offline Krishna Murthy MirajkarFriend
Messages: 38
Registered: July 2009
Member
Hi Benjamin,

I followed the steps as mentioned in the link.
I could successfully execute-

cd ~/git/kura/target-platform
mvn clean install

But, when I ran
cd ../kura
#Build with CAN support
mvn -Dmaven.test.skip=true -f manifest_pom.xml -Pcan clean install

I am getting exception as attached in the log files attached.
It is surprizing that it complains -

C:\Users\al1398\git\kura\kura\org.eclipse.kura.core.test: Could not find a META-INF/MANIFEST.MF, plugin.xml or a fragment.xml in C:\Users\al1398\git\kura\kura\org.eclipse.kura.core.test.

I can find it physically present that is both org.eclipse.kura.core.test bundle exists. I can find META-INF/MANIFEST.MF in it too.

Here I am attaching the log files
1. Detailed log when ran with -X
2. Without -X

PS : I am running it on windows 7 Professional 64bit machine.
  • Attachment: log detailed.txt
    (Size: 86.57KB, Downloaded 299 times)
  • Attachment: log.txt
    (Size: 3.90KB, Downloaded 231 times)

[Updated on: Sat, 18 July 2015 12:30]

Report message to a moderator

Re: Maven build failing for green house project checked out from GIthub [message #1701931 is a reply to message #1701919] Thu, 16 July 2015 19:35 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

Are there any changes in your workspace? Try running 'git status' to see if there are changes you may not expect. If that is clean, try cloning Kura in a new directory and performing a build from there.

Thanks,
--Dave
icon9.gif  Re: Maven build failing for green house project checked out from Github [message #1702048 is a reply to message #1701931] Fri, 17 July 2015 20:50 Go to previous messageGo to next message
Krishna Murthy Mirajkar is currently offline Krishna Murthy MirajkarFriend
Messages: 38
Registered: July 2009
Member
Hi Dave/Benjamin,

I am having a hard time to get the code green house right and make eclipse recognize them as proper projects (src not recognized etc)

So, now here is what I did after giving up on windows-
1. Created Ubuntu 15 on my laptop using Oracle VM box.
2. With jdk 8 and maven latest set up on it.
3. I pulled kura code and green house demo code.
4. Followed the kura wiki page to get the kura built. Got it successfully built.
5. And did the other builds as suggested in the wiki. They also went successful.
6. Now, coming back the build green house code I ran this mvn clean install and got this build log as attached.

The second problem is when I import either kura code or green house demo code as existing maven project prior to or after the steps build steps carried out, they simply don't appear as expected. They are useless in eclipse as they show up as normal m2 projects without recognizing the src or build path. Worse, I can't even set the build path as that option appears disabled. I have tried using both luna and mars 64 bit with 64 bit JDK1.8. It simply does not work. Associating the project with facet(Java facet), starts making them get recognized as Java stuff. But, I don't think that is the right thing to do as I feel it to be an unnecessary tweak to the pulled code. But, say, if that tweak is done, they have tons of errors reported in the Problems! I have set the target that comes along with kura as suggested in the wiki. Outside on the mvn command it was all built successfully. Here in eclipse things are not at all rosy.

These mvn commands are not generating .project and .classpath files for all the projects. Most of them are left with pom.xml as is. Not sure why??
mvn -f manifest_pom.xml eclipse:clean && mvn -f manifest_pom.xml eclipse:eclipse
mvn -f pom_pom.xml eclipse:clean && mvn -f pom_pom.xml eclipse:eclipse

Now I am really frustrated with it. I have followed the steps and have done it *so many times* that I am on the brink of giving up hope on taking this forward. Have had enough sleepless nights getting it right.

Please help.

regards,
Krishna

index.php/fa/22564/0/
  • Attachment: build.log
    (Size: 40.13KB, Downloaded 212 times)
  • Attachment: build-details.log
    (Size: 246.23KB, Downloaded 231 times)
  • Attachment: image.png
    (Size: 58.14KB, Downloaded 2152 times)

[Updated on: Sat, 18 July 2015 12:31]

Report message to a moderator

Re: Maven build failing for green house project checked out from Github [message #1702394 is a reply to message #1702048] Wed, 22 July 2015 05:29 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

I am sorry you are having trouble. I think you may be closer than you think. Regarding the greenhouse build, the error is indicating that the project org.eclipse.iot.greenhouse.sensors doesn't have a directory named OSGI-INF. Can you please verify that it does exist:

ls -l /home/adminuser/git/kura-greenhouse-demo/org.eclipse.iot.greenhouse.sensors/


For the Kura workspace errors, there does seem to be a bug in the build. For some reason, the maven-eclipse-plugin has skip set to true. So it is actually never running. Please find line 235 in the kura/manifest_pom.xml and remove it or change it to false. I will try to determine why this is set to true and change it if necessary. After this change, I setup a clean workspace on a clean install of Ubuntu 15.04 and it worked as expected.

Thanks,
--Dave
Re: Maven build failing for green house project checked out from Github [message #1702468 is a reply to message #1702394] Wed, 22 July 2015 14:12 Go to previous messageGo to next message
Benjamin Cabé is currently offline Benjamin CabéFriend
Messages: 201
Registered: July 2009
Location: Toulouse, France
Senior Member

Hey

My apologies, it looks like the Kura Greenhouse project didn't compile anymore, probably due to some changes in Tycho now being more strict when checking the build.properties file. The OSGI-INF folder does *not* exist so it shouldn't have been listed in the build.properties in the first place.

If you pull the latest changes from the git repo, you should be good to go.
Sorry again.


Re: Maven build failing for green house project checked out from Github [message #1778837 is a reply to message #1702468] Fri, 22 December 2017 11:21 Go to previous message
LI Yi is currently offline LI YiFriend
Messages: 37
Registered: June 2017
Member
Dear Benjamin Cabé:
I have some problem in building greenhouse project with maven. I googled the question and i find your problems here: https://www.eclipse.org/forums/index.php/t/1068490/

I am not familary with marven. So, even if i download the greenhouse source code , I still dont know how to compile and deploy it on Kura. I have tried many methods, and I still got the problem as follows . Would you show the main step to build the source code with Marven. Thank you very much!
Adding repository file://home/liyi/OpenIoT/Kura/kura-greenhouse-demo-master/org.eclipse.iot.greenhouse.sensors.raspberrypi/../kura/kura/target-definition/equinox_3.8.1/repository
[ERROR] Internal error: java.lang.RuntimeException: Failed to load p2 repository with ID 'p2-repo-equinox_3.8.1' from location file:////home/liyi/OpenIoT/Kura/kura-greenhouse-demo-master/org.eclipse.iot.greenhouse.sensors.raspberrypi/../kura/kura/target-definition/equinox_3.8.1/repository/: URI has an authority component -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Failed to load p2 repository with ID 'p2-repo-equinox_3.8.1' from location file:////home/liyi/OpenIoT/Kura/kura-greenhouse-demo-master/org.eclipse.iot.greenhouse.sensors.raspberrypi/../kura/kura/target-definition/equinox_3.8.1/repository/
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:121)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Best Regards
LiYi
Previous Topic:build and deploy Kura using docker
Next Topic:How to build greenhouse source code with Marven?
Goto Forum:
  


Current Time: Wed Apr 24 20:14:04 GMT 2024

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

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

Back to the top