Skip to content

Commit

Permalink
Update dependencies and pom.xml to build against Eclipse 2021-12
Browse files Browse the repository at this point in the history
Notes:
- updgrade Tycho to 4.0.10
- remove exc environment header from management bundle (see readme)
- remove exc environment from newly created projects via wizard (same reason)
- copy HeaderMap from older version of PDE
- include in feature.xml zest bundles withe exact version
- update legacy bundle editor to reflect API changes in PDE
- update unit tests (resources and hamcrest dependency)

This time there is only a new target platform and no new launch configuration
as I built and tested via maven and finally made a test in
Eclipse for Web Developers using remote debug when needed
  • Loading branch information
giamma committed Dec 24, 2024
1 parent d3fd787 commit 2955ab7
Show file tree
Hide file tree
Showing 28 changed files with 1,205 additions and 184 deletions.
4 changes: 2 additions & 2 deletions .github/toolchains.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd">
<!-- <toolchain>
<toolchain>
<type>jdk</type>
<provides>
<id>JavaSE-21</id>
Expand All @@ -11,7 +11,7 @@
<configuration>
<jdkHome>${env.JAVA_HOME_21_X64}</jdkHome>
</configuration>
</toolchain> -->
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,26 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: |
8
11
17
21
distribution: 'temurin'
cache: 'maven'
# - name: Build with Maven
# run: xvfb-run mvn clean verify -Dtycho.localArtifacts=ignore
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.9
- name: Build with Maven
env:
JAVA_HOME: ${{ env.JAVA_HOME_17_X64 }}
JAVA_HOME: ${{ env.JAVA_HOME_21_X64 }}
run: |
cp .github/toolchains.xml ~/.m2/toolchains.xml
xvfb-run mvn clean verify
Expand All @@ -29,7 +34,7 @@ jobs:
# run: mvn -V -B verify
# - name: Run GUI Tests
# env:
# JAVA_HOME: ${{ env.JAVA_HOME_17_X64 }}
# JAVA_HOME: ${{ env.JAVA_HOME_21_X64 }}
# uses: coactions/setup-xvfb@v1
# with:
# run: mvn --batch-mode verify
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.virgo.ide.bundlor.core/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,17 @@ org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
Expand Down Expand Up @@ -77,7 +73,6 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL
org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.virgo.ide.bundlor.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.m2e.maven.runtime;bundle-version="1.0.0";resolution:=optional
Import-Package: org.apache.commons.lang;version="2.4.0",
org.apache.commons.logging
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Export-Package: org.eclipse.virgo.ide.bundlor.internal.core
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" output="target/classes" path="src1"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="com.springsource.server.ide.jdt.core.MANIFEST_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ Bundle-ManifestVersion: 2
Bundle-SymbolicName: com.springsource.bundlor
Bundle-Version: 1.0.0
Spring-Context: META-INF/spring/*.xml
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Template: org.springframework.*;version="[2.5.6.A,2.6.0)"
14 changes: 14 additions & 0 deletions org.eclipse.virgo.ide.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -338,4 +338,18 @@
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.zest.core"
download-size="0"
install-size="0"
version="1.13.0.202409021815"
unpack="false"/>

<plugin
id="org.eclipse.zest.layouts"
download-size="0"
install-size="0"
version="1.6.0.202409021815"
unpack="false"/>

</feature>
2 changes: 1 addition & 1 deletion org.eclipse.virgo.ide.management.remote/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand Down Expand Up @@ -80,7 +80,7 @@ org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL
org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ Import-Package: org.eclipse.gemini.blueprint;resolution:=optional,
Require-Bundle: org.apache.felix.gogo.runtime;bundle-version="[0.10.0,1.0.0)";resolution:=optional
Bundle-Vendor: Eclipse.org - Virgo
Export-Package: org.eclipse.virgo.ide.management.remote
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
6 changes: 5 additions & 1 deletion org.eclipse.virgo.ide.management.remote/README.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ Important attention points:
in Virgo, not in Eclipse
- the execution environment of this bundle and the Java level
must remain the same as Virgo Server or lower, otherwise
the Jar won't be resolved in Virgo at runtime.
the Jar won't be resolved in Virgo at runtime. As of Eclipse 2024-12
JavaSE7 is no more supported for compiling. Virgo can run with Java8
but declares to support only JavaSE7, as such I am removing the
execution environment header from MANIFEST.MF to make this bundle
deployable and runnable in Virgo
- Virgo still ships with a very dated version of Felix Gogo Shell
and Eclipse 2022 and later includes a newer version of the same.
One of the methods that the JMX bridge uses to execute shell commands
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ private static java.util.List<String> getEntries(IProject project) throws CoreEx
* @throws CoreException
*/
/* package */ static IPath getOutputLocation(IProject project) throws CoreException {
IJavaProject jp = (IJavaProject) project.getNature(JavaCore.NATURE_ID);
IJavaProject jp = JavaCore.create(project);
IPath outputLocation = jp.getOutputLocation();

if (outputLocation == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ public void run(IProgressMonitor monitor) throws CoreException {
addNatures(project);
monitor.worked(1);

IBundleProjectDescription bundleDescription = service.getDescription(project);
// remove execution environment
bundleDescription.setExecutionEnvironments(new String[0]);

if (contextRoot != null && contextRoot.length() > 0) {
IPath webContentPath = configureWABClasspath(project);

Expand All @@ -129,18 +133,17 @@ public void run(IProgressMonitor monitor) throws CoreException {
createIndexHTML(contextRoot, webContentPath);
createBuildProperties();

IBundleProjectDescription bundleDescription = service.getDescription(project);

bundleDescription.setHeader(HEADER_WEB_CONTEXT_PATH, SLASH + contextRoot);
bundleDescription.setHeader(HEADER_BUNDLE_CLASS_PATH, CLASS_PATH_VALUE);
bundleDescription.apply(null);
}
bundleDescription.apply(null);
monitor.worked(1);

IFacetedProject fProject = ProjectFacetsManager.create(project.getProject(), true, null);
fProject.installProjectFacet(ProjectFacetsManager.getProjectFacet(FacetCorePlugin.BUNDLE_FACET_ID).getDefaultVersion(), null, null);
monitor.worked(1);
monitor.done();

}

private void createBuildProperties() throws CoreException {
Expand Down Expand Up @@ -195,7 +198,7 @@ private void createFileFromTemplate(String contextRoot, IPath webContentPath, St
}

private IPath configureWABClasspath(IProject project) throws CoreException, JavaModelException {
IJavaProject javaProject = (IJavaProject) project.getNature(JavaCore.NATURE_ID);
IJavaProject javaProject = JavaCore.create(project);
javaProject.setOutputLocation(project.getFullPath().append(BIN), null);
IClasspathEntry[] entries = javaProject.getRawClasspath();
IClasspathEntry[] newEntries = new IClasspathEntry[entries.length + 1];
Expand Down
17 changes: 17 additions & 0 deletions org.eclipse.virgo.ide.ui.tests/.project
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,26 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
<filter>
<id>1707340145308</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
2 changes: 1 addition & 1 deletion org.eclipse.virgo.ide.ui.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Require-Bundle: org.eclipse.core.filesystem,
org.eclipse.swtbot.swt.finder,
org.eclipse.virgo.ide.tests.util,
org.eclipse.virgo.ide.runtime.core,
org.hamcrest.core;bundle-version="[1.3.0,2.0.0)",
org.hamcrest.core,
slf4j.api
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@
import org.eclipse.swtbot.swt.finder.utils.TreePath;
import org.eclipse.ui.forms.widgets.Section;
import org.hamcrest.Description;
import org.hamcrest.Factory;
//import org.hamcrest.Factory;
import org.hamcrest.Matcher;

/**
* @author Leo Dos Santos
*/
public class InSection<T extends Widget> extends AbstractMatcher<T> {

@Factory
// @Factory
public static <T extends Widget> Matcher<T> inSection(Matcher<?> matcher) {
return new InSection<T>(matcher);
}

@Factory
// @Factory
public static <T extends Widget> Matcher<T> inSection(String labelText) {
return new InSection<T>(labelText);
}
Expand Down
3 changes: 2 additions & 1 deletion org.eclipse.virgo.ide.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.ltk.core.refactoring,
org.eclipse.wst.sse.ui.infopop;bundle-version="1.0.300",
org.eclipse.virgo.ide.pde.core,
org.eclipse.wst.web
org.eclipse.wst.web,
org.eclipse.ui.genericeditor
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.virgo.ide.internal.ui,
Expand Down
Loading

0 comments on commit 2955ab7

Please sign in to comment.