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

Upgrade eclipse oxygen #275

Merged
merged 4 commits into from Apr 25, 2018
Merged

Upgrade eclipse oxygen #275

merged 4 commits into from Apr 25, 2018

Conversation

@fgdrf
Copy link
Contributor

@fgdrf fgdrf commented Apr 14, 2018

Collaboration with @egouge , @nprigour to upgrade to newer Eclipse release.

For discussion see issue #256

@fgdrf fgdrf force-pushed the fgdrf:upgrade_eclipse_oxygen branch from 45b1018 to e1a119b Apr 14, 2018
@@ -318,7 +316,8 @@ protected Button createButton(Composite parent,

public File findPluginsDir() throws IOException {
Bundle bundle = Platform.getBundle(GEOTOOLS_LIBS_PLUGIN);
String filePath = FileLocator.toFileURL(FileLocator.find(bundle, new Path("gtlib"), emptyMap())).getFile();

String filePath = FileLocator.toFileURL(FileLocator.find(bundle, new Path("glib"), new HashMap<String, String>())).getFile();

This comment has been minimized.

@nprigour

nprigour Apr 14, 2018
Contributor

why the path has changed from "gtlib" to "glib"?

This comment has been minimized.

@fgdrf

fgdrf Apr 14, 2018
Author Contributor

Good question. Just had a look at the complete class and it looks like it doesn't work anyway. The given bundle defined in GEOTOOLS_LIBS_PLUGIN doesn't exists anymore, does it?

This comment has been minimized.

@nprigour

nprigour Apr 14, 2018
Contributor

To be honest I have not worked with teradata. The bundle specified by GEOTOOLS_LIBS_PLUGIN seems to be absent

@@ -101,479 +104,5 @@
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository/"/>

This comment has been minimized.

@nprigour

nprigour Apr 15, 2018
Contributor

Maybe it is worth to also update to a newer version of eclipse orbit (applicable to oxygen). Below I provide the needed changes in org.locationtech.udig.target.target:

<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
<unit id="org.apache.batik.dom" version="1.7.1.v201505191845"/>
<unit id="com.google.guava" version="15.0.0.v201403281430"/>
<unit id="org.apache.batik.css" version="1.7.0.v201011041433"/>
<unit id="org.apache.batik.transcoder" version="1.7.0.v201011041433"/>
<unit id="org.apache.xerces" version="2.9.0.v201101211617"/>
<unit id="org.easymock" version="2.4.0.v20090202-0900"/>
<unit id="org.hamcrest.library" version="1.3.0.v201505072020"/>
<unit id="org.apache.batik.parser" version="1.7.0.v201011041433"/>
<unit id="org.apache.batik.dom.svg" version="1.7.0.v201011041433"/>
<unit id="org.apache.batik.ext.awt" version="1.7.0.v201011041433"/>
<unit id="net.miginfocom.layout.swing" version="3.7.1.v200911230030"/>
<unit id="org.hamcrest.core" version="1.3.0.v201303031735"/>
<unit id="org.apache.batik.util" version="1.7.0.v201011041433"/>
<unit id="org.apache.batik.util.gui" version="1.7.0.v200903091627"/>
<unit id="org.apache.batik.xml" version="1.7.0.v201011041433"/>
<unit id="org.apache.batik.bridge" version="1.7.0.v201011041433"/>
<unit id="org.apache.batik.svggen" version="1.7.0.v201011041433"/>
<unit id="net.miginfocom.layout" version="3.7.1.v200911230030"/>
<unit id="net.miginfocom.layout.swt" version="3.7.1.v201505121915"/>
<unit id="com.lowagie.text" version="2.1.7.v201004222200"/>
<unit id="org.junit" version="4.12.0.v201504281640"/>
<unit id="javax.xml" version="1.3.4.v201005080400"/>
<unit id="org.apache.xml.serializer" version="2.7.1.v201005080400"/>
<unit id="org.apache.xml.resolver" version="1.2.0.v201005080400"/>
<unit id="org.apache.commons.logging" version="1.1.1.v201101211721"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20180330011457/repository/"/>
</location>
@fgdrf
Copy link
Contributor Author

@fgdrf fgdrf commented Apr 15, 2018

@nprigour Thanks for this updated regarding orbit installable units. I'll prepare an update!

@fgdrf
Copy link
Contributor Author

@fgdrf fgdrf commented Apr 15, 2018

Tested local build and if fails with:

Caused by: java.lang.RuntimeException: Could not determine SWT implementation
fragment bundle for environment {osgi.os=macosx, osgi.ws=cocoa,
org.eclipse.update.install.features=true, osgi.arch=x86}

It doesn't help to set includeAllPlatforms="true" ind target definition file..

related Eclipse bugs:

@fgdrf
Copy link
Contributor Author

@fgdrf fgdrf commented Apr 15, 2018

If I disable macosx.cocoa.x88 environment in root pom, the build is fine

<!--
<environment>
          <os>macosx</os>
          <ws>cocoa</ws>
          <arch>x86</arch>
</environment>
-->

that means we cannot support macosx 32bit environments anymore ..

@fgdrf
Copy link
Contributor Author

@fgdrf fgdrf commented Apr 15, 2018

Looks like scalebar is broken, it displays wrong scale denominators (at least on my box with German environment).

image

@fgdrf
Copy link
Contributor Author

@fgdrf fgdrf commented Apr 15, 2018

The issue with the scale is also on master, so we should fix it independently of this branch. Created issue #276 as bug

@nprigour
Copy link
Contributor

@nprigour nprigour commented Apr 15, 2018

Hi @fgdrf ,

Yes macosx 32bit is not supported since eclispe mars.
Regarding porting to eclipse oxygen I do not think there will be any other major issues. I have already ported udig to eclipse-neon and working with it for over 8 months without issues. Differences wbetween oxygen and neon are minor.

@fgdrf
Copy link
Contributor Author

@fgdrf fgdrf commented Apr 16, 2018

I thought about implications of an upgrade to oxygen. IMO the resulting product needs a JVM >=1.8 installed. For SDK-Users we should/could still support versions lower than 1.8, e.g. 1.7 because our plugins are still compatible for Eclipse Luna, Mars, Neon, and of cause Oxygen.

This implies that the build would compile on 1.7 level (which is untested becaus of lack of support on Jenkins)

I‘d like to suggest to enable builds against jdk 1.7 in addition to 1.8 to verify if we are still valid

Opinions?

@nprigour
Copy link
Contributor

@nprigour nprigour commented Apr 16, 2018

Hi @fgdrf ,
I do not think that using java 1.7 for building will work with oxygen plugins. There are several eclipse plugins that have a Bundle-RequiredExecutionEnvironment: JavaSE-1.8 which means that java 8 should be used in any case.
Maybe for udig plugins we can use multiple Bundle-RequiredExecutionEnvironment options. I think this is allowed.

@nprigour
Copy link
Contributor

@nprigour nprigour commented Apr 17, 2018

Adding to my previous comment, using Bundle-RequiredExecutionEnvironment: JavaSE-1.8 for udig plugins and java 1.8 for building does not prohibit use of Eclipse Luna, Mars or Neon as target platforms. The Bundle-RequiredExecutionEnvironment parameter specifies the minimum execution environment. Udig plugins may require Java 1.8 (especially if we intend to upgrade to geotools 19.0) but still use eclipse plugins compiled with an older java version. Backward compatibility is guranteed in java.

@fgdrf
Copy link
Contributor Author

@fgdrf fgdrf commented Apr 20, 2018

Just sorting:
Compile level: Source-code is still valid to compile with 1.7, we don't use JVM features of 1.8++ right now.

The product we build (against the target file) requires Java 1.8. So it makes sense to think about seperation of concerns: SDK and product. The first should have backward compatibvility which means build with jdk 1.7 and maybe compiled against different target-platformes (mars, neon, oxygen).
On product level we could build against the latest, Oyxgen at the time of writing, which implies to use JRE 1.8++ to run tests against. If anybody is interested to build against an older Eclipse release we can investigate

Conclusion: If we like to use 1.8 features, we need to set Bundle-RequiredExecutionEnvironment: JavaSE-1.8 otherwise its still valid to use Bundle-RequiredExecutionEnvironment: JavaSE-1.7, isn't it?

Does this makes sense?

@nprigour
Copy link
Contributor

@nprigour nprigour commented Apr 20, 2018

IMHO the main issue regarding java build version is related to geotools. If we intend to upgrade to a newer version we have to go for java 1.8 even for source code compilation. Geotools 15.x and onward are build with java 1.8 therefore I assume we have to go for a source compatibility level of 1.8 even for the SDK build.

@fgdrf
Copy link
Contributor Author

@fgdrf fgdrf commented Apr 20, 2018

@nprigour
Copy link
Contributor

@nprigour nprigour commented Apr 24, 2018

I deployed the linux 64bit version in ubuntu 14.04, tried to load a couple of maps, perform some selections and edits, create new featureTypes and its seems to run smoothly without any issues

@fgdrf
Copy link
Contributor Author

@fgdrf fgdrf commented Apr 24, 2018

@nprigour Great, going to test on mac the build and finally the product..

fgdrf and others added 4 commits Jul 18, 2017
Signed-off-by: Frank Gasdorf <fgdrf@users.sourceforge.net>
Signed-off-by: Nikolaos Pringouris <nprigour@gmail.com>
Signed-off-by: Frank Gasdorf <fgdrf@users.sourceforge.net>
Signed-off-by: Frank Gasdorf <fgdrf@users.sourceforge.net>
@fgdrf fgdrf force-pushed the fgdrf:upgrade_eclipse_oxygen branch from 80a86f5 to 50f1b1b Apr 24, 2018
@fgdrf
Copy link
Contributor Author

@fgdrf fgdrf commented Apr 24, 2018

Created following piggy back CQ's for Oribit dependencies:

- approved allready 😃

@fgdrf
Copy link
Contributor Author

@fgdrf fgdrf commented Apr 24, 2018

tested on Mac as well. Looks good except a minor problem: the perspective switcher is not available anymore (I assume it disappeared when we swiched to Eclipse E4, see #277)

IMHO it isn't a blocker to merge, is it?

@nprigour
Copy link
Contributor

@nprigour nprigour commented Apr 25, 2018

Hi @fgdrf
Can you provide some more details regarding this CQ's for Oribit dependencies and what do they imply? it seems that only eclipse committers are able to view them (and I am not one of them 😀 )

@fgdrf
Copy link
Contributor Author

@fgdrf fgdrf commented Apr 25, 2018

@nprigour All CQs I filed yesterday are for the dependencies we resolving from orbit repository. In the past we had other versions (e.g. guave 12.0.0 and junit 4.11).
It was just to get approval from Eclipse foundation and to be prepared for IP review.

A blocker for now is JAI Dependencies we use to build and at runtime which we cannot ship, if we provide a release under Locationtech umprella. However, we can release right now but cannot provide Artifact downloads from any Eclipse Foundation hosting.

Don't get distracted, we move on, merge this branch back and start release train 😀

@fgdrf fgdrf merged commit 3f9150a into locationtech:master Apr 25, 2018
@fgdrf fgdrf added this to the uDig-2.0.0 milestone Apr 25, 2018
@fgdrf fgdrf added the improvement label Apr 25, 2018
@fgdrf
Copy link
Contributor Author

@fgdrf fgdrf commented Apr 25, 2018

CI-Job for merged changes to master finished successfully : https://ci.eclipse.org/udig/job/uDig-master-CI/94/ ✔️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants