diff options
-rw-r--r-- | LICENSE | 2 | ||||
-rw-r--r-- | build.xml | 17 | ||||
-rw-r--r-- | buildScripts/eclipse-p2.ant.xml | 95 | ||||
-rw-r--r-- | buildScripts/p2/artifacts.xml | 26 | ||||
-rw-r--r-- | buildScripts/p2/content.xml | 116 | ||||
-rw-r--r-- | buildScripts/p2/feature.xml | 39 | ||||
-rw-r--r-- | buildScripts/p2/p2.inf | 6 | ||||
-rw-r--r-- | buildScripts/website.ant.xml | 22 |
8 files changed, 319 insertions, 4 deletions
@@ -1,4 +1,4 @@ -Copyright (C) 2009-2015 The Project Lombok Authors. +Copyright (C) 2009-2020 The Project Lombok Authors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -371,6 +371,21 @@ lombok.launch.AnnotationProcessorHider$ClaimingProcessor,isolating</echo> <property name="lombok.dist.built" value="true" /> </target> + <target name="-eclipse-p2-dist" unless="lombok.version"> + <antcall target="dist" /> + </target> + + <target name="eclipse-p2" depends="config-ssh, -eclipse-p2-dist" description="Builds an eclipse p2 update site which allows lombok to be installed as an eclipse plugin"> + + <ant antfile="buildScripts/eclipse-p2.ant.xml" target="dist-eclipse-p2" inheritAll="false"> + <property name="lombok.version" value="${lombok.version}" /> + </ant> + <ant antfile="buildScripts/website.ant.xml" target="deploy-p2" inheritAll="false"> + <property name="ssh.username" value="${ssh.username}" /> + <property name="ssh.keyfile" value="${ssh.keyfile}" /> + </ant> + </target> + <target name="dist-utils" description="Builds lombok-utils.jar, which is a library used by i.e. lombok.ast project." depends="version, compile"> <mkdir dir="dist" /> <jar destfile="dist/lombok-utils-${lombok.version}.jar"> @@ -637,7 +652,7 @@ ${sourceWarning}</echo> </target> <target name="setupJavaOracle7TestEnvironment" depends="ensureTestDeps, contrib" description="Sets up the test so that 'ant test' will test against Oracle JDK7."> - <mkdir dir="lib/oracleJDK7Environment" /> + <mkdir dir="lib/oracleJDK7Environment" /> <get src="https://projectlombok.org/ivyrepo/langtools/oracle-jdk7-tools.jar" dest="lib/oracleJDK7Environment/tools.jar" verbose="true" usetimestamp="true" /> <get src="https://projectlombok.org/ivyrepo/langtools/oracle-jdk7-rt.jar" dest="lib/oracleJDK7Environment/rt.jar" verbose="true" usetimestamp="true" /> <propertyfile file="testenvironment.properties"> diff --git a/buildScripts/eclipse-p2.ant.xml b/buildScripts/eclipse-p2.ant.xml new file mode 100644 index 00000000..4dc9b719 --- /dev/null +++ b/buildScripts/eclipse-p2.ant.xml @@ -0,0 +1,95 @@ +<!-- + Copyright (C) 2020 The Project Lombok Authors. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +--> +<project name="lombok-eclipse-p2" basedir=".." xmlns:ivy="antlib:com.zwitserloot.ivyplusplus"> + <description> +This buildfile is part of projectlombok.org. It is responsible for building the eclipse P2 update site. + </description> + + <taskdef classpath="lib/ivyplusplus.jar" resource="com/zwitserloot/ivyplusplus/antlib.xml" uri="antlib:com.zwitserloot.ivyplusplus" /> + + <target name="-p2-clean"> + <delete dir="build/p2" quiet="true" /> + </target> + + <target name="dist-eclipse-p2" depends="build-eclipse-p2"> + <tar destfile="dist/eclipse-p2.tar.bz2" compression="bzip2"> + <tarfileset dir="build/p2" /> + </tar> + </target> + + <target name="build-eclipse-p2" depends="-set-epoch-millis"> + <property name="lombok.version" value="1.18.99" /> + <tstamp><format property="dt.year" pattern="yyyy" /></tstamp> + <mkdir dir="build/p2" /> + <mkdir dir="build/p2/features" /> + <mkdir dir="build/p2/plugins" /> + + <jar destfile="build/p2/plugins/org.projectlombok.agent_${lombok.version}.jar"> + <manifest> + <attribute name="Manifest-Version" value="1.0" /> + <attribute name="Bundle-ManifestVersion" value="2" /> + <attribute name="Bundle-Name" value="Lombok Agent" /> + <attribute name="Bundle-SymbolicName" value="org.projectlombok.agent" /> + <attribute name="Bundle-Version" value="${lombok.version}" /> + <attribute name="Automatic-Module-Name" value="org.projectlombok.agent" /> + </manifest> + <zipfileset dir="buildScripts/p2" includes="p2.inf" prefix="META-INF/" /> + <zipfileset dir="dist" includes="lombok-${lombok.version}.jar" fullpath="lombok.jar" /> + </jar> + + <length property="agent.zip.size" file="build/p2/plugins/org.projectlombok.agent_${lombok.version}.jar" /> + + <copy todir="build/p2" overwrite="true"> + <fileset dir="buildScripts/p2" includes="feature.xml" /> + <filterset> + <filter token="YEAR" value="${dt.year}" /> + <filter token="EPOCH_MILLIS" value="${dt.epochMillis}" /> + <filter token="VERSION" value="${lombok.version}" /> + </filterset> + </copy> + <zip destfile="build/p2/features/org.projectlombok.feature_${lombok.version}.jar" basedir="build/p2" includes="feature.xml" /> + <delete file="build/p2/feature.xml" /> + <length property="feature.zip.size" file="build/p2/features/org.projectlombok.feature_${lombok.version}.jar" /> + + <copy todir="build/p2" overwrite="true"> + <fileset dir="buildScripts/p2" includes="artifacts.xml,content.xml" /> + <filterset> + <filter token="YEAR" value="${dt.year}" /> + <filter token="EPOCH_MILLIS" value="${dt.epochMillis}" /> + <filter token="VERSION" value="${lombok.version}" /> + <filter token="FEATURE_ZIP_SIZE" value="${feature.zip.size}" /> + <filter token="AGENT_ZIP_SIZE" value="${agent.zip.size}" /> + </filterset> + </copy> + <zip destfile="build/p2/artifacts.jar" basedir="build/p2" includes="artifacts.xml" /> + <zip destfile="build/p2/content.jar" basedir="build/p2" includes="content.xml" /> + <delete file="build/p2/artifacts.xml" /> + <delete file="build/p2/content.xml" /> + </target> + + <target name="-set-epoch-millis"> + <mkdir dir="build/p2-support" /> + <echo file="build/p2-support/Epoch.java">public class Epoch {public static void main(String[] args) {System.out.print(System.currentTimeMillis());}}</echo> + <javac srcdir="build/p2-support" release="8" includeAntRuntime="false" destdir="build/p2-support" /> + <java classname="Epoch" classpath="build/p2-support" fork="false" outputproperty="dt.epochMillis" /> + </target> +</project> diff --git a/buildScripts/p2/artifacts.xml b/buildScripts/p2/artifacts.xml new file mode 100644 index 00000000..e712e87a --- /dev/null +++ b/buildScripts/p2/artifacts.xml @@ -0,0 +1,26 @@ +<?xml version='1.0' encoding='UTF-8'?> +<?artifactRepository version='1.1.0'?> +<repository name='Exported Repository' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1'> + <properties size='2'> + <property name='p2.timestamp' value='@EPOCH_MILLIS@'/> + <property name='p2.compressed' value='true'/> + </properties> + <mappings size='3'> + <rule filter='(& (classifier=osgi.bundle))' output='${repoUrl}/plugins/${id}_${version}.jar'/> + <rule filter='(& (classifier=binary))' output='${repoUrl}/binary/${id}_${version}'/> + <rule filter='(& (classifier=org.eclipse.update.feature))' output='${repoUrl}/features/${id}_${version}.jar'/> + </mappings> + <artifacts size='2'> + <artifact classifier='org.eclipse.update.feature' id='org.projectlombok.feature' version='@VERSION@'> + <properties size='2'> + <property name='download.contentType' value='application/zip'/> + <property name='download.size' value='@FEATURE_ZIP_SIZE@'/> + </properties> + </artifact> + <artifact classifier='osgi.bundle' id='org.projectlombok.agent' version='@VERSION@'> + <properties size='1'> + <property name='download.size' value='@AGENT_ZIP_SIZE@'/> + </properties> + </artifact> + </artifacts> +</repository> diff --git a/buildScripts/p2/content.xml b/buildScripts/p2/content.xml new file mode 100644 index 00000000..dd3a1e65 --- /dev/null +++ b/buildScripts/p2/content.xml @@ -0,0 +1,116 @@ +<?xml version='1.0' encoding='UTF-8'?> +<?metadataRepository version='1.2.0'?> +<repository name='Exported Repository' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1'> + <properties size='2'> + <property name='p2.timestamp' value='@EPOCH_MILLIS@'/> + <property name='p2.compressed' value='true'/> + </properties> + <units size='4'> + <unit id='org.projectlombok' version='@VERSION@'> + <properties size='2'> + <property name='org.eclipse.equinox.p2.name' value='Lombok'/> + <property name='org.eclipse.equinox.p2.type.category' value='true'/> + </properties> + <provides size='1'> + <provided namespace='org.eclipse.equinox.p2.iu' name='org.projectlombok' version='@VERSION@'/> + </provides> + <requires size='1'> + <required namespace='org.eclipse.equinox.p2.iu' name='org.projectlombok.feature.feature.group' range='[@VERSION@,@VERSION@]'/> + </requires> + <touchpoint id='null' version='0.0.0'/> + </unit> + <unit id='org.projectlombok.feature.feature.jar' version='@VERSION@'> + <properties size='3'> + <property name='org.eclipse.equinox.p2.name' value='Lombok'/> + <property name='org.eclipse.equinox.p2.description' value='Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java. Never write another getter or equals method again, with one annotation your class has a fully featured builder, automate your logging variables, and much more.'/> + <property name='org.eclipse.equinox.p2.description.url' value='https://projectlombok.org'/> + </properties> + <provides size='3'> + <provided namespace='org.eclipse.equinox.p2.iu' name='org.projectlombok.feature.feature.jar' version='@VERSION@'/> + <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/> + <provided namespace='org.eclipse.update.feature' name='org.projectlombok.feature' version='@VERSION@'/> + </provides> + <filter> + (org.eclipse.update.install.features=true) + </filter> + <artifacts size='1'> + <artifact classifier='org.eclipse.update.feature' id='org.projectlombok.feature' version='@VERSION@'/> + </artifacts> + <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/> + <touchpointData size='1'> + <instructions size='1'> + <instruction key='zipped'> + true + </instruction> + </instructions> + </touchpointData> + <licenses size='1'> + <license uri='https://raw.githubusercontent.com/rzwitserloot/lombok/master/LICENSE' url='https://raw.githubusercontent.com/rzwitserloot/lombok/master/LICENSE'> + Copyright (C) 2009-@YEAR@ The Project Lombok Authors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. + </license> + </licenses> + </unit> + <unit id='org.projectlombok.agent' version='@VERSION@' singleton='false'> + <update id='org.projectlombok.agent' range='[0.0.0,@VERSION@)' severity='0'/> + <properties size='1'> + <property name='org.eclipse.equinox.p2.name' value='Lombok Agent'/> + </properties> + <provides size='4'> + <provided namespace='org.eclipse.equinox.p2.iu' name='org.projectlombok.agent' version='@VERSION@'/> + <provided namespace='osgi.bundle' name='org.projectlombok.agent' version='@VERSION@'/> + <provided namespace='osgi.identity' name='org.projectlombok.agent' version='@VERSION@'> + <properties size='1'> + <property name='type' value='osgi.bundle'/> + </properties> + </provided> + <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/> + </provides> + <artifacts size='1'> + <artifact classifier='osgi.bundle' id='org.projectlombok.agent' version='@VERSION@'/> + </artifacts> + <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/> + <touchpointData size='1'> + <instructions size='4'> + <instruction key='uninstall'> + org.eclipse.equinox.p2.touchpoint.eclipse.removeJvmArg(jvmArg:-javaagent:${artifact.location}/lombok.jar); + </instruction> + <instruction key='zipped'> + true + </instruction> + <instruction key='install'> + org.eclipse.equinox.p2.touchpoint.eclipse.addJvmArg(jvmArg:-javaagent:${artifact.location}/lombok.jar);org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/lombok.eclipse.agent.jar); + </instruction> + <instruction key='manifest'> + Bundle-SymbolicName: org.projectlombok.agent
Bundle-Version: @VERSION@ + </instruction> + </instructions> + </touchpointData> + </unit> + <unit id='org.projectlombok.feature.feature.group' version='@VERSION@' singleton='false'> + <update id='org.projectlombok.feature.feature.group' range='[0.0.0,@VERSION@)' severity='0'/> + <properties size='4'> + <property name='org.eclipse.equinox.p2.name' value='Lombok'/> + <property name='org.eclipse.equinox.p2.description' value='Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java. Never write another getter or equals method again, with one annotation your class has a fully featured builder, automate your logging variables, and much more.'/> + <property name='org.eclipse.equinox.p2.description.url' value='https://projectlombok.org'/> + <property name='org.eclipse.equinox.p2.type.group' value='true'/> + </properties> + <provides size='1'> + <provided namespace='org.eclipse.equinox.p2.iu' name='org.projectlombok.feature.feature.group' version='@VERSION@'/> + </provides> + <requires size='2'> + <required namespace='org.eclipse.equinox.p2.iu' name='org.projectlombok.agent' range='[@VERSION@,@VERSION@]'/> + <required namespace='org.eclipse.equinox.p2.iu' name='org.projectlombok.feature.feature.jar' range='[@VERSION@,@VERSION@]'> + <filter> + (org.eclipse.update.install.features=true) + </filter> + </required> + </requires> + <touchpoint id='null' version='0.0.0'/> + <licenses size='1'> + <license uri='https://raw.githubusercontent.com/rzwitserloot/lombok/master/LICENSE' url='https://raw.githubusercontent.com/rzwitserloot/lombok/master/LICENSE'> + Copyright (C) 2009-@YEAR@ The Project Lombok Authors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. + </license> + </licenses> + </unit> + </units> +</repository> diff --git a/buildScripts/p2/feature.xml b/buildScripts/p2/feature.xml new file mode 100644 index 00000000..f5d08c4d --- /dev/null +++ b/buildScripts/p2/feature.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<feature + id="org.projectlombok.feature" + label="Lombok" + version="@VERSION@"> + + <description url="https://projectlombok.org"> + Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java. Never write another getter or equals method again, with one annotation your class has a fully featured builder, automate your logging variables, and much more. + </description> + + <license url="https://raw.githubusercontent.com/rzwitserloot/lombok/master/LICENSE"> + Copyright (C) 2009-@YEAR@ The Project Lombok Authors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + </license> + + <plugin + id="org.projectlombok.agent" + download-size="0" + install-size="0" + version="@VERSION@"/> + +</feature> diff --git a/buildScripts/p2/p2.inf b/buildScripts/p2/p2.inf new file mode 100644 index 00000000..8fe5b1e2 --- /dev/null +++ b/buildScripts/p2/p2.inf @@ -0,0 +1,6 @@ +instructions.install=\ +org.eclipse.equinox.p2.touchpoint.eclipse.addJvmArg(jvmArg:-javaagent:${artifact.location}/lombok.jar);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/lombok.eclipse.agent.jar); + +instructions.uninstall=\ +org.eclipse.equinox.p2.touchpoint.eclipse.removeJvmArg(jvmArg:-javaagent:${artifact.location}/lombok.jar); diff --git a/buildScripts/website.ant.xml b/buildScripts/website.ant.xml index b14ee89e..b6212b37 100644 --- a/buildScripts/website.ant.xml +++ b/buildScripts/website.ant.xml @@ -1,5 +1,5 @@ <!-- - Copyright (C) 2010-2014 The Project Lombok Authors. + Copyright (C) 2010-2020 The Project Lombok Authors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -25,6 +25,8 @@ This buildfile is part of projectlombok.org. It is responsible for building the such as applying the templates to produce the website, converting the changelog into HTML, and creating javadoc. </description> + <taskdef classpath="lib/ivyplusplus.jar" resource="com/zwitserloot/ivyplusplus/antlib.xml" uri="antlib:com.zwitserloot.ivyplusplus" /> + <path id="build.path"> <fileset dir="lib/build"> <include name="**/*.jar" /> @@ -240,7 +242,23 @@ such as applying the templates to produce the website, converting the changelog <target name="-requires-ssh" unless="ssh.username"> <fail>ssh.username and ssh.keyfile should be set.</fail> </target> - + + <target name="deploy-p2" depends="-requires-ssh"> + <ivy:scpUpload + from="dist/eclipse-p2.tar.bz2" + to="/data/lombok/staging" + server="projectlombok.org" + username="${ssh.username}" + keyfile="${ssh.keyfile}" + knownHosts="ssh.knownHosts" /> + <ivy:sshExec + cmd="/data/lombok/stagingCmd/deployP2" + server="projectlombok.org" + username="${ssh.username}" + keyfile="${ssh.keyfile}" + knownHosts="ssh.knownHosts" /> + </target> + <target name="edgeRelease" depends="-requires-ssh, edgeRelease-build"> <ivy:scpUpload from="dist/website-edge.tar.bz2" |