grails-ide icon indicating copy to clipboard operation
grails-ide copied to clipboard

Exception in building the grails-ide

Open CaptainOfFlyingDutchman opened this issue 9 years ago • 20 comments

I executed build.sh from terminal, and I'm using GGTS and/or Eclipse IDE for Committers (Plugin Development Environment)

Equivalent Grails slack channel chat can be found here: https://grails.slack.com/archives/questions/p1455619247000154

Here is the exception:

[INFO] Resolving dependencies of MavenProject: org.grails.ide.eclipse:org.grails.ide.eclipse.site:3.6.4-SNAPSHOT @ /home/manvendrask/eclipse/grails-ide/org.grails.ide.eclipse.site/pom.xml [INFO] Cannot complete the request. Generating details. [INFO] Cannot complete the request. Generating details. [INFO] {osgi.os=macosx, osgi.ws=cocoa, org.eclipse.update.install.features=true, osgi.arch=x86} [ERROR] Cannot resolve project dependencies: [ERROR] Software being installed: org.grails.ide.eclipse.site raw:3.6.4.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):3.6.4-SNAPSHOT [ERROR] Missing requirement: org.grails.ide.eclipse.site raw:3.6.4.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):3.6.4-SNAPSHOT requires 'org.springsource.ide.eclipse.commons.feature.group [3.6.4,3.6.5)' but it could not be found [ERROR] [ERROR] Internal error: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from org.eclipse.jdt.core 3.7.0.v_OTDT_r200_201106070730 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.jdt.core 3.7.1.v_OTDT_r201_201109101025 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.jdt.core 3.7.3.v_OTDT_r202_201202051448 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.grails.ide.eclipse.site raw:3.6.4.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):3.6.4-SNAPSHOT to org.springsource.ide.eclipse.commons.feature.group [3.6.4,3.6.5).; No solution found because the problem is unsatisfiable.] -> [Help 1] org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from org.eclipse.jdt.core 3.7.0.v_OTDT_r200_201106070730 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.jdt.core 3.7.1.v_OTDT_r201_201109101025 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.jdt.core 3.7.3.v_OTDT_r202_201202051448 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.grails.ide.eclipse.site raw:3.6.4.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):3.6.4-SNAPSHOT to org.springsource.ide.eclipse.commons.feature.group [3.6.4,3.6.5).; No solution found because the problem is unsatisfiable.] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:167) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216) at org.apache.maven.cli.MavenCli.main(MavenCli.java:160) 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:483) 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) Caused by: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from org.eclipse.jdt.core 3.7.0.v_OTDT_r200_201106070730 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.jdt.core 3.7.1.v_OTDT_r201_201109101025 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.jdt.core 3.7.3.v_OTDT_r202_201202051448 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.grails.ide.eclipse.site raw:3.6.4.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):3.6.4-SNAPSHOT to org.springsource.ide.eclipse.commons.feature.group [3.6.4,3.6.5).; No solution found because the problem is unsatisfiable.] at org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.newResolutionException(AbstractResolutionStrategy.java:98) at org.eclipse.tycho.p2.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:88) at org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.resolve(AbstractResolutionStrategy.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.doResolveDependencies(P2TargetPlatformResolver.java:348) at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.resolveDependencies(P2TargetPlatformResolver.java:321) at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:109) at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:75) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:318) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) ... 11 more [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

CaptainOfFlyingDutchman avatar Feb 16 '16 10:02 CaptainOfFlyingDutchman

@aclement @kdvolder Could you help out getting @ManvendraSK setup to work on the plugin? He is interested in taking over development so some initial assistance would be much appreciated

graemerocher avatar Feb 16 '16 10:02 graemerocher

Sure. Sorry for not replying sooner. Great that someone is interested to take this up. I have to refresh my own memory a bit. Which is why I didn't respond right-away.

First off. That 'build.sh' script is deceptive. We don't really run builds from that, so ignore it.

The best information is probably here on the gihtub readme page:

https://github.com/spring-projects/grails-ide

The instructions are probably also a little out of date but the 'processes' are more or less right. Just here and there will be references to things that are 'old' and no longer work. Such as for example the -Pe37 which selects a maven profile to use Eclipse 3.7 as target platform.

I see there's still a e37 profile in the pom but it may no longer work as I think in the end we were no longer doing e37 builds but had moved on to only eclipse 4.x builds.

I just tried running the e44 build which failed because it uses a no-longer existing milestone update site (e44 was since released).

The e43 is the most 'stable' one in the master branch.

The e44 build probably can be fixed relatively easily by replacing some milestone update site urls with release update sites.

Creating an e45 build shouldn't be too hard by following the pattern set out by the e44, e43 and e37 builds.

The best command to run to do a 'quick' local build is:

mvn -Pe43 -Dmaven.test.skip=true clean install

I just ran it locally and it did not quite complete because it couldn't find a dependency on STS commons 3.6.3.

I think the problem is that the grails-ide is still pointing to nighlty update site for our eclipse-integration-commons bundles. But these have since moved on to newer version numbers of STS and the grails-ide-build has not. So the nightly site no longer has the version that grails-ide build wants.

Trying to fix it now. I'll let you know later if I figure it out.

Kris

On Tue, Feb 16, 2016 at 2:57 AM, graemerocher [email protected] wrote:

@aclement https://github.com/aclement @kdvolder https://github.com/kdvolder Could you help out getting @ManvendraSK https://github.com/ManvendraSK setup to work on the plugin? He is interested in taking over development so some initial assistance would be much appreciated

— Reply to this email directly or view it on GitHub https://github.com/spring-projects/grails-ide/issues/8#issuecomment-184627980 .

kdvolder avatar Feb 19 '16 23:02 kdvolder

Alright.. so I managed to 'revive' the e43 profile. Here: https://github.com/spring-projects/grails-ide/compare/fix-build?expand=1

Running command

mvn -Pe43 clean install -Dmaven.test.skip=true

Produced an update site under:

org.grails.ide.eclipse.site/target/repository

This one should be installable into Eclipse 4.3.

kdvolder avatar Feb 19 '16 23:02 kdvolder

Thanks @kdvolder, It worked but it took some time to get build. I executed the same command for the profile e43, i.e., mvn -Pe43 clean install -Dmaven.test.skip=true. I have a couple of questions, though.

  • How can I be sure of finding the proper repositories like we have used in the following snippet.
    <repository>
        <id>eclipse-integration-commons</id>
        <layout>p2</layout>
        <url>http://dist.springsource.com/release/TOOLS/eclipse-integration-commons/3.6.4.RELEASE/e3.7/</url>
    </repository>

I am absolutely not sure about this stuff.

  • After building I've found the builds in org.grails.ide.eclipse.site folder. But I'm facing some issue getting it work inside pure Eclipse Standard Kepler installation by creating a local site to the folder org.grails.ide.eclipse.site/target/repository/. I'm getting the following exception:

eclipse_kepler

  • Would I need to follow the same steps to build the plugin for another profile like Eclipse Mars 4.5 ?

CaptainOfFlyingDutchman avatar Feb 25 '16 09:02 CaptainOfFlyingDutchman

Could you also please point out what am I doing wrong in importing this maven project inside Eclipse PDE? I'm getting the following error in several projects which say Plugin execution is not covered by lifecycle configuration:

eclipse_import

Would these errors affect the development process?

CaptainOfFlyingDutchman avatar Feb 25 '16 09:02 CaptainOfFlyingDutchman

The project's are NOT meant to be configured by m2e. All the eclipse metadata is included in the repo. So you don't import them as 'existing maven project' but simply as 'existing Eclipse project'.

Try to follow the instructions on the github readme page for setting up development env and tell me where/if you get stuck. I'll try to help you through the rough bumps.

Kris

On Thu, Feb 25, 2016 at 1:37 AM, Manvendra Singh [email protected] wrote:

Could you also please point out what am I doing wrong in importing this maven project inside Eclipse PDE? I'm getting the following error in several projects which say Plugin execution is not covered by lifecycle configuration:

[image: eclipse_import] https://cloud.githubusercontent.com/assets/3501410/13315543/49a2caa0-dbd1-11e5-991c-167691764213.jpg

Would these errors affect the development process?

— Reply to this email directly or view it on GitHub https://github.com/spring-projects/grails-ide/issues/8#issuecomment-188693162 .

kdvolder avatar Feb 25 '16 16:02 kdvolder

Thanks @kdvolder, I'm able to import them as existing java project inside eclipse workspace. I've imported grails-ide, eclipse-commons-integration, groovy-eclipse. However there are minor issues.

I.e., One of the projects uses org.apache.commons.collections but it can''t find it, as shown in screen shot below:

eclipse_dependency

See, the properties box is empty.

Could you please tell me why I'm not able to install the plugin to my fresh Eclipse Kepler installation? Please look this comment. https://github.com/spring-projects/grails-ide/issues/8#issuecomment-188679887

CaptainOfFlyingDutchman avatar Feb 26 '16 09:02 CaptainOfFlyingDutchman

Yes, hunting down the dependencies is a PITA. Some dependencies that you need may not be available in a 'plain' Eclipse. You'll get more of what you need starting from Eclipse for JEE developers.

You can also find stuff like 'appache.commons.*' and install it separately from "Eclipse Orbit": http://download.eclipse.org/tools/orbit/downloads/

Notice there are different orbit update sites for different versions of Eclipse. So for Keppler you can use this update site: http://download.eclipse.org/tools/orbit/downloads/drops/R20140114142710/repository/

There's a list of the 'stuff' in that update site here: http://download.eclipse.org/tools/orbit/downloads/drops/R20140114142710/

For the tests there may be additional dependencies that you need that can't be found there. Let me know if you have trouble finding them. I can probably tell you where to find it you tell me what you are looking for :-)

kdvolder avatar Feb 26 '16 16:02 kdvolder

See, the properties box is empty.

That's okay, it just means that the manifest is not specific about the version of that bundle that it wants, which means P2 will satisfy that with any version of the bundle it can find.

The 'red error marker' is what you should care about and it means the dependency is not found in the current target platform. Fix that by installing it (preferably from the orbits site corresponding to your version of Eclipse, as explained above).

kdvolder avatar Feb 26 '16 16:02 kdvolder

Thanks, @kdvolder. I really didn't know about this orbit stuff, as I'm working on Eclipse first time. I've now started understanding this Eclipse thing. I'll follow you up on this again. I'm using this repository http://download.eclipse.org/tools/orbit/downloads/drops/R20151118145958/repository/, as I'm working on Mars.1 Release (4.5.1) of Eclipse IDE for Eclipse Committers. :-)

