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

p2 director and Customizing Metadata #19

Closed
dmei77 opened this issue Nov 28, 2016 · 4 comments
Closed

p2 director and Customizing Metadata #19

dmei77 opened this issue Nov 28, 2016 · 4 comments
Labels

Comments

@dmei77
Copy link

dmei77 commented Nov 28, 2016

I tried to install a feature that uses the p2 Metainformation Mechanism (see http://wiki.eclipse.org/Equinox/p2/Customizing_Metadata). It seems that, the stripped down p2 bootstrap director can not this. The case can be easily checked using this project: https://github.com/Villane/org.zeroturnaround.example.p2. The following error message appears:

!ENTRY org.eclipse.equinox.p2.engine 4 4 2016-11-28 17:03:17.161
!MESSAGE An error occurred while installing the items
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2016-11-28 17:03:17.161
!MESSAGE session context was:(profile=OomphIde, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]org.zeroturnaround.example.p2.main 1.0.0.201611281558, action=org.eclipse.equinox.internal.p2.engine.MissingAction).
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2016-11-28 17:03:17.161
!MESSAGE No action found for: org.zeroturnaround.example.p2.spells.onInstall.
!STACK 0
java.lang.IllegalArgumentException: No action found for: org.zeroturnaround.example.p2.spells.onInstall.

Any idea?

@nedtwigg
Copy link
Member

Can you link to the build.gradle that's causing the error?

Normally, the execution is handled by calling P2Model.runUsingBootstrapper(). But we can also use the bootstrapper to download a bigger install, e.g. the SDK, and use that SDK to run the provisioning operation. e.g. P2Model.runUsing(PdeInstallation.from(EclipseRelease.latestOfficial()).

If the bootstraper is just missing a 500kb jar, then of course it would be better to add that jar to the bootstrapper, but first we'd need to know what is missin.

With a build.gradle to test against, I think we can fix this.

@nedtwigg nedtwigg added the bug label Nov 28, 2016
@dmei77
Copy link
Author

dmei77 commented Nov 28, 2016

Here is a simple test procedure

dominic@horus:~/mkdir test
dominic@horus:~/cd test
dominic@horus:~/test/git clone https://github.com/Villane/org.zeroturnaround.example.p2.git
dominic@horus:~/test/cd org.zeroturnaround.example.p2/
dominic@horus:~/test/org.zeroturnaround.example.p2/mvn package
dominic@horus:~/test/org.zeroturnaround.example.p2/cd ..
dominic@horus:~/test/vi build.gradle
dominic@horus:~/test$ cat build.gradle
buildscript {
	repositories {
		// make it easy to test a snapshot version of goomph
		maven {	url 'https://oss.sonatype.org/content/repositories/snapshots/' }
		// grab dependencies from the gradle plugin portal
		maven { url 'https://plugins.gradle.org/m2/' }
	}
	// make sure we don't cache stale snapshot versions
	configurations.all {
		resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
	}
	dependencies {
		// a bunch of eclipse stuff
		classpath "com.diffplug.gradle:goomph:3.0.6"
		// creates a targetplatform
		classpath "org.standardout:bnd-platform:1.4.0"
	}
}


apply plugin: 'com.diffplug.gradle.oomph.ide'

oomphIde {
    repoEclipse '4.5.2'
    // jdt {}
    eclipseIni {
        vmargs('-Xmx2g')    // IDE can have up to 2 gigs of RAM
    }
    style {
        classicTheme()  // oldschool cool
        niceText()      // with nice fonts and visible whitespace
    }

    repo 'file:///home/dominic/test/org.zeroturnaround.example.p2/org.zeroturnaround.example.p2.updatesite/target/site'
    feature 'org.zeroturnaround.example.p2.feature'
}
dominic@horus:~/test$ gradle --version

------------------------------------------------------------
Gradle 2.10
------------------------------------------------------------

Build time:   2016-01-26 15:17:49 UTC
Build number: none
Revision:     UNKNOWN

Groovy:       2.4.5
Ant:          Apache Ant(TM) version 1.9.6 compiled on July 8 2015
JVM:          1.8.0_101 (Oracle Corporation 25.101-b13)
OS:           Linux 4.4.0-47-generic amd64

@nedtwigg
Copy link
Member

I published a workaround to 3.6.0-SNAPSHOT. You can see it for your case here, and some of the reasoning behind it here.

I'd like to fix the underlying problem with the bootstrapper, but I don't have time to investigate. These are the jars in the bootstrapper. Do you know what's missing?

@nedtwigg
Copy link
Member

nedtwigg commented Dec 8, 2016

The workaround described above was shipped in 3.6.0. Feel free to reopen if you find anything new.

@nedtwigg nedtwigg closed this as completed Dec 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants