-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add java20patch folder to eclipse.platform.releng.tychoeclipsebuilder
- Loading branch information
Showing
23 changed files
with
805 additions
and
0 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
...eng.tychoeclipsebuilder/java20patch/eclipse.releng.repository.java20patch/antrunbuild.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<project | ||
default="default" | ||
basedir="."> | ||
|
||
<!-- | ||
This file is called by the pom's "antrun" plugin. These tasks were | ||
"pulled out" of using directly in the pom because it seems errors are | ||
not well captured, and only thing "left" on the build system is the | ||
last ant file created. (Makes me even wonder if you can call twice | ||
during same phase?) | ||
--> | ||
|
||
<target | ||
name="preTransform" | ||
depends="checkExistence"> | ||
<echoproperties /> | ||
<fail | ||
unless="contentjarexists" | ||
message="content.jar file did not exist as expected" /> | ||
<echo message="unzip content.jar, for xslt transform" /> | ||
<unzip | ||
src="${project.build.directory}/repository/content.jar" | ||
dest="${project.build.directory}/repository/" /> | ||
<echo message="backup, of originals, just to help debugging" /> | ||
<copy | ||
file="${project.build.directory}/repository/content.jar" | ||
tofile="${project.build.directory}/backup/contentORIG.jar" | ||
preservelastmodified="true" /> | ||
<copy | ||
file="${project.build.directory}/repository/content.xml" | ||
tofile="${project.build.directory}/backup/contentORIG.xml" | ||
preservelastmodified="true" /> | ||
</target> | ||
<target name="checkExistence"> | ||
<condition property="contentjarexists"> | ||
<available file="${project.build.directory}/repository/content.jar" /> | ||
</condition> | ||
</target> | ||
|
||
<target name="postTransform"> | ||
<!-- In the pom file, are steps that do the transorm, | ||
xxx and copy the transformed content.xml back to "here" --> | ||
<delete | ||
file="${project.build.directory}/repository/content.jar" | ||
failonerror="true" /> | ||
<zip | ||
destfile="${project.build.directory}/repository/content.jar" | ||
basedir="${project.build.directory}/generated-resources/xml/xslt" | ||
includes="content.xml" | ||
filesonly="true" /> | ||
<!-- must delete, or will be kept in the final zipped up version. | ||
Would not really hurt much ... but, be confusing | ||
<delete file="${project.build.directory}/repository/content.xml" /> | ||
--> | ||
<copy | ||
file="${project.build.directory}/repository/content.jar" | ||
tofile="${project.build.directory}/backup/contentORIG2.jar" | ||
preservelastmodified="true" /> | ||
</target> | ||
|
||
<target name="default"> | ||
<fail message="There is no default target for this antrunbuild.xml file." /> | ||
</target> | ||
</project> |
14 changes: 14 additions & 0 deletions
14
...releng.tychoeclipsebuilder/java20patch/eclipse.releng.repository.java20patch/category.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<site> | ||
<feature id="org.eclipse.jdt.java20patch" version="0.0.0" patch="true"> | ||
<category name="Eclipse Java 20 support for 2023-03 development stream"/> | ||
</feature> | ||
<feature id="org.eclipse.jdt.java20patch.source" version="0.0.0" patch="true"> | ||
<category name="Eclipse Java 20 support for 2023-03 development stream"/> | ||
</feature> | ||
<category-def name="Eclipse Java 20 support for 2023-03 development stream" label="Eclipse Java 20 support for 2023-03 development stream"> | ||
<description> | ||
Eclipse Java 20 support for 2023-03 development stream. | ||
</description> | ||
</category-def> | ||
</site> |
74 changes: 74 additions & 0 deletions
74
...choeclipsebuilder/java20patch/eclipse.releng.repository.java20patch/patchMatchVersion.xsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet | ||
version="1.0" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | ||
<!-- | ||
This transform is to work around bug 350088. | ||
https://bugs.eclipse.org/bugs/show_bug.cgi?id=350088 | ||
The original idea of using and XSL transform for this work-around, | ||
came from a message list posting in 2009 by Paul Webster, | ||
https://www.eclipse.org/forums/index.php?t=msg&th=40931&start=0& | ||
While was referenced in a 2009 blog post by Andrew Niefer, | ||
http://aniefer.blogspot.com/2009/06/patching-features-part-2.html. | ||
The details here are heavily modified, just wanted to acknowledge those | ||
sources of inspiration. Paul also used XSLT to final form of metadata for | ||
our executable feature, in current builds. | ||
--> | ||
|
||
<xsl:param name="patchFeatureVersionRange"> | ||
$patchFeatureVersionRange | ||
</xsl:param> | ||
<xsl:param name="patchFeatureIU"> | ||
$patchFeatureIU | ||
</xsl:param> | ||
<!-- | ||
<xsl:variable name="patchFeatureVersionRange"><xsl:value-of select="$patchFeatureVersionRange" /></xsl:variable> | ||
<xsl:variable name="patchFeatureIU"><xsl:value-of select="$patchFeatureIU" /></xsl:variable> | ||
--> | ||
<xsl:variable name="quot"> | ||
" | ||
</xsl:variable> | ||
<xsl:variable name="apos"> | ||
' | ||
</xsl:variable> | ||
|
||
<xsl:template match="processing-instruction('metadataRepository')"> | ||
<xsl:text>
</xsl:text> | ||
<xsl:copy /> | ||
<xsl:text>
</xsl:text> | ||
<xsl:comment> | ||
This content.xml file was transformed to include "specific range match" | ||
for the feature intended to be patched. | ||
Feature (IU) to be patched: | ||
<xsl:value-of select="$patchFeatureIU" /> | ||
Version Range: | ||
<xsl:value-of select="$patchFeatureVersionRange" /> | ||
|
||
XSLT Version = <xsl:copy-of select="system-property('xsl:version')" /> | ||
XSLT Vendor = <xsl:copy-of select="system-property('xsl:vendor')" /> | ||
XSLT Vendor URL = <xsl:copy-of select="system-property('xsl:vendor-url')" /> | ||
<xsl:text>
</xsl:text> | ||
</xsl:comment> | ||
<xsl:text>
</xsl:text> | ||
<xsl:apply-templates /> | ||
</xsl:template> | ||
|
||
|
||
<!-- standard copy template --> | ||
<xsl:template match="@*|node()"> | ||
|
||
<xsl:copy> | ||
<xsl:apply-templates select="@*" /> | ||
<xsl:apply-templates /> | ||
</xsl:copy> | ||
</xsl:template> | ||
|
||
<!-- For this awkward use of concat, see http://www.oxygenxml.com/archives/xsl-list/200811/msg00544.html | ||
<xsl:template match="concat ($apos, @range [@name=, $apos, $patchFeatureIU, $apos,],$apos )"> | ||
--> | ||
<xsl:template match="@range[../@name='org.eclipse.jdt.feature.group']"> | ||
<xsl:attribute name="range"><xsl:value-of select="$patchFeatureVersionRange" /></xsl:attribute> | ||
</xsl:template> | ||
|
||
</xsl:stylesheet> |
205 changes: 205 additions & 0 deletions
205
...form.releng.tychoeclipsebuilder/java20patch/eclipse.releng.repository.java20patch/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,205 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2022 Eclipse Foundation and others. | ||
All rights reserved. This program and the accompanying materials | ||
are made available under the terms of the Eclipse Distribution License v1.0 | ||
which accompanies this distribution, and is available at | ||
https://www.eclipse.org/org/documents/edl-v10.php | ||
Contributors: | ||
IBM Corporation and others - initial implementation | ||
--> | ||
<project | ||
xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>eclipse.platform.releng</groupId> | ||
<artifactId>eclipse.platform.releng.java20patch</artifactId> | ||
<version>4.27.0-SNAPSHOT</version> | ||
<relativePath>../</relativePath> | ||
</parent> | ||
|
||
<groupId>eclipse.platform.releng</groupId> | ||
<artifactId>eclipse.releng.repository.java20patch</artifactId> | ||
<version>1.2.300-SNAPSHOT</version> | ||
<packaging>eclipse-repository</packaging> | ||
|
||
<!-- | ||
Notice that all the tasks in this pom are normally done during the packaging phase, | ||
but the last few we deliberately do later, during the pre-integration-test phase, | ||
in order that things be done in the right order, and changes maintained. | ||
See https://maven.apache.org/ref/3.5.4/maven-core/lifecycles.html | ||
for complete list of phases. | ||
--> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>target-platform-configuration</artifactId> | ||
<configuration> | ||
<dependency-resolution> | ||
<extraRequirements> | ||
<!-- this guarantees proper inclusion in reactor--> | ||
<requirement> | ||
<type>eclipse-feature</type> | ||
<id>${featureToPatch}</id> | ||
<versionRange>${featureToPatchVersion}</versionRange> | ||
</requirement> | ||
</extraRequirements> | ||
</dependency-resolution> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>unpack-content-jar</id> | ||
<phase>package</phase> | ||
<configuration> | ||
<target> | ||
<ant antfile="${basedir}/antrunbuild.xml"> | ||
<target name="preTransform" /> | ||
</ant> | ||
</target> | ||
</configuration> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>jar-content-xml</id> | ||
<phase>pre-integration-test</phase> | ||
<configuration> | ||
<target> | ||
<ant antfile="${basedir}/antrunbuild.xml"> | ||
<target name="postTransform" /> | ||
</ant> | ||
</target> | ||
</configuration> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>xml-maven-plugin</artifactId> | ||
<!-- | ||
The output of "transform, *always* goes to | ||
${project.build.directory}/generated-resources/xml/xslt | ||
as far as I can tell. | ||
--> | ||
<configuration> | ||
<forceCreation>true</forceCreation> | ||
<transformationSets> | ||
<transformationSet> | ||
<dir>${project.build.directory}/repository/</dir> | ||
<includes> | ||
<include>content.xml</include> | ||
</includes> | ||
<stylesheet>${basedir}/patchMatchVersion.xsl</stylesheet> | ||
<parameters> | ||
<parameter> | ||
<name>patchFeatureVersionRange</name> | ||
<value>${versionRangeForPatch}</value> | ||
</parameter> | ||
<parameter> | ||
<name>patchFeatureIU</name> | ||
<value>${featureToPatch}.feature.group</value> | ||
</parameter> | ||
</parameters> | ||
</transformationSet> | ||
</transformationSets> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>transformForExactVersionRange</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>transform</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
|
||
</plugin> | ||
<!-- | ||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copyModifiedContentXMLFile</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/repository</outputDirectory> | ||
<resources> | ||
<resource> | ||
<directory>${project.build.directory}/generated-resources/xml/xslt</directory> | ||
<includes> | ||
<include>content.xml</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
--> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-p2-publisher-plugin</artifactId> | ||
<version>${tycho.version}</version> | ||
<executions> | ||
<execution> | ||
<id>categories-java20patch</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>publish-categories</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-p2-repository-plugin</artifactId> | ||
<version>${tycho.version}</version> | ||
<configuration> | ||
<includeAllDependencies>false</includeAllDependencies> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>assemble-java20patch</id> | ||
<phase>package</phase> | ||
<configuration> | ||
<repositoryName>Early Access of Java 20 support</repositoryName> | ||
<finalName>Java20EarlyAccessPatchRepo</finalName> | ||
</configuration> | ||
<goals> | ||
<goal>assemble-repository</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>archive-java20patch</id> | ||
<phase>pre-integration-test</phase> | ||
<configuration> | ||
<repositoryName>Early Access of Java 20 support</repositoryName> | ||
<finalName>Java20EarlyAccessPatchRepo</finalName> | ||
</configuration> | ||
<goals> | ||
<goal>archive-repository</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
|
||
</project> |
2 changes: 2 additions & 0 deletions
2
...lder/java20patch/org.eclipse.jdt-feature-dummy/.settings/org.eclipse.core.resources.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=UTF-8 |
2 changes: 2 additions & 0 deletions
2
...uilder/java20patch/org.eclipse.jdt-feature-dummy/.settings/org.eclipse.core.runtime.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
line.separator=\n |
16 changes: 16 additions & 0 deletions
16
...orm.releng.tychoeclipsebuilder/java20patch/org.eclipse.jdt-feature-dummy/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
############################################################################### | ||
# Copyright (c) 2021 IBM Corporation and others. | ||
# | ||
# This program and the accompanying materials | ||
# are made available under the terms of the Eclipse Public License 2.0 | ||
# which accompanies this distribution, and is available at | ||
# https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
# Contributors: | ||
# IBM Corporation - initial API and implementation | ||
############################################################################### | ||
bin.includes=\ | ||
feature.xml,\ | ||
feature.properties |
Oops, something went wrong.