Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Equinox nightly in testing framework

Note: I used the following buildfile:

<project name="get-equinox" default="get-eclipse">
        <target name="get-equinox">
                <p2.mirror source="http://download.eclipse.org/eclipse/updates/3.6-N-builds" destination="file:/tmp/equinx-latest">
                        <iu id="org.eclipse.osgi" />
                </p2.mirror>
        </target>
</project>

On Wed, Jan 20, 2010 at 14:21, Walter Treur <wtreur@xxxxxxxxx> wrote:
Hello all,

I succesfully used the p2.mirror ant task from console with the following command:

$ java -jar org.eclipse.equinox.launcher.jar -console -consoleLog -application org.eclipse.ant.core.antRunner -buildfile build.xml get-equinox

Since I want to execute this task from another ant task running on our build-server I have to embed Eclipse in my project. I figured I should be able to strip it down so it won't has more jars than absolutely necessary to run antRunner. The normal Eclipse installation is around 100mb-200mb and to large to put in my project trunk.
With some digging through the manifest files of the jars in the plugin/ dir I successfully came down with the following list of osgi bundles to run inside Equinox.

org.eclipse.equinox.common.jar
org.eclipse.core.jobs.jar
org.eclipse.equinox.registry.jar
org.eclipse.equinox.preferences.jar
org.eclipse.core.contenttype.jar
org.eclipse.equinox.app.jar
org.eclipse.core.runtime.jar
org.eclipse.core.variables.jar
org.eclipse.osgi.services.jar
org.eclipse.ecf.identity.jar
org.eclipse.ecf.jar
org.eclipse.ecf.filetransfer.jar
org.eclipse.equinox.p2.core.jar
org.eclipse.equinox.p2.jarprocessor.jar
org.eclipse.equinox.p2.metadata.jar
org.eclipse.equinox.security.jar
org.eclipse.equinox.p2.repository.jar
org.eclipse.equinox.p2.artifact.repository.jar
org.sat4j.core.jar
org.sat4j.pb.jar
org.eclipse.equinox.simpleconfigurator.jar
org.eclipse.equinox.p2.metadata.repository.jar
org.eclipse.equinox.p2.engine.jar
org.eclipse.equinox.p2.director.jar
org.eclipse.equinox.p2.garbagecollector.jar
org.eclipse.equinox.p2.exemplarysetup.jar
org.eclipse.equinox.p2.repository.tools.jar
org.apache.ant.jar
org.eclipse.ant.core.jar

With these bundles I was able to run the antRunner task from the commandline, but I retrieved the the error:

org.eclipse.equinox.internal.provisional.p2.core.ProvisionException: No repository found at http://download.eclipse.org/eclipse/updates/3.6-N-builds.

I guess it has something to do with a wrong/missing OSGi service, because accessing this repository worked with the full Eclipse installation and with the stripped setup all the bundles are successfully resolved according to Equinox.

Does anyone know what the specific dependencies are to run a standalone antRunner without a full Eclipse installation?

I used the following configration to launch equinox:
--------------------------------------------------------------------------------------------------------------------------------------
osgi.framework=file\:org.eclipse.osgi.jar

osgi.bundles=reference\:file\:org.eclipse.equinox.common.jar@4,reference\:file\:org.eclipse.core.jobs.jar@4,reference\:file\:org.eclipse.equinox.registry.jar@4,reference\:file\:org.eclipse.equinox.preferences.jar@4,reference\:file\:org.eclipse.core.contenttype.jar@4,reference\:file\:org.eclipse.equinox.app.jar@4,reference\:file\:org.eclipse.core.runtime.jar@4\:start,reference\:file\:org.eclipse.core.variables.jar@4,reference\:file\:org.eclipse.osgi.services.jar@4,reference\:file\:org.eclipse.ecf.identity.jar@4,reference\:file\:org.eclipse.ecf.jar@4,reference\:file\:org.eclipse.ecf.filetransfer.jar@4,reference\:file\:org.eclipse.equinox.p2.core.jar@4,reference\:file\:org.eclipse.equinox.p2.jarprocessor.jar@4,reference\:file\:org.eclipse.equinox.p2.metadata.jar@4,reference\:file\:org.eclipse.equinox.security.jar@4,reference\:file\:org.eclipse.equinox.p2.repository.jar@4,reference\:file\:org.eclipse.equinox.p2.artifact.repository.jar@4,reference\:file\:org.sat4j.core.jar@4,reference\:file\:org.sat4j.pb.jar@4,reference\:file\:org.eclipse.equinox.simpleconfigurator.jar@4,reference\:file\:org.eclipse.equinox.p2.metadata.repository.jar@4,reference\:file\:org.eclipse.equinox.p2.engine.jar@4,reference\:file\:org.eclipse.equinox.p2.director.jar@4,reference\:file\:org.eclipse.equinox.p2.garbagecollector.jar@4,reference\:file\:org.eclipse.equinox.p2.exemplarysetup.jar@4,reference\:file\:org.eclipse.equinox.p2.repository.tools.jar,reference\:file\:org.apache.ant.jar@4,reference\:file\:org.eclipse.ant.core.jar@4

osgi.bundles.defaultStartLevel=4

osgi.noShutdown=true

eclipse.buildId=M20090917-0800
eclipse.p2.data.area=@config.dir/../p2/
eclipse.p2.profile="">--------------------------------------------------------------------------------------------------------------------------------------


The complete stacktrace of the ProvisionException is:
--------------------------------------------------------------------------------------------------------------------------------------
BUILD FAILED
org.eclipse.equinox.internal.provisional.p2.core.ProvisionException: No repository found at http://download.eclipse.org/eclipse/updates/3.6-N-builds.
    at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.fail(AbstractRepositoryManager.java:380)
    at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:641)
    at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.loadRepository(ArtifactRepositoryManager.java:93)
    at org.eclipse.equinox.p2.internal.repository.tools.AbstractApplication.addRepository(AbstractApplication.java:96)
    at org.eclipse.equinox.p2.internal.repository.tools.AbstractApplication.initializeRepos(AbstractApplication.java:67)
    at org.eclipse.equinox.p2.internal.repository.tools.tasks.MirrorTask.execute(MirrorTask.java:53)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:622)
    at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:494)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.ant.core.AntRunner.run(AntRunner.java:513)
    at org.eclipse.ant.core.AntRunner.start(AntRunner.java:600)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
--------------------------------------------------------------------------------------------------------------------------------------

Regards,
Walter







On Wed, Dec 16, 2009 at 17:43, Andrew Niefer <aniefer@xxxxxxxxxx> wrote:

When running under Eclipse with the org.eclipse.ant.core.antRunner application, there are two possibilities here.

The first is to use p2.  There is a p2 repository "http://download.eclipse.org/eclipse/updates/3.6-N-builds" which contains the results of the nightly builds.
You can get the osgi bundle from there using a p2 mirror task. (http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_repositorytasks.htm).
This would look something like :
        <p2.mirror source="http://download.eclipse.org/eclipse/updates/3.6-N-builds" destination="file:${basedir}/osgi">
                <iu id="org.eclipse.osgi" />
        </p2.mirror>

- This will create a p2 repository at ${basedir}/osgi, and the osgi jar will be at ${basedir}/osgi/plugins/org.eclipse.osgi_<version>.jar.  The version here will still contain a timestamp like N20091215-2000
- In general, this also gets all the dependencies of the listed installable units, org.eclipse.osgi doesn't have any.
- 3.6-N-builds is actually a composite of several builds, this will just get the highest version of osgi.


The other option, is to get the source from CVS, the build.xml script can be generated using pde.build.  This can get complicated in general, but for osgi it isn't too bad (because there are no dependencies):
                <eclipse.buildScript
                                elements="plugin@xxxxxxxxxxxxxxxx"
                                buildDirectory="${basedir}"
                                pluginPath="${basedir}/../org.eclipse.osgi"
                                forceContextQualifier="N123"
                        />
- forceContextQualifier will be the built version qualifier
- pluginPath will be the location of the osgi bundle on disk
- buildDirectory just needs to be set, it isn't really used here, but in general other scripts will be generated there
- the osgi build.xml will require a property "CDC-1.1/Foundation-1.1" specifying the bootclasspath for foundation.


Both of these options need to run under Eclipse because of the dependencies on p2 and/or pde.build.  If you are running the script using an external tools configuration, be sure to select "Run in the same JRE as the workspace" on the JRE tab.


-Andrew

From: Walter Treur <wtreur@xxxxxxxxx>
To: equinox-dev@xxxxxxxxxxx
Date: 12/15/2009 05:44 AM
Subject: [equinox-dev] Equinox nightly in testing framework
Sent by: equinox-dev-bounces@xxxxxxxxxxx





Hello all,

I'm working on a OSGi testing framework, testing the OSGi
specification conformance for the most popular OSGi core framework
implementations. (equinox, knopferfish, felix)
Public testresults are already available for the most recent popular
core frameworks at
http://opensource.luminis.net/svn/OSGITESTRESULTS/trunk/index.html.

At this moment, I have an own nightly build script to test the latest
(nightly) framework builds from the svn/cvs trunk. It uses ant to
download, build and test the latest trunk version for knopflerfish and
felix and post these results online. However, I'm unable to require or
build the latest nightly equinox version.

The url's to the latest snapshot on the equinox download page contains
a version number and time and it isn't therefore possible to point to
in my ant script since it varies every time. A form post about this
issue wasn't helpful either:
http://www.eclipse.org/forums/index.php?t=msg&goto=501643&S=1c814a9fba21ff6dcb1d7e7e1890a7f8#msg_501643


I decided to try to build the latest equinox version from the trunk
and this is were I ran into a problem. I did a checkout of the module
"org.eclipse.equinox/framework/bundles/org.eclipse.osgi" from
"dev.eclipse.org" Inside eclipse I could create an ant buildfile with
PDE Tools -> Create Ant Build File from the contextmenu on the
build.properties file. Running the generated ant script worked fine
and the build was successful.

My question is: Is it possible to generate this ant-build file from a
console or at least without the eclipse UI so I can include it in the
framework's ant script. Of course, if you have another option to
automatically retrieve or build the latest equinox nightly I would be
very pleased to hear.

Regards,
Walter Treur
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev



_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev




Back to the top