Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 409770

Summary: org.eclipse.orion.target.target should be updated to the latest repositories
Product: [ECD] Orion Reporter: Anthony Hunter <ahunter.eclipse>
Component: RelengAssignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: adrian.aichner, Szymon.Brandys
Version: 3.0Flags: Szymon.Brandys: review+
Target Milestone: 3.0 RC1   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Anthony Hunter CLA 2013-06-03 14:09:36 EDT
I have been able to take advantage of the target /orion.server/releng/org.eclipse.orion.target/org.eclipse.orion.target.target to successfully run, debug and test an Orion self host in Eclipse 4.3.

To be able to do this, I needed to make a few changes to the target.

Since these are minor changes I assume we can use this target for both development and build.

1) There were two egit repositories in the target, I replaced with the latest http://download.eclipse.org/egit/updates-2.1

2) I added a number of missing orbit source bundles

3) Corrected the version number to match the version in the latest repository. This update is done automatically by the target editor. When you open the target it will complain something like "cannot find org.eclipse.emf... version ...". You select this entry and click the update button and the target editor fixes the versions in the target file.
Comment 1 Anthony Hunter CLA 2013-06-03 14:13:54 EDT
The change is located at 

https://github.com/ahunter-orion/orion.server/commit/0914b5b2e98e088c3c21a0b13377f2a848c89ce0

I assert that I authored 100% of the content of this contribution and have the rights to donate the content to Eclipse under the EPL
Comment 2 Anthony Hunter CLA 2013-06-03 14:15:08 EDT
I am requesting Szymon review the change since he last updated the target.
Comment 3 Szymon Brandys CLA 2013-06-04 07:47:07 EDT
Merged to master.
Comment 4 Adrian Aichner CLA 2013-07-03 14:14:04 EDT
Looks like another change is in order:

--- a/releng/org.eclipse.orion.target/org.eclipse.orion.target.target
+++ b/releng/org.eclipse.orion.target/org.eclipse.orion.target.target
@@ -66,7 +66,7 @@
 <unit id="org.eclipse.ui.workbench.texteditor" version="0.0.0"/>
 <unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
 <unit id="org.eclipse.rcp.feature.group" version="0.0.0"/>
-<repository location="http://download.eclipse.org/eclipse/updates/4.3-I-builds"/>
+<repository location="http://download.eclipse.org/eclipse/updates/4.3"/>
 </location>
 <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="slicer" include
 <unit id="org.eclipse.jetty.bundles.f.feature.group" version="8.1.3.201302042259"/>

since
<repository location="http://download.eclipse.org/eclipse/updates/4.3-I-builds"/>
no longer exists and should be changed to
<repository location="http://download.eclipse.org/eclipse/updates/4.3"/>
in
org.eclipse.orion.server/releng/org.eclipse.orion.target/org.eclipse.orion.target.target

Even with that change, when I *Set as Target Platform*, I get following error, which I was able to eventually overcome, how is not exactly clear, by restarting eclipse, running *Set as Target Platform* again, etc...

eclipse.buildId=4.3.0.I20130605-2000
java.version=1.7.0_21
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.standard.product
Command-line arguments:  -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.standard.product

Error
Wed Jul 03 17:38:10 CEST 2013
Problem processing bundle manifest source header in plug-in %Bundle-Name version 0.5.6. found at /var/home/adrian/workspace-kepler-again/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool/plugins/javaewah.source_0.5.6.v201210150900.jar