Edit: Could you please also tell me how can I install dependency of org.springframework.core [3.0.5.RELEASE,4.2.0) as required by org.grails.ide.eclipse.core. I'm not able to find it even on the orbit update site.

CaptainOfFlyingDutchman avatar Feb 29 '16 06:02 CaptainOfFlyingDutchman

@kdvolder, could you please also tell me how can I install this new plugin to fresh new install of Kepler? More detailed question and screenshots can be found here at https://github.com/spring-projects/grails-ide/issues/8#issuecomment-188679887.

CaptainOfFlyingDutchman avatar Feb 29 '16 09:02 CaptainOfFlyingDutchman

Just needs a suggestion:

I'm new to this platform and after hunting many tutorials I understand now what are Extensions and Dependencies. But still there are many things those I don't know about, like, in the project org.grails.ide.eclipse.core we are using org.eclipse.jdt.core as a dependency and providing an extension to org.eclipse.jdt.core.classpathContainerInitializer; after going through the Eclipse docs I found what this extension point does, but all in all I don't know about this jdt thing, and how this custom GrailsClasspathContainerInitializer class works.

I'm currently following this book https://www.packtpub.com/application-development/eclipse-4-plug-development-example-beginners-guide. Am I going into right direction?

PS: Could you please tell me where can I contact you directly? I searched you on Slack but couldn't find you there. Skype, Hangouts, Slack anything would work. :-)

CaptainOfFlyingDutchman avatar Feb 29 '16 10:02 CaptainOfFlyingDutchman

The "org.springframework.core" is an OSGI-wrapped version of spring framework. OSGI wrapped versions are produced by STS team for use in STS (and GGTS). I think they are available from the "eclipse-integration-commons" update site. So try to use the update site I changed in the pom to fix the build for you.

Re the "comment 8" question abaout installing into Keppler. I'm not sure. But try not to explicitly install the commons bundle. You are likely trying to install more than you actually need to satisfy the GGTS dependencies and some of that extra-stuff requires even more things from an old version of STS that it can't find.

So just select the 'GGTS' entry by itself and try to install that. The Eclipse installer will figure out what it needs to satisfy its dependencies and hopefully it will find what it needs. If not tell me the error and I'll try to interpret it.

kdvolder avatar Feb 29 '16 16:02 kdvolder

"JDT" is "Java Development Tools" this is Eclipse's support for working with Java. I.e. the eclipse bits that allow you to compile, edit, run and debug Java code inside of Eclipse.

The "classpath container" is what you see in your workspace as "Grails Dependencies". The extension point allows a plugin to contribute something to Eclipse to dynamically provide the contents for the "Grails Dependencies" element so that Eclipse can compile the code in a grails project.

GrailsClasspathContainerInitializer has some hooks into Grails to obtain a list of the resolved dependencies and make them available in the grails classpath container.

kdvolder avatar Feb 29 '16 16:02 kdvolder

Thanks for the explanation Kris. I'm able to resolve the dependency using the update site which you mentioned. But it's not of right version, project requires [3.0.5.RELEASE, 4.2.0), but the update site installed it of 4.1.4.20150106-RELEASE, thus MANIFEST.MF is still complaining, but it's okay, I guess, as source code is not complaining.

Could you please also tell me how can I be sure of an update site exist for Eclipse Mars (that would be needing to build for e45).

I tried to install only the Grails IDE but was not able to do it. Please look below the screenshots of what I'm using for update site URL and the relevant error.

onlygrailsplugin1

onlygrailsplugin

Could you please point me out the right direction? :-)

CaptainOfFlyingDutchman avatar Mar 01 '16 08:03 CaptainOfFlyingDutchman

Would the book I mentioned https://www.packtpub.com/application-development/eclipse-4-plug-development-example-beginners-guide help me learning the things? Any suggestions are welcome. :-)

CaptainOfFlyingDutchman avatar Mar 01 '16 08:03 CaptainOfFlyingDutchman

Missing requirement 'org.codehaus.groovy.eclipse.feature.feature.group 2.0.0'. This means Grails IDE depends on groovy eclipse. See here for a list of update sites: https://github.com/groovy/groovy-eclipse/wiki

Try adding the 'Keppler' update site:

http://dist.springsource.org/snapshot/GRECLIPSE/e4.3/

To your list of available update sites via "Window >> Preferences >> Install/Update >> Available Software Sites".

Now try the install again.

About the book. I don't know. I do not know the book. It probably wouldn't hurt to read it if you have the time. Personally I get by using Eclipse online documentation, tutorials written by folks like Lars Vogela (highly recommend those in particular), Eclipse's own API java docs and extension point documentation. Google is your friend in looking for info on specific topics and a lot of it is out there about Eclipse. If all else fails, the Java debugger is my last resort to try and understand what is going on 'under the hood'.

You can also sometimes turn to "online forums" with questions. For example: http://www.eclipse.org/forums/ or stack overflow. There are some knowledgeable people around willing to help out if you ask questions in the right way.

kdvolder avatar Mar 01 '16 16:03 kdvolder

Could you please also tell me how can I be sure of an update site exist for Eclipse Mars (that would be needing to build for e45).

Yes, we still maintain eclipse commons since STS depends on it. It may not be the exact same version of the bundles that old grails-ide codebase depends on, but it doesn't change rapidly so I don't expect much problems if you want to use a more recent version.

Your bigger problem is more likely groovy-eclipse which is no longer officially maintained although there is an unofficial snapshot build currently available for Mars.

http://dist.springsource.org/snapshot/GRECLIPSE/e4.5/

It has not been updated for SR2 and so it effectively downgrades JDT if you install it.

kdvolder avatar Mar 01 '16 16:03 kdvolder

To be more precise about the commons update site. For mars you can use the e44 site. There's no difference between what is built for mars and luna.

See this page for list of update sites: https://github.com/spring-projects/eclipse-integration-commons

kdvolder avatar Mar 01 '16 16:03 kdvolder

We could create an Oomph setup script to bootstrap development. Is anyone actually interested in development/maintenance? Mars, Neon, Oxygen, and Photon JDT patches / Groovy tools are all available.

eric-milles avatar Nov 01 '17 23:11 eric-milles