java.lang.IllegalArgumentException: invalid version "0.5.6.": invalid format
	at org.osgi.framework.Version.<init>(Version.java:147)
	at org.eclipse.pde.internal.core.BundleManifestSourceLocationManager.setPlugins(BundleManifestSourceLocationManager.java:213)
	at org.eclipse.pde.internal.core.SourceLocationManager.initializeBundleManifestLocations(SourceLocationManager.java:390)
	at org.eclipse.pde.internal.core.SourceLocationManager.getBundleManifestLocator(SourceLocationManager.java:220)
	at org.eclipse.pde.internal.core.SourceLocationManager.getBundleManifestLocation(SourceLocationManager.java:212)
	at org.eclipse.pde.internal.core.SourceLocationManager.searchBundleManifestLocations(SourceLocationManager.java:297)
	at org.eclipse.pde.internal.core.SourceLocationManager.findSourcePath(SourceLocationManager.java:57)
	at org.eclipse.pde.internal.core.ClasspathUtilCore.getSourceAnnotation(ClasspathUtilCore.java:154)
	at org.eclipse.pde.internal.core.PDEClasspathContainer.addExternalPlugin(PDEClasspathContainer.java:70)
	at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addPlugin(RequiredPluginsClasspathContainer.java:308)
	at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addDependency(RequiredPluginsClasspathContainer.java:267)
	at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addDependency(RequiredPluginsClasspathContainer.java:251)
	at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.computePluginEntries(RequiredPluginsClasspathContainer.java:145)
	at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.getClasspathEntries(RequiredPluginsClasspathContainer.java:95)
	at org.eclipse.jdt.internal.core.ClasspathEntry.validateClasspathEntry(ClasspathEntry.java:1959)
	at org.eclipse.jdt.internal.core.ClasspathEntry.validateClasspathEntry(ClasspathEntry.java:1908)
	at org.eclipse.jdt.internal.core.ClasspathValidation.validate(ClasspathValidation.java:72)
	at org.eclipse.jdt.internal.core.ChangeClasspathOperation.classpathChanged(ChangeClasspathOperation.java:51)
	at org.eclipse.jdt.internal.core.SetContainerOperation.executeOperation(SetContainerOperation.java:110)
	at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
	at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:793)
	at org.eclipse.jdt.core.JavaCore.setClasspathContainer(JavaCore.java:5401)
	at org.eclipse.pde.internal.core.PluginModelManager.updateAffectedEntries(PluginModelManager.java:373)
	at org.eclipse.pde.internal.core.PluginModelManager.modelsChanged(PluginModelManager.java:282)
	at org.eclipse.pde.internal.core.PluginModelManager.resetState(PluginModelManager.java:1075)
	at org.eclipse.pde.core.target.LoadTargetDefinitionJob.performPlatformReset(LoadTargetDefinitionJob.java:607)
	at org.eclipse.pde.core.target.LoadTargetDefinitionJob.handleReload(LoadTargetDefinitionJob.java:584)
	at org.eclipse.pde.core.target.LoadTargetDefinitionJob.loadPlugins(LoadTargetDefinitionJob.java:310)
	at org.eclipse.pde.core.target.LoadTargetDefinitionJob.runInWorkspace(LoadTargetDefinitionJob.java:143)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: java.util.NoSuchElementException
	at java.util.StringTokenizer.nextToken(StringTokenizer.java:349)
	at java.util.StringTokenizer.nextToken(StringTokenizer.java:377)
	at org.osgi.framework.Version.<init>(Version.java:138)
	... 31 more
Comment 5 Adrian Aichner CLA 2013-07-03 14:42:11 EDT
(In reply to comment #3)
> Merged to master.


Hello Szymon, please review and pull
https://github.com/anaran/orion.server/commit/ac8b1699839931e10ab1606650a1b5944665bca6

I assert that I authored 100% of the content of this contribution and have the rights to donate the content to Eclipse under the EPL

See also comment #4
Comment 6 Adrian Aichner CLA 2013-07-04 06:21:33 EDT
(In reply to comment #3)
> Merged to master.

Me again: I just found Bug 411835 which is probably a better fix.
Comment 7 Adrian Aichner CLA 2013-07-04 06:25:44 EDT
(In reply to comment #3)
> Merged to master.

Hmmh, reading https://bugs.eclipse.org/bugs/show_bug.cgi?id=411835#c2 my patch might still have merit.

I gotta be quiet now before Bugzilla flood control kicks in.