Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.epp.packaging.core/.classpath7
-rw-r--r--plugins/org.eclipse.epp.packaging.core/.project28
-rw-r--r--plugins/org.eclipse.epp.packaging.core/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.epp.packaging.core/META-INF/MANIFEST.MF23
-rw-r--r--plugins/org.eclipse.epp.packaging.core/about.html17
-rw-r--r--plugins/org.eclipse.epp.packaging.core/build.properties7
-rw-r--r--plugins/org.eclipse.epp.packaging.core/epp.33.product54
-rw-r--r--plugins/org.eclipse.epp.packaging.core/plugin.properties16
-rw-r--r--plugins/org.eclipse.epp.packaging.core/plugin.xml27
-rw-r--r--plugins/org.eclipse.epp.packaging.core/skeletons/customTargetsStub.xml18
-rw-r--r--plugins/org.eclipse.epp.packaging.core/skeletons/packager.properties122
-rw-r--r--plugins/org.eclipse.epp.packaging.core/skeletons/packagingStub.properties37
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/Activator.java60
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/EclipsePackagingExecutor.java94
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/PackagingApplication.java58
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/CustomTargetsWriter.java116
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/EclipsePackager.java164
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/IPackager.java29
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/MapFileWriter.java95
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/PackageMover.java77
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/PackagerRunner.java136
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/PackagingPropertiesWriter.java80
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/PluginUtils.java52
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/ArchiveFormat.java46
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/ArgumentParser.java37
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/Commands.java48
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/FeatureVersionRepository.java99
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/ICommands.java23
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/IModifiablePackagerConfiguration.java50
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/IPackagerConfiguration.java49
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/IPlatform.java54
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/PackagerConfiguration.java227
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/Platform.java138
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/Task.java23
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/xml/ConfigurationParser.java217
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/xml/IXmlElement.java48
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/xml/XMLDocument.java76
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/xml/XmlElement.java60
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/ExtensionSiteManager.java57
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/FeatureRetrievingSearchCollector.java40
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/FeatureSearcher.java55
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/FeatureVerifyingSearchCollector.java53
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/IUpdateSiteManager.java35
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/PackagerSearchCategory.java45
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/PackagerSearchQuery.java62
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/SiteCreator.java64
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/UpdateSiteManager.java70
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/io/FileUtils.java83
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/io/Zip.java146
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/logging/Logger.java77
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/logging/MessageLogger.java64
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/logging/Messages.java57
-rw-r--r--plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/logging/messages.properties16
-rw-r--r--test/org.eclipse.epp.packaging.core.test/.classpath7
-rw-r--r--test/org.eclipse.epp.packaging.core.test/.project29
-rw-r--r--test/org.eclipse.epp.packaging.core.test/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--test/org.eclipse.epp.packaging.core.test/META-INF/MANIFEST.MF12
-rw-r--r--test/org.eclipse.epp.packaging.core.test/build.properties6
-rw-r--r--test/org.eclipse.epp.packaging.core.test/plugin.properties14
-rw-r--r--test/org.eclipse.epp.packaging.core.test/resources/test/singleentryfile1
-rw-r--r--test/org.eclipse.epp.packaging.core.test/resources/test/updatesite/features/org.eclipse.buckminster.core.feature_1.0.0.v20070205.jarbin16332 -> 0 bytes
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/DummyPackagerConfiguration.java106
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/assembly/PluginUtils_PdeTest.java26
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/CommandLineParser_Test.java56
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/Platform_Test.java47
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/xml/ConfigurationParser_PdeTest.java104
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/download/SiteCreator_PdeTest.java62
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/download/UpdateSiteManager_PdeTest.java65
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/io/FileUtils_Test.java47
-rw-r--r--test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/io/Zip_Test.java71
70 files changed, 0 insertions, 4103 deletions
diff --git a/plugins/org.eclipse.epp.packaging.core/.classpath b/plugins/org.eclipse.epp.packaging.core/.classpath
deleted file mode 100644
index 304e8618..00000000
--- a/plugins/org.eclipse.epp.packaging.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <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.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.epp.packaging.core/.project b/plugins/org.eclipse.epp.packaging.core/.project
deleted file mode 100644
index b5688ecf..00000000
--- a/plugins/org.eclipse.epp.packaging.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.epp.packaging.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.epp.packaging.core/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.epp.packaging.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 19f7f8ff..00000000
--- a/plugins/org.eclipse.epp.packaging.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Tue Mar 27 17:07:43 CEST 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/org.eclipse.epp.packaging.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.epp.packaging.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 84542103..00000000
--- a/plugins/org.eclipse.epp.packaging.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-SymbolicName: org.eclipse.epp.packaging.core;singleton:=true
-Bundle-Version: 0.5.0.qualifier
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ant.core,
- org.eclipse.update.core,
- org.eclipse.pde.build,
- org.apache.ant
-Export-Package: org.eclipse.epp.packaging.core,
- org.eclipse.epp.packaging.core.assembly,
- org.eclipse.epp.packaging.core.configuration,
- org.eclipse.epp.packaging.core.configuration.xml,
- org.eclipse.epp.packaging.core.download,
- org.eclipse.epp.packaging.core.io,
- org.eclipse.epp.packaging.core.logging
-Eclipse-LazyStart: true
-Bundle-Activator: org.eclipse.epp.packaging.core.Activator
-
diff --git a/plugins/org.eclipse.epp.packaging.core/about.html b/plugins/org.eclipse.epp.packaging.core/about.html
deleted file mode 100644
index 94df2f61..00000000
--- a/plugins/org.eclipse.epp.packaging.core/about.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<h3>About This Content</h3>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content").
-Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor’s license
-that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/build.properties b/plugins/org.eclipse.epp.packaging.core/build.properties
deleted file mode 100644
index bc3b0f2b..00000000
--- a/plugins/org.eclipse.epp.packaging.core/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- about.html
diff --git a/plugins/org.eclipse.epp.packaging.core/epp.33.product b/plugins/org.eclipse.epp.packaging.core/epp.33.product
deleted file mode 100644
index 6630be6f..00000000
--- a/plugins/org.eclipse.epp.packaging.core/epp.33.product
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.1"?>
-
-<product name="EPP Packaging" id="org.eclipse.epp.packaging.core.EPP" application="org.eclipse.epp.packaging.core.application" useFeatures="false">
-
-
- <configIni use="default"/>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <windowImages/>
-
-
- <launcher>
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="com.ibm.icu36.data.update" fragment="true"/>
- <plugin id="javax.servlet"/>
- <plugin id="org.apache.ant"/>
- <plugin id="org.eclipse.ant.core"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.net"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.core.runtime.compatibility"/>
- <plugin id="org.eclipse.core.runtime.compatibility.auth"/>
- <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
- <plugin id="org.eclipse.core.variables"/>
- <plugin id="org.eclipse.epp.packaging.core"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.pde.build"/>
- <plugin id="org.eclipse.update.configurator"/>
- <plugin id="org.eclipse.update.core"/>
- <plugin id="org.eclipse.update.core.linux" fragment="true"/>
- </plugins>
-
-</product>
diff --git a/plugins/org.eclipse.epp.packaging.core/plugin.properties b/plugins/org.eclipse.epp.packaging.core/plugin.properties
deleted file mode 100644
index abf9d3ae..00000000
--- a/plugins/org.eclipse.epp.packaging.core/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 Innoopract Informationssysteme GmbH
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Innoopract - initial API and implementation
-###############################################################################
-
-# properties file for org.eclipse.epp.packaging.core
-Bundle-Vendor = Eclipse.org
-Bundle-Name = EPP Packaging Core
-
-product.name = EPP \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/plugin.xml b/plugins/org.eclipse.epp.packaging.core/plugin.xml
deleted file mode 100644
index da7d34c6..00000000
--- a/plugins/org.eclipse.epp.packaging.core/plugin.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
- <extension
- id="application"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.epp.packaging.core.PackagingApplication">
- </run>
- </application>
- </extension>
- <extension
- id="EPP"
- point="org.eclipse.core.runtime.products">
- <product
- application="application"
- name="EPP Packaging">
- <property
- name="appName"
- value="EPP Packaging">
- </property>
- </product>
- </extension>
-
-</plugin>
diff --git a/plugins/org.eclipse.epp.packaging.core/skeletons/customTargetsStub.xml b/plugins/org.eclipse.epp.packaging.core/skeletons/customTargetsStub.xml
deleted file mode 100644
index 483a3534..00000000
--- a/plugins/org.eclipse.epp.packaging.core/skeletons/customTargetsStub.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<project name="Custom Targets MyTest" default="noDefault">
-
- <target name="noDefault" />
-
- <!-- This goal of this target is to get the packaging map files of the things you care for
- The files must be fetched into the downloadDirectory folder -->
- <target name="getMapFiles" unless="localMaps">
- <!-- if packagerMapURL is not set
- <get src="${packagerMapURL}" dest="${downloadDirectory}/initial.map" usetimestamp="true" />
- -->
- </target>
-
- <target name="init">
- <property name="archiveNamePrefix" value="${buildId}" />
- </target>
-
- <!-- This file is a stub. It will be completed by EPP at runtime. -->
-
diff --git a/plugins/org.eclipse.epp.packaging.core/skeletons/packager.properties b/plugins/org.eclipse.epp.packaging.core/skeletons/packager.properties
deleted file mode 100644
index 3b591f8b..00000000
--- a/plugins/org.eclipse.epp.packaging.core/skeletons/packager.properties
+++ /dev/null
@@ -1,122 +0,0 @@
-#This file is adapted to the needs of the Eclipse Packaging Project.
-#Do not modify.
-
-#The directory used as a base for the all process
-# Provided by EPP.
-#baseDirectory = <folder>
-
-#Setting this to true will cause the dependency analysis to only be done on the features and plugins reachable from the ${featureList}.
-filteredDependencyCheck=false
-
-# A comma separated list of feature ids that will be part of the archive.
-# Provided by EPP.
-#featureList = <featuresToGather>
-
-# The list of {os, ws, arch} configurations to build. This
-# value is a '&' separated list of ',' separate triples.
-# By default the value is *,*,* which is platform independant
-# Provided by EPP.
-#config=win32, win32, x86 & \
-# linux, gtk, ppc &\
-# linux, gtk, x86 & \
-# linux, gtk, x86_64 & \
-# linux, motif, x86 & \
-# solaris, motif, sparc & \
-# solaris, gtk, sparc & \
-# aix, motif, ppc & \
-# hpux, motif, PA_RISC & \
-# macosx, carbon, ppc
-
-#Set this variable to normalize plug-in and feature names while packaging
-normalizeWhilePackaging=true
-
-################ DOWNLOAD ############################
-#Skip any download and unzipping work because the things to be packaged are already available in ${target}
-#Comment the property if you want the download and unzip to occur.
-#prefilledTarget = true
-
-#Don't download packager map files, they should already exist in ${downloadDirectory}
-#comment out this property to download the map file from packagerMapURL
-#skipMaps = true
-#localMaps = true
-#The URL from which to download the packager map file. If more than one file needs to be downloaded, edit the getMapFiles target in your customTargets.xml
-#packagerMapURL =
-
-#Don't download the archives.
-#skipFetch = true
-
-# A comma seperated list of the component from which the features listed in featureList can be found
-# This is used as a optimization to avoid unnecessary downloads.
-# * should be specified if you don't know
-componentFilter=*
-
-# A comma separated list of filters used to optimize the download of archives.
-#Values in this filter should match the
-contentFilter=sdk
-
-
-################ FOLDERS ############################
-# The place in which all the scripts will be contained
-workingDirectory = ${baseDirectory}/workingPlace
-buildDirectory = ${workingDirectory}
-
-# The folder in which all the zips will be downloaded
-downloadDirectory = ${baseDirectory}/toPackage
-
-# The folder where all the operations are being done
-tempDirectory = ${baseDirectory}/temp
-
-# The place in which the zips are located
-sourceFolder = ${downloadDirectory}
-
-################# SOURCES ###########################
-# The name of the root of the archives downloaded. Features and plug-ins will be looked for
-# in ${tempDirectory}/${featurePaths}/features and ${tempDirectory}/${featurePaths}/plugins
-# It is possible to specify a list of roots, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=143854 for details.
-#featurePaths = eclipse
-
-# A comma separated lists of places where plugins and features will be looked for
-target = ${tempDirectory}/eclipse
-
-
-################## MISC ##########################
-# This controls the build id in the default name of the archive
-buildId=EclipsePackagerBuild
-
-# Type of build. Used in naming the build output. Typically this value is
-# one of I, N, M, S, ...
-buildType=I
-
-#Set the name of the archive that will result from the product build.
-#archiveNamePrefix =RCP
-
-# Label for the build. Used in naming the build output
-buildLabel=${buildType}.${buildId}
-
-#The format of the archive. By default a zip is created using antZip.
-# Provided by EPP.
-#archivesFormat=win32, win32, x86 - antZip& \
-# linux, gtk, ppc - antZip &\
-# linux, gtk, x86 - antZip& \
-# linux, gtk, x86_64 - antZip& \
-# linux, motif, x86 - antZip& \
-# solaris, motif, sparc - antZip& \
-# solaris, gtk, sparc - antZip& \
-# aix, motif, ppc - antZip& \
-# hpux, motif, PA_RISC - antZip& \
-# macosx, carbon, ppc - antZip
-
-# extra arguments to be passed to zip / unzip (-y is usually used on unix for zip)
-zipargs=
-unzipArgs=
-
-# the prefix in the archive
-archivePrefix=eclipse
-
-# the folder in which the files that will be added to the archive will be placed
-collectingFolder=eclipse
-
-
-############### PACKAGING.PROPERTIES #############################
-# a relative path to the file containing the properties for element to package
-packagingProperties = packaging.properties
diff --git a/plugins/org.eclipse.epp.packaging.core/skeletons/packagingStub.properties b/plugins/org.eclipse.epp.packaging.core/skeletons/packagingStub.properties
deleted file mode 100644
index 01ed1f12..00000000
--- a/plugins/org.eclipse.epp.packaging.core/skeletons/packagingStub.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# The chmod and links must indicate a path relative to the root directory.
-
-# This file was modified for the Eclipse Packaging Project. Although it is ready-to-run
-# additional entries will be added at runtime.
-
-# List the files and folders to be copied into the root of eclipse for all platform
-# configurations
-root=epl-v10.html, notice.html, configuration/, startup.jar, .eclipseproduct, eclipse.ini, readme/
-root.permissions.755=eclipse,*.so*
-root.macosx.carbon.ppc.permissions.755=Eclipse.app/Contents/MacOS/eclipse
-root.macosx.carbon.x86.permissions.755=Eclipse.app/Contents/MacOS/eclipse
-
-root.win32.win32.x86=eclipse.exe,eclipsec.exe
-root.linux.motif.x86=eclipse,libcairo-swt.so,libXm.so.2,about_files/,about.html,icon.xpm
-root.linux.gtk.x86=eclipse,libcairo-swt.so,about_files/,about.html,icon.xpm
-root.linux.gtk.x86_64=eclipse,libcairo-swt.so,about_files/,about.html,icon.xpm
-root.linux.gtk.ppc=eclipse
-root.macosx.carbon.ppc=eclipse,Eclipse.app/
-root.macosx.carbon.ppc.link=Eclipse.app/Contents/MacOS/eclipse,eclipse,../../../MacOS,Eclipse.app/Contents/Resources/Splash.app/Contents/MacOS
-root.macosx.carbon.x86=eclipse,Eclipse.app/
-root.macosx.carbon.x86.link=Eclipse.app/Contents/MacOS/eclipse,eclipse,../../../MacOS,Eclipse.app/Contents/Resources/Splash.app/Contents/MacOS
-root.aix.motif.ppc=eclipse
-root.hpux.motif.PA_RISC=eclipse
-root.solaris.gtk.sparc=eclipse,Eclipse.l.pm,Eclipse.m.pm,Eclipse.s.pm,Eclipse.t.pm
-
-# EPP generated content follows here
-
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/Activator.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/Activator.java
deleted file mode 100644
index a8e554fb..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/Activator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
- /** The plug-in ID */
- public static final String PLUGIN_ID = "org.eclipse.epp.packaging.core"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- // do nothing
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- public void start( final BundleContext context ) throws Exception {
- super.start( context );
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop( final BundleContext context ) throws Exception {
- plugin = null;
- super.stop( context );
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/EclipsePackagingExecutor.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/EclipsePackagingExecutor.java
deleted file mode 100644
index aad9c642..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/EclipsePackagingExecutor.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.epp.packaging.core.assembly.EclipsePackager;
-import org.eclipse.epp.packaging.core.assembly.IPackager;
-import org.eclipse.epp.packaging.core.assembly.PackageMover;
-import org.eclipse.epp.packaging.core.configuration.ICommands;
-import org.eclipse.epp.packaging.core.configuration.IPackagerConfiguration;
-import org.eclipse.epp.packaging.core.configuration.Task;
-import org.eclipse.epp.packaging.core.download.ExtensionSiteManager;
-import org.eclipse.epp.packaging.core.download.IUpdateSiteManager;
-import org.eclipse.epp.packaging.core.download.UpdateSiteManager;
-import org.eclipse.epp.packaging.core.logging.MessageLogger;
-
-/**
- * The main class, independent from the creation of the configuration and less
- * dependent on the application/platform runnable
- */
-public class EclipsePackagingExecutor {
-
- private final ICommands commands;
- private final IPackagerConfiguration configuration;
-
- public EclipsePackagingExecutor( final ICommands commands,
- final IPackagerConfiguration configuration )
- {
- this.commands = commands;
- this.configuration = configuration;
- }
-
- /**
- * Run the packaging process
- * @throws URISyntaxException
- */
- public void execute() throws CoreException, IOException, URISyntaxException {
- MessageLogger logger = MessageLogger.getInstance();
- logger.log( "Application.FeatureCount", //$NON-NLS-1$
- Integer.valueOf( this.configuration.getRequiredFeatures().length ) );
- boolean doCheckOrInstall = this.commands.mustDo( Task.CHECK )
- || this.commands.mustDo( Task.INSTALL );
- if( doCheckOrInstall ) {
- IUpdateSiteManager manager
- = new UpdateSiteManager( this.configuration );
- boolean areFeaturesPresent
- = manager.areFeaturesPresent( this.configuration.getRequiredFeatures() );
- if( areFeaturesPresent ) {
- if( this.commands.mustDo( Task.INSTALL ) ) {
- install( manager );
- }
- build();
- }
- } else {
- build();
- }
- }
-
- private void build() throws IOException, CoreException, URISyntaxException {
- if( this.commands.mustDo( Task.BUILD ) ) {
- MessageLogger.getInstance().logBeginProcess( "Application.Building" ); //$NON-NLS-1$
- IPackager packager = new EclipsePackager( this.configuration );
- packager.packApplication();
- PackageMover mover = new PackageMover( this.configuration );
- mover.moveFiles();
- MessageLogger.getInstance().logEndProcess();
- }
- }
-
- /**
- * Installs all requested features from the update sites to an extension
- * location.
- */
- private void install( final IUpdateSiteManager manager )
- throws IOException, CoreException
- {
- MessageLogger.getInstance().logBeginProcess( "Application.Installing" ); //$NON-NLS-1$
- ExtensionSiteManager extensionSiteManager
- = new ExtensionSiteManager( this.configuration );
- extensionSiteManager.installFeatures( manager );
- MessageLogger.getInstance().logEndProcess();
- }
-}
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/PackagingApplication.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/PackagingApplication.java
deleted file mode 100644
index 69320ace..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/PackagingApplication.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core;
-
-import java.util.Map;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.epp.packaging.core.configuration.ArgumentParser;
-import org.eclipse.epp.packaging.core.configuration.ICommands;
-import org.eclipse.epp.packaging.core.configuration.IPackagerConfiguration;
-import org.eclipse.epp.packaging.core.configuration.xml.ConfigurationParser;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-
-/**
- * Main entry point for the EPP packager.
- */
-public class PackagingApplication implements IApplication {
-
- public Object start( final IApplicationContext context ) throws Exception {
- Map<?, ?> arguments = context.getArguments();
- String[] args = ( String[] )arguments.get( IApplicationContext.APPLICATION_ARGS );
- ICommands commands = ArgumentParser.parse( args );
- ConfigurationParser configurationParser
- = new ConfigurationParser( commands.getConfigurationFile() );
- IPackagerConfiguration configuration
- = configurationParser.parseConfiguration();
- IStatus checkFeaturesResult
- = configuration.checkFeatures( new NullProgressMonitor() );
-
- IStatus[] status = checkFeaturesResult.getChildren();
- for( IStatus singleStatus : status ) {
- System.out.println( singleStatus.getMessage() );
- }
-
- if( checkFeaturesResult.getSeverity() == IStatus.OK
- || checkFeaturesResult.getSeverity() == IStatus.INFO
- || checkFeaturesResult.getSeverity() == IStatus.WARNING ) {
- EclipsePackagingExecutor packagingExecutor
- = new EclipsePackagingExecutor( commands, configuration );
- packagingExecutor.execute();
- }
- return EXIT_OK;
- }
-
- public void stop() {
- // nothing to stop here...
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/CustomTargetsWriter.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/CustomTargetsWriter.java
deleted file mode 100644
index 3ea9b0db..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/CustomTargetsWriter.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.assembly;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.epp.packaging.core.Activator;
-import org.eclipse.epp.packaging.core.configuration.IPackagerConfiguration;
-import org.eclipse.epp.packaging.core.configuration.IPlatform;
-import org.eclipse.epp.packaging.core.io.FileUtils;
-import org.osgi.framework.Bundle;
-
-/**
- * Completes the custom targets stub to form a customtargets.xml ant file.
- * The targets added define the output files for each platform.
- */
-public class CustomTargetsWriter {
-
- private static final String SKELETONS_DIRECTORY = "skeletons/"; //$NON-NLS-1$
- private final PrintWriter writer;
- private final IPackagerConfiguration configuration;
-
- /**
- * TODO mknauer missing doc
- * @param configuration
- * @param baseFile
- * @throws IOException
- * @throws URISyntaxException
- */
- public CustomTargetsWriter( final IPackagerConfiguration configuration,
- final String baseFile )
- throws IOException, URISyntaxException
- {
- this.configuration = configuration;
-
- IPath path = new Path( SKELETONS_DIRECTORY + baseFile );
- Bundle bundle = Activator.getDefault().getBundle();
- URL url = FileLocator.find( bundle, path, null );
- URL fileURL = FileLocator.toFileURL( url );
- File stubFile = new File( fileURL.toURI() );
-
- File customTargetsFile = new File( configuration.getPackagerConfigurationFolder(),
- "customTargets.xml" ); //$NON-NLS-1$
- FileUtils.copy( stubFile, customTargetsFile );
- FileOutputStream stream = new FileOutputStream( customTargetsFile, true );
- this.writer = new PrintWriter( stream );
- }
-
- /**
- * TODO mknauer missing doc
- * @param platform
- */
- public void addTargetFileForPlatform( final IPlatform platform ) {
- this.writer.append( " <target name=\"assemble." //$NON-NLS-1$
- + platform.toString( '.' )
- + ".xml\" depends=\"init\">\n" ); //$NON-NLS-1$
-
- this.writer.append( " <replaceregexp file=\"${tempDirectory}/" //$NON-NLS-1$
- + platform.toString( '.' )
- + "/eclipse/configuration/config.ini\"\n" ); //$NON-NLS-1$
- this.writer.append( " match=\"eclipse.product=(.*)\"\n" ); //$NON-NLS-1$
- this.writer.append( " replace=\"eclipse.product=" //$NON-NLS-1$
- + this.configuration.getEclipseProductId()
- + "\"\n" ); //$NON-NLS-1$
- this.writer.append( " byline=\"true\" />\n" ); //$NON-NLS-1$
-
- this.writer.append( " <replaceregexp byline=\"true\">\n" ); //$NON-NLS-1$
- this.writer.append( " <regexp pattern=\"org.eclipse.ui/defaultPerspectiveId=(.*)\"/>\n" ); //$NON-NLS-1$
- this.writer.append( " <substitution expression=\"org.eclipse.ui/defaultPerspectiveId=" //$NON-NLS-1$
- + this.configuration.getInitialPerspectiveId()
- + "\"/>\n" ); //$NON-NLS-1$
- this.writer.append( " <fileset dir=\"${tempDirectory}/eclipse/plugins/\" includes=\"" //$NON-NLS-1$
-// + this.configuration.getEclipseProductId()
- + "*/plugin_customization.ini\"/>\n" ); //$NON-NLS-1$
- this.writer.append( " </replaceregexp>\n" ); //$NON-NLS-1$
-
- this.writer.append( " <echo file=\"${tempDirectory}/" //$NON-NLS-1$
- + platform.toString( '.' )
- + platform.getEclipseIniFilePath()
- + "eclipse.ini\">" ); //$NON-NLS-1$
- this.writer.append( platform.getEclipseIniFileContent() );
- this.writer.append( " </echo>\n" ); //$NON-NLS-1$
-
- this.writer.append( " <ant antfile=\"${assembleScriptName}\" >\n" ); //$NON-NLS-1$
- this.writer.append( " <property name=\"archiveName\" value=\"" //$NON-NLS-1$
- + platform.getTargetFileName( this.configuration )
- + platform.getArchiveFormat().getExtension()
- + "\"/>\n" ); //$NON-NLS-1$
- this.writer.append( " </ant>\n" ); //$NON-NLS-1$
- this.writer.append( " </target>\n" ); //$NON-NLS-1$
- }
-
- /**
- * TODO mknauer missing doc
- */
- public void close() {
- this.writer.append( "</project>\n" ); //$NON-NLS-1$
- this.writer.close();
- }
-}
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/EclipsePackager.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/EclipsePackager.java
deleted file mode 100644
index 3045076a..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/EclipsePackager.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.assembly;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.epp.packaging.core.Activator;
-import org.eclipse.epp.packaging.core.configuration.IPackagerConfiguration;
-import org.eclipse.epp.packaging.core.configuration.IPlatform;
-import org.eclipse.epp.packaging.core.io.FileUtils;
-import org.eclipse.epp.packaging.core.io.Zip;
-import org.eclipse.epp.packaging.core.logging.MessageLogger;
-import org.eclipse.update.core.VersionedIdentifier;
-import org.osgi.framework.Bundle;
-
-/**
- * An IPackager using the main configuration as its argument.
- */
-public class EclipsePackager implements IPackager {
-
- private static final String PACKAGER_SKELETON_DIR
- = "skeletons/"; //$NON-NLS-1$
- private static final String PACKAGER_PROPERTIES_FILE
- = "packager.properties"; //$NON-NLS-1$
- private static final String CONFIGURED_FEATURES_ZIP
- = "ConfiguredFeatures.zip"; //$NON-NLS-1$
- private final PackagerRunner runner;
-
- /**
- * TODO mknauer missing doc
- * @param configuration
- * @throws IOException
- * @throws URISyntaxException
- */
- public EclipsePackager( final IPackagerConfiguration configuration )
- throws IOException, URISyntaxException
- {
- this.runner = new PackagerRunner();
- setFolders( configuration );
- setFeatures( configuration );
- configurePlatforms( configuration );
- prepareWorkingArea( configuration );
- }
-
- /**
- * Creates the map file in the workspace and clears the existing work area.
- *
- * @throws URISyntaxException
- */
- private void prepareWorkingArea( final IPackagerConfiguration configuration )
- throws IOException, URISyntaxException
- {
- FileUtils.deleteFile( new File( configuration.getTargetFolder(),
- "workingPlace" ) ); //$NON-NLS-1$
- MapFileWriter mapWriter = new MapFileWriter( configuration );
- PackagingPropertiesWriter propertiesWriter
- = new PackagingPropertiesWriter( configuration, "packagingStub.properties" ); //$NON-NLS-1$
- CustomTargetsWriter customTargetsWriter
- = new CustomTargetsWriter( configuration, "customTargetsStub.xml" ); //$NON-NLS-1$
-
- for( IPlatform platform : configuration.getTargetPlatforms() ) {
- mapWriter.addRootFileForPlatform( platform );
- propertiesWriter.addFileToOrder( platform.getRootFileName( configuration ) );
- customTargetsWriter.addTargetFileForPlatform( platform );
- }
-
- File sourceFolder = new File( configuration.getTargetFolder(), "src" ); //$NON-NLS-1$
- sourceFolder.mkdir();
- zipFeatures( sourceFolder, configuration );
- writeDataForCustomFile( CONFIGURED_FEATURES_ZIP,
- mapWriter,
- propertiesWriter );
- mapWriter.close();
- propertiesWriter.close();
- customTargetsWriter.close();
-
- IPath path = new Path( PACKAGER_SKELETON_DIR + PACKAGER_PROPERTIES_FILE );
- Bundle bundle = Activator.getDefault().getBundle();
- URL url = FileLocator.find( bundle, path, null );
- URL fileURL = FileLocator.toFileURL( url );
- File packagerPropertiesFile = new File( fileURL.toURI() );
- File destinationPPFile = new File( configuration.getPackagerConfigurationFolder(),
- PACKAGER_PROPERTIES_FILE );
- FileUtils.copy( packagerPropertiesFile, destinationPPFile );
- }
-
- private void writeDataForCustomFile( final String filename,
- final MapFileWriter mapWriter,
- final PackagingPropertiesWriter propertiesWriter )
- {
- mapWriter.addCustomFileForAllPlatforms( filename );
- propertiesWriter.addFileToOrder( filename );
- }
-
- /**
- * Zips the requested features from the extension location into a single file.
- */
- private void zipFeatures( final File parentFolder,
- final IPackagerConfiguration configuration )
- throws IOException
- {
- MessageLogger.getInstance().logBeginProcess( "Application.Packing" ); //$NON-NLS-1$
- Zip zip = new Zip( parentFolder, CONFIGURED_FEATURES_ZIP );
- zip.addFolder( configuration.getExtensionSite() );
- zip.close();
- MessageLogger.getInstance().logEndProcess();
- }
-
- /** Sets the required folder info. */
- private void setFolders( final IPackagerConfiguration configuration )
- throws IOException
- {
- String packagerConfiguration
- = configuration.getPackagerConfigurationFolder().getCanonicalPath();
- MessageLogger logger = MessageLogger.getInstance();
-
- logger.log( "EclipsePackager.ConfigurationFolder", packagerConfiguration ); //$NON-NLS-1$
- this.runner.setConfigurationFolder( packagerConfiguration );
-
- String targetFolder = configuration.getTargetFolder().getCanonicalPath();
- logger.log( "EclipsePackager.TargetFolder", targetFolder ); //$NON-NLS-1$
- this.runner.setBaseDirectory( targetFolder );
- }
-
- /** Sets the features to be included. */
- private void setFeatures( final IPackagerConfiguration configuration ) {
- for( VersionedIdentifier identifier : configuration.getRequiredFeatures() )
- {
- this.runner.addFeature( identifier.getIdentifier() );
- }
- }
-
- /** Configures the runner with platform information from configuration. */
- private void configurePlatforms( final IPackagerConfiguration configuration )
- {
- for( IPlatform platform : configuration.getTargetPlatforms() ) {
- String platformString = platform.toString();
- this.runner.addPlatform( platformString );
- String archiveFormatName = platform.getArchiveFormat().name();
- this.runner.setArchiveFormat( platformString, archiveFormatName );
- }
- }
-
- public void packApplication() throws CoreException, IOException {
- MessageLogger.getInstance().logBeginProcess( "EclipsePackager.Running" ); //$NON-NLS-1$
- this.runner.packApplication();
- MessageLogger.getInstance().logEndProcess();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/IPackager.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/IPackager.java
deleted file mode 100644
index 8a982d62..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/IPackager.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.assembly;
-
-import java.io.IOException;
-
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * Implementors know how to package an RCP Application.
- */
-public interface IPackager {
-
- /**
- * Begins the packing process.
- * TODO mknauer missing doc
- * @throws CoreException
- * @throws IOException
- */
- public void packApplication() throws CoreException, IOException;
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/MapFileWriter.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/MapFileWriter.java
deleted file mode 100644
index fa7f5022..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/MapFileWriter.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.assembly;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-
-import org.eclipse.epp.packaging.core.configuration.IPackagerConfiguration;
-import org.eclipse.epp.packaging.core.configuration.IPlatform;
-
-/**
- * Creates a packager map file in the workspace.
- */
-public class MapFileWriter {
-
- private final static String MAP_FILE_LINE_END = " | | sdk | eclipse\n"; //$NON-NLS-1$
- private final IPackagerConfiguration configuration;
- private final PrintWriter writer;
-
- /**
- * TODO mknauer missing doc
- * @param configuration
- * @throws IOException
- */
- public MapFileWriter( final IPackagerConfiguration configuration )
- throws IOException
- {
- this.configuration = configuration;
- File parent = new File( configuration.getTargetFolder(), "toPackage" ); //$NON-NLS-1$
- parent.mkdir();
- this.writer = new PrintWriter( new File( parent, "PackagerMap.map" ) ); //$NON-NLS-1$
- }
-
- /**
- * TODO mknauer missing doc
- * @param platform
- */
- public void addRootFileForPlatform( final IPlatform platform ) {
- String rootFileFolder = this.configuration.getRootFileFolder().toURI().toString();
- String rootFileName = platform.getRootFileName( this.configuration );
- this.writer.append( rootFileName + "=" //$NON-NLS-1$
- + rootFileFolder
- + " | " //$NON-NLS-1$
- + platform.toString()
- + MAP_FILE_LINE_END );
- }
-
- /**
- * Adds the given file name to the map. The file is expected to reside in the
- * 'src' folder in the workspace. It is designated as valid for all configured
- * platforms.
- *
- * TODO mknauer missing doc
- *
- * @param filename
- */
- public void addCustomFileForAllPlatforms( final String filename ) {
- File targetFolder = this.configuration.getTargetFolder();
- String sourceFolder = new File( targetFolder, "src" ).toURI().toString(); //$NON-NLS-1$
- this.writer.append( filename
- + "=" //$NON-NLS-1$
- + sourceFolder
- + " | " //$NON-NLS-1$
- + getAllPlatformsString()
- + MAP_FILE_LINE_END );
- }
-
- /**
- * TODO mknauer missing doc
- */
- public void close() {
- this.writer.close();
- }
-
- private String getAllPlatformsString() {
- StringBuilder builder = new StringBuilder();
- IPlatform[] platforms = this.configuration.getTargetPlatforms();
- for( int index = 0; index < platforms.length; index++ ) {
- builder.append( platforms[ index ].toString() );
- if( index < platforms.length - 1 ) {
- builder.append( '&' );
- }
- }
- return builder.toString();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/PackageMover.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/PackageMover.java
deleted file mode 100644
index f6678517..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/PackageMover.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.assembly;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-
-import org.eclipse.epp.packaging.core.configuration.IPackagerConfiguration;
-import org.eclipse.epp.packaging.core.configuration.IPlatform;
-import org.eclipse.epp.packaging.core.io.FileUtils;
-import org.eclipse.epp.packaging.core.logging.MessageLogger;
-
-/**
- * Moves the created packages from the packager's work directory to the main
- * folder specified in the configuration.
- */
-public class PackageMover {
-
- private final IPackagerConfiguration configuration;
-
- /**
- * TODO mknauer missing doc
- * @param configuration
- */
- public PackageMover( final IPackagerConfiguration configuration ) {
- this.configuration = configuration;
- }
-
- /**
- * TODO mknauer missing doc
- * Moves the created packages to their final location.
- * @throws IOException
- */
- public void moveFiles() throws IOException {
- MessageLogger.getInstance().logBeginProcess( "PackageMover.MovingFiles" ); //$NON-NLS-1$
- File packageLocation = new File( this.configuration.getTargetFolder(),
- "workingPlace/I.EclipsePackagerBuild" ); //$NON-NLS-1$
- for( IPlatform platform : this.configuration.getTargetPlatforms() ) {
- File applicationFile = findPlatformFile( packageLocation, platform );
- FileUtils.copy( applicationFile,
- new File( this.configuration.getTargetFolder(),
- applicationFile.getName() ) );
- }
- MessageLogger.getInstance().logEndProcess();
- }
-
- /** Returns the created package for the given platform. */
- private File findPlatformFile( final File packageLocation,
- final IPlatform platform )
- {
- final String name = platform.getTargetFileName( this.configuration )
- + platform.getArchiveFormat().getExtension();
- File[] files = packageLocation.listFiles( new FileFilter() {
-
- public boolean accept( final File file ) {
- return file.getName().equals( name );
- }
- } );
- if( files.length != 1 ) {
- throw new IllegalStateException( files.length
- + " packages found for " //$NON-NLS-1$
- + platform
- + ". There should be one, and only one." //$NON-NLS-1$
- );
- }
- return files[ 0 ];
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/PackagerRunner.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/PackagerRunner.java
deleted file mode 100644
index 8976e658..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/PackagerRunner.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.assembly;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.ant.core.AntRunner;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * An IPackager based on the PDE Build packager. Locates, configures and
- * executes the package.xml ant script
- */
-public class PackagerRunner implements IPackager {
-
- private static final String ARGUMENT_ARCHIVE_FORMATS = "archivesFormat"; //$NON-NLS-1$
- private static final String ARGUMENT_BASE_DIRECTORY = "baseDirectory";//$NON-NLS-1$
- private static final String ARGUMENT_CONFIGURATION_FOLDER = "packagingInfo";//$NON-NLS-1$
- private static final String ARGUMENT_FEATURE_LIST = "featureList";//$NON-NLS-1$
- private static final String ARGUMENT_PLATFORM_LIST = "config";//$NON-NLS-1$
- private static final String PDE_BUILD_PLUGIN_ID = "org.eclipse.pde.build";//$NON-NLS-1$
- private final List<String> features = new ArrayList<String>();
- private final List<String> platforms = new ArrayList<String>();
- private final List<String> formats = new ArrayList<String>();
-
- public void packApplication() throws CoreException, IOException {
- AntRunner runner = new AntRunner();
- String scriptLocation = PluginUtils.getPluginPath( PDE_BUILD_PLUGIN_ID )
- + "/scripts/package.xml";//$NON-NLS-1$
- runner.setBuildFileLocation( scriptLocation );
- addFeatureListToArguments();
- addPlatformListToArguments();
- addFormatListToArguments();
- runner.run();
- }
-
- /**
- * Prior to running the packager, convert the list of archive formats to an
- * argument string and add it to the list of arguments.
- */
- private void addFormatListToArguments() {
- addListToArguments( this.formats, '&', ARGUMENT_ARCHIVE_FORMATS );
- }
-
- /**
- * Prior to running the packager, convert the list of platforms to an argument
- * string and add it to the list of arguments.
- */
- private void addPlatformListToArguments() {
- addListToArguments( this.platforms, '&', ARGUMENT_PLATFORM_LIST );
- }
-
- /**
- * Prior to running the packager, convert the list of features to an argument
- * string and add it to the list of arguments.
- */
- private void addFeatureListToArguments() {
- addListToArguments( this.features, ',', ARGUMENT_FEATURE_LIST );
- }
-
- /**
- * Converts the source list to a string with the entries separated by
- * separator, then sets the result as a value for the argument.
- */
- private void addListToArguments( final List<String> sourceList,
- final char separator,
- final String argumentName )
- {
- StringBuilder builder = new StringBuilder();
- for( String feature : sourceList ) {
- builder.append( feature );
- builder.append( separator );
- }
- setArgument( argumentName, builder.toString() );
- }
-
- /**
- * Sets the configuration folder for the PDE packager. The folder must contain
- * packager.properties, packaging.properties and customTargets.xml.
- *
- * @param folder directory name
- */
- public void setConfigurationFolder( final String folder ) {
- setArgument( ARGUMENT_CONFIGURATION_FOLDER, folder );
- }
-
- /** Sets the working directory for the PDE packager.
- * @param folder directory name of the base directory
- */
- public void setBaseDirectory( final String folder ) {
- setArgument( ARGUMENT_BASE_DIRECTORY, folder );
- }
-
- /**
- * Adds a feature to the configured application.
- *
- * @param identifier The feature id.
- */
- public void addFeature( final String identifier ) {
- this.features.add( identifier );
- }
-
- /** Sets an argument for the AntRunner to use. */
- private void setArgument( final String key, final String value ) {
- System.setProperty( key, value );
- }
-
- /**
- * Adds a new target platform to the configuration.
- *
- * @param platform A comma-separated platform description (os,ws,arch).
- */
- public void addPlatform( final String platform ) {
- this.platforms.add( platform );
- }
-
- /**
- * Sets a platform's archive format.
- *
- * @param platform A comma-separated platform description - os,ws,arch.
- * @param format An archive format. Supported values are antZip, antTar, tar.
- */
- public void setArchiveFormat( final String platform, final String format ) {
- this.formats.add( platform + '-' + format );
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/PackagingPropertiesWriter.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/PackagingPropertiesWriter.java
deleted file mode 100644
index 4cbb6fe2..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/PackagingPropertiesWriter.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.assembly;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.epp.packaging.core.Activator;
-import org.eclipse.epp.packaging.core.configuration.IPackagerConfiguration;
-import org.eclipse.epp.packaging.core.io.FileUtils;
-import org.osgi.framework.Bundle;
-
-/**
- * Completes the packaging.properties file by adding the unzipOrder property.
- */
-public class PackagingPropertiesWriter {
-
- private static final String SKELETONS_PACKAGING_PROPERTIES = "skeletons/packagingStub.properties"; //$NON-NLS-1$
- private static final String UNZIP_ORDER_PROPERTY = "unzipOrder"; //$NON-NLS-1$
- private static final String PACKAGING_PROPERTIES_FILENAME = "packaging.properties"; //$NON-NLS-1$
- private final PrintWriter writer;
- private boolean firstName = true;
-
- /**
- * @param configuration
- * @param baseFile
- * @throws IOException
- * @throws URISyntaxException
- */
- public PackagingPropertiesWriter( final IPackagerConfiguration configuration,
- final String baseFile )
- throws IOException, URISyntaxException
- {
- IPath path = new Path( SKELETONS_PACKAGING_PROPERTIES );
- Bundle bundle = Activator.getDefault().getBundle();
- URL url = FileLocator.find( bundle, path, null );
- URL fileURL = FileLocator.toFileURL( url );
- File stubFile = new File( fileURL.toURI() );
-
- File packagingFile = new File( configuration.getPackagerConfigurationFolder(),
- PACKAGING_PROPERTIES_FILENAME );
- FileUtils.copy( stubFile, packagingFile );
- FileOutputStream stream = new FileOutputStream( packagingFile, true );
- this.writer = new PrintWriter( stream );
- this.writer.append( UNZIP_ORDER_PROPERTY + '=' );
- }
-
- /**
- * @param fileName
- */
- public void addFileToOrder( final String fileName ) {
- if( !this.firstName ) {
- this.writer.append( ',' );
- } else {
- this.firstName = false;
- }
- this.writer.append( fileName );
- }
-
- /**
- */
- public void close() {
- this.writer.close();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/PluginUtils.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/PluginUtils.java
deleted file mode 100644
index 39448ace..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/assembly/PluginUtils.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.assembly;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.osgi.service.datalocation.Location;
-
-/**
- * Utility class for Plugin-related tasks.
- */
-public class PluginUtils {
-
- /** Locates the given plugin in the install location.
- *
- * TODO mknauer missing doc
- * @param pluginId
- * @return plugin path
- * @throws IOException
- */
- // This could be done via SiteManager and featurereferences, if the
- // application was feature-based, not plugin-based.
- public static String getPluginPath( final String pluginId ) throws IOException {
- Location installLocation = Platform.getInstallLocation();
- String locationFile = installLocation.getURL().getFile();
- File file = new File( locationFile, "plugins" ); //$NON-NLS-1$
- String result = null;
- for( File pluginFile : file.listFiles() ) {
- if( pluginFile.getName().startsWith( pluginId ) ) {
- result = pluginFile.getCanonicalPath();
- }
- }
- if( result == null ) {
- throw new IllegalStateException( "Required plug-in " //$NON-NLS-1$
- + pluginId
- + " not found in folder " //$NON-NLS-1$
- + locationFile
- + "plugins." ); //$NON-NLS-1$
- }
- return result;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/ArchiveFormat.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/ArchiveFormat.java
deleted file mode 100644
index 2bad3484..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/ArchiveFormat.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration;
-
-/**
- * Enumerates the archive formats. "antTar" will not be available until
- * http://issues.apache.org/bugzilla/show_bug.cgi?id=39617 and
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=142792 are fixed.
- */
-public enum ArchiveFormat {
-
- /**
- * Archive format with the file extension <tt>.tar.gz</tt>.
- */
- tar {
-
- @Override
- public String getExtension() {
- return ".tar.gz"; //$NON-NLS-1$
- }
- },
-
- /**
- * Archive format with the file extension <tt>.zip</tt>.
- */
- antZip {
-
- @Override
- public String getExtension() {
- return ".zip"; //$NON-NLS-1$
- }
- };
-
- /**
- * @return the file extension that matches the archive format.
- */
- public abstract String getExtension();
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/ArgumentParser.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/ArgumentParser.java
deleted file mode 100644
index c3b26669..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/ArgumentParser.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration;
-
-/**
- * Parses the arguments given to the main application.
- */
-public class ArgumentParser {
-
- /**
- * @param args the argument vector as a String array
- * @return an initialised <code>ICommand</code> object with the parsed
- * command line options
- * @throws IllegalArgumentException if arguments is no array of strings.
- */
- public static ICommands parse( final String[] args ) {
- if( args == null || args.length == 0 ) {
- throw new IllegalArgumentException( "Argument must contain at least one value." ); //$NON-NLS-1$
- }
- Commands command = new Commands();
- command.setConfigurationFile( args[ 0 ] );
- if( args.length > 1 ) {
- String[] tasks = new String[ args.length - 1 ];
- System.arraycopy( args, 1, tasks, 0, tasks.length );
- command.setTasks( tasks );
- }
- return command;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/Commands.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/Commands.java
deleted file mode 100644
index 58811396..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/Commands.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Configurable default implementation of ICommands.
- */
-public class Commands implements ICommands {
-
- private File file;
- private Task[] tasks = Task.values();
-
- public File getConfigurationFile() {
- return file;
- }
-
- public void setConfigurationFile( final String fileName ) {
- this.file = new File( fileName );
- }
-
- public boolean mustDo( final Task task ) {
- boolean result = false;
- for( Task configuredTask : tasks ) {
- result |= configuredTask.equals( task );
- }
- return result;
- }
-
- public void setTasks( final String[] tasks ) {
- List<Task> taskList = new ArrayList<Task>();
- for( String task : tasks ) {
- taskList.add( Task.valueOf( task.toUpperCase() ) );
- }
- this.tasks = taskList.toArray( new Task[ taskList.size() ] );
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/FeatureVersionRepository.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/FeatureVersionRepository.java
deleted file mode 100644
index 68b637b5..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/FeatureVersionRepository.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.eclipse.update.core.VersionedIdentifier;
-import org.osgi.framework.Version;
-
-
-/**
- *
- */
-public class FeatureVersionRepository {
-
- private Map<String, VersionList> features = new HashMap<String, VersionList>();
-
- public void addVersionIdentifier( final VersionedIdentifier versionedIdentifier ) {
- String identifier = versionedIdentifier.getIdentifier();
- String version = versionedIdentifier.getVersion().toString();
-
- if( !this.features.containsKey( identifier ) ) {
- this.features.put( identifier, new VersionList() );
- }
- VersionList versionList = this.features.get( identifier );
- versionList.addVersion( version );
- }
-
- /**
- * Searches for the highest version number of a given feature or bundle,
- * identified by the identifier string.
- *
- * @param identifier of the feature
- * @return the highest available version number or <code>null</code> if the
- * identifier is not found.
- */
- public Version getHighestVersion( final String identifier ) {
- Version result = null;
- VersionList versionList = this.features.get( identifier );
- if( versionList != null ) {
- result = versionList.getHighestVersion();
- }
- return result;
- }
-
- /**
- * Checks if a given identifier is already in the list of available features.
- *
- * @param identifier String with the feature identifier.
- * @return <code>true</code> if the identifier is found in the list of
- * available features, <code>false</code> otherwise.
- */
- public boolean containsIdentifier( final String identifier ) {
- return this.features.containsKey( identifier );
- }
-
-
- /**
- * This class provides a modifiable list of
- * <code>PluginVersionIdentifier</code> and returns the highest possible
- * version number. Internally it uses the OSGi <code>Version</code>
- * implementation because of its <code>Comparable</code> interface.
- */
- class VersionList {
-
- private SortedSet<Version> versions = new TreeSet<Version>();
-
- /**
- * Adds a new version to the list of available versions if the version is
- * not yet included in the list.
- *
- * @param version the version that is to be added to the list
- */
- void addVersion( final String versionString ) {
- Version version = new Version( versionString );
- if( !this.versions.contains( version ) ) {
- this.versions.add( version );
- }
- }
-
- /**
- * @return the highest version number in the list
- */
- Version getHighestVersion() {
- return this.versions.last();
- }
- }
-}
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/ICommands.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/ICommands.java
deleted file mode 100644
index 4917c701..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/ICommands.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration;
-
-import java.io.File;
-
-/**
- * Object representation of arguments given to the program.
- */
-public interface ICommands {
-
- public File getConfigurationFile();
-
- public boolean mustDo( Task task );
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/IModifiablePackagerConfiguration.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/IModifiablePackagerConfiguration.java
deleted file mode 100644
index a158a1f8..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/IModifiablePackagerConfiguration.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration;
-
-import java.net.MalformedURLException;
-
-/**
- * A packager configuration that allows to modify its settings.
- */
-public interface IModifiablePackagerConfiguration
- extends IPackagerConfiguration
-{
-
- /**Adds an update site to the configuration.
- *
- * @param string A string containing the URL of the site.
- * @throws MalformedURLException if the URL is invalid.
- */
- public void addUpdateSite( final String string ) throws MalformedURLException;
-
- /**Adds the feature [id] with the given version to the list of required features.*/
- public void addRequiredFeature( final String id, final String version );
-
- /**Sets the extension site's name in the target folder.*/
- public void setExtensionSiteRelative( final String relativeFolder );
-
- /**Adds a new target platform.*/
- public Platform addTargetPlatform( final String os,
- final String ws,
- final String arch,
- final String eclipseIniFileContent,
- final String eclipseIniFilePath );
-
- /**Sets the RCP version to use.*/
- public void setRcpVersion( final String version );
-
- /**Sets the folder containing the RCP root files.*/
- public void setRootFileFolder( final String folderName );
-
- /**Sets the product name to use for the final result.*/
- public void setProductName( final String name );
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/IPackagerConfiguration.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/IPackagerConfiguration.java
deleted file mode 100644
index 387d5413..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/IPackagerConfiguration.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration;
-
-import java.io.File;
-import java.net.URL;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.update.core.VersionedIdentifier;
-
-/**
- * Provides all data the Eclipse Packager requires to run.
- */
-public interface IPackagerConfiguration {
-
- public URL[] getUpdateSites();
-
- public VersionedIdentifier[] getRequiredFeatures();
-
- public File getPackagerConfigurationFolder();
-
- public File getTargetFolder();
-
- public File getExtensionSite();
-
- public IPlatform[] getTargetPlatforms();
-
- public String getRootFileBaseName();
-
- public File getRootFileFolder();
-
- public String getProductName();
-
- public String getEclipseProductId();
-
- public String getInitialPerspectiveId();
-
- public IStatus checkFeatures( IProgressMonitor monitor ) throws CoreException;
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/IPlatform.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/IPlatform.java
deleted file mode 100644
index a18977af..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/IPlatform.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration;
-
-/**
- * Represents a platform configuration, consisting of operating system (os),
- * window system (ws) and system architecture (arch).
- */
-public interface IPlatform {
-
- public ArchiveFormat getArchiveFormat();
-
- /**
- * Returns the platform components separated by the separator. Example:
- * toString(".") for linux,gtk,x86 return "linux.gtk.x86".
- *
- * @param separator A separator character
- * @return The platform description formatted as
- * [OS][separator][WS][separator][Arch]
- */
- public String toString( char separator );
-
- /**
- * Builds the file name of the platform files for this platform, using the
- * base name provided in configuration.
- */
- public String getRootFileName( IPackagerConfiguration configuration );
-
- /** Configures the SiteManager to use platform as its current one. */
- public void configureSite();
-
- /**
- * Builds and returns the filename of the target archive for this platform,
- * using the base name provided in configuration.
- */
- public String getTargetFileName( IPackagerConfiguration configuration );
-
- /** Returns the name installer-creating script most suitable for this platform. */
- public String getInstallScriptName();
-
- /** Returns a string with the content of the eclipse.ini file */
- public String getEclipseIniFileContent();
-
- /** Returns a string with the internal path to eclipse.ini */
- public String getEclipseIniFilePath();
-}
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/PackagerConfiguration.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/PackagerConfiguration.java
deleted file mode 100644
index 1ed36c6e..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/PackagerConfiguration.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.epp.packaging.core.Activator;
-import org.eclipse.update.core.ISite;
-import org.eclipse.update.core.ISiteFeatureReference;
-import org.eclipse.update.core.SiteManager;
-import org.eclipse.update.core.VersionedIdentifier;
-import org.osgi.framework.Version;
-
-/**
- * A configurable IPackagerConfiguration. All data is handed in as String, then
- * converted to the proper objects.
- */
-public class PackagerConfiguration implements IModifiablePackagerConfiguration {
-
- private static final String PACKAGER_CONFIGURATION_DIRECTORY
- = "packagerConfiguration"; //$NON-NLS-1$
-
- private static final String ECLIPSE_PLATTFORM
- = "eclipse-platform-"; //$NON-NLS-1$
-
- private final List<URL> updateSites = new ArrayList<URL>();
- private final List<Platform> targetPlatforms = new ArrayList<Platform>();
- private List<VersionedIdentifier> requiredFeatures = new ArrayList<VersionedIdentifier>();
- private File baseFolder;
- private File extensionSite;
- private String rcpVersion;
- private File rootFolder;
- private String productName;
- private String eclipseProductId;
- private String initialPerspectiveId;
-
- public PackagerConfiguration() {
- this.baseFolder = org.eclipse.core.runtime.Platform.getLocation().toFile();
- }
-
- public URL[] getUpdateSites() {
- return this.updateSites.toArray( new URL[ this.updateSites.size() ] );
- }
-
- public void addUpdateSite( final String string ) throws MalformedURLException
- {
- this.updateSites.add( new URL( string ) );
- }
-
- public VersionedIdentifier[] getRequiredFeatures() {
- return this.requiredFeatures.toArray( new VersionedIdentifier[ this.requiredFeatures.size() ] );
- }
-
- public void addRequiredFeature( final String id, final String version ) {
- this.requiredFeatures.add( new VersionedIdentifier( id, version ) );
- }
-
- public File getTargetFolder() {
- return this.baseFolder;
- }
-
- public File getPackagerConfigurationFolder() {
- File result = new File( this.baseFolder, PACKAGER_CONFIGURATION_DIRECTORY );
- if( ! result.isDirectory() ) {
- result.mkdir();
- }
- return result;
- }
-
- public void setExtensionSiteRelative( final String relativeFolder ) {
- this.extensionSite = new File( this.baseFolder, relativeFolder );
- }
-
- public File getExtensionSite() {
- return this.extensionSite;
- }
-
- public Platform addTargetPlatform( final String os,
- final String ws,
- final String arch,
- final String eclipseIniFileContent,
- final String eclipseIniFilePath )
- {
- Platform platform = new Platform( os, ws, arch, eclipseIniFileContent, eclipseIniFilePath );
- this.targetPlatforms.add( platform );
- return platform;
- }
-
- public IPlatform[] getTargetPlatforms() {
- return this.targetPlatforms.toArray( new IPlatform[ this.targetPlatforms.size() ] );
- }
-
- public String getRootFileBaseName() {
- return ECLIPSE_PLATTFORM + this.rcpVersion + '-';
- }
-
- public File getRootFileFolder() {
- return this.rootFolder;
- }
-
- public void setRcpVersion( final String version ) {
- this.rcpVersion = version;
- }
-
- public void setRootFileFolder( final String folderName ) {
- this.rootFolder = new File( folderName );
- }
-
- public void setProductName( final String name ) {
- this.productName = name;
- }
-
- public String getProductName() {
- return this.productName;
- }
-
- public void setEclipseProductId( final String eclipseProductId ) {
- this.eclipseProductId = eclipseProductId;
- }
-
- public String getEclipseProductId() {
- return this.eclipseProductId;
- }
-
- public void setInitialPerspectiveId( final String initialPerspectiveId ) {
- this.initialPerspectiveId = initialPerspectiveId;
- }
-
- public String getInitialPerspectiveId() {
- return this.initialPerspectiveId;
- }
-
- /**
- * Creates a list of available feature versions from all given update sites.
- * Required features with no version number (0.0.0) are replaced with the
- * highest available version number.
- */
- public IStatus checkFeatures( final IProgressMonitor monitor )
- throws CoreException
- {
- MultiStatus result = new MultiStatus( Activator.PLUGIN_ID, IStatus.OK, null, null );
- FeatureVersionRepository availableFeatures = new FeatureVersionRepository();
- List<VersionedIdentifier> newRequiredFeatures = new ArrayList<VersionedIdentifier>();
- createFeatureRepository( monitor, availableFeatures );
- for( VersionedIdentifier featureIdentifier : this.requiredFeatures ) {
-
- VersionedIdentifier newIdentifier = featureIdentifier;
- String featureId = featureIdentifier.getIdentifier();
- Version featureVersion = new Version( featureIdentifier.getVersion().toString() );
-
- if( ! availableFeatures.containsIdentifier( featureId ) ) {
- String message = "Feature " //$NON-NLS-1$
- + featureId
- + " not available on given update sites."; //$NON-NLS-1$
- result.add( new Status( IStatus.WARNING, Activator.PLUGIN_ID, message ) );
- } else {
- Version highestVersion = availableFeatures.getHighestVersion( featureId );
- String newVersion = highestVersion.toString();
-
- if( Version.emptyVersion.equals( featureVersion ) )
- {
- String message = "Replacing feature version of " //$NON-NLS-1$
- + featureId
- + " with version " //$NON-NLS-1$
- + newVersion;
- result.add( new Status( IStatus.INFO, Activator.PLUGIN_ID, message ) );
- newIdentifier = new VersionedIdentifier( featureId, newVersion );
- } else {
- if( highestVersion.compareTo( featureVersion ) > 0 ) {
- String message = "Higher version of feature " //$NON-NLS-1$
- + featureId
- + " available: " //$NON-NLS-1$
- + newVersion;
- result.add( new Status( IStatus.INFO, Activator.PLUGIN_ID, message ) );
- }
- if( highestVersion.compareTo( featureVersion ) < 0 ) {
- String message = "Only lower version of feature " //$NON-NLS-1$
- + featureId
- + " available: " //$NON-NLS-1$
- + newVersion;
- result.add( new Status( IStatus.WARNING, Activator.PLUGIN_ID, message ) );
- }
- }
- }
-
- newRequiredFeatures.add( newIdentifier );
- }
- this.requiredFeatures = newRequiredFeatures;
- return result;
- }
-
-
- // internal methods
- ///////////////////
-
-
- private void createFeatureRepository( final IProgressMonitor monitor,
- final FeatureVersionRepository availableFeatures )
- throws CoreException
- {
- for( URL url : this.updateSites ) {
- ISite site = SiteManager.getSite( url, monitor );
- ISiteFeatureReference[] featureReferences = site.getFeatureReferences();
- for( ISiteFeatureReference featureReference : featureReferences ) {
- VersionedIdentifier versionedIdentifier = featureReference.getVersionedIdentifier();
- availableFeatures.addVersionIdentifier( versionedIdentifier );
- }
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/Platform.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/Platform.java
deleted file mode 100644
index befcb660..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/Platform.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration;
-
-import static org.eclipse.core.runtime.Platform.ARCH_X86;
-import static org.eclipse.core.runtime.Platform.ARCH_X86_64;
-import static org.eclipse.core.runtime.Platform.OS_LINUX;
-import static org.eclipse.core.runtime.Platform.OS_WIN32;
-import static org.eclipse.core.runtime.Platform.WS_GTK;
-import org.eclipse.update.core.SiteManager;
-
-/**
- * Represents a platform configuration, consisting of operating system (os),
- * windowing system (ws) and system architecture (arch). Default implementation
- * of IPlatform.
- */
-public class Platform implements IPlatform {
-
- private final String os;
- private final String ws;
- private final String arch;
- private final String eclipseIniFileContent;
- private final String eclipseIniFilePath;
- private ArchiveFormat archiveFormat = ArchiveFormat.antZip;
-
- public Platform( final String os,
- final String ws,
- final String arch,
- final String eclipseIniFileContent,
- final String eclipseIniFilePath )
- {
- this.os = os;
- this.ws = ws;
- this.arch = arch;
- this.eclipseIniFileContent = eclipseIniFileContent;
- this.eclipseIniFilePath = eclipseIniFilePath;
- }
-
- @Override
- public boolean equals( final Object obj ) {
- boolean result = false;
- if( obj instanceof Platform ) {
- Platform other = ( Platform )obj;
- result = os.equals( other.os )
- && ws.equals( other.ws )
- && arch.equals( other.arch );
- }
- return result;
- }
-
- public String toString( final char separator ) {
- return os + separator + ws + separator + arch;
- }
-
- /** Identical with toString(',) */
- @Override
- public String toString() {
- return toString( ',' );
- }
-
- public ArchiveFormat getArchiveFormat() {
- return archiveFormat;
- }
-
- public void setArchiveFormat( final String format ) {
- this.archiveFormat = ArchiveFormat.valueOf( format );
- }
-
- public void configureSite() {
- SiteManager.setOS( os );
- SiteManager.setWS( ws );
- SiteManager.setOSArch( arch );
- }
-
- // Requires PDE Build with up-to-date unzippergenerator.
- public String getRootFileName( final IPackagerConfiguration configuration ) {
- StringBuilder builder = new StringBuilder( configuration.getRootFileBaseName() );
- builder.append( os );
- boolean isWin32 = isWin32();
- if( !isWin32 ) {
- builder.append( '-' );
- builder.append( ws );
- }
- boolean isLinuxGtk = isLinux() && WS_GTK.endsWith( ws );
- if( ( isWin32 || isLinuxGtk ) && !isX86() ) {
- builder.append( '-' );
- builder.append( arch );
- }
- builder.append( archiveFormat.getExtension() );
- return builder.toString();
- }
-
- private boolean isLinux() {
- return OS_LINUX.equals( os );
- }
-
- private boolean isX86() {
- return ARCH_X86.equals( arch );
- }
-
- private boolean isWin32() {
- return OS_WIN32.equals( os );
- }
-
- public String getTargetFileName( final IPackagerConfiguration configuration )
- {
- return configuration.getProductName() + "-" //$NON-NLS-1$
- + toString( '.' );
- }
-
- public String getInstallScriptName() {
- String buildFile;
- boolean isWin32x86 = isWin32() && isX86();
- boolean isLinuxX86 = isLinux() && ( isX86() || ARCH_X86_64.equals( arch ) );
- if( ( isWin32x86 || isLinuxX86 ) ) {
- buildFile = "build-installer-" + os + ".xml"; //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- buildFile = "build-installer-default.xml"; //$NON-NLS-1$
- }
- return buildFile;
- }
-
- public String getEclipseIniFileContent() {
- return eclipseIniFileContent;
- }
-
- public String getEclipseIniFilePath() {
- return eclipseIniFilePath;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/Task.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/Task.java
deleted file mode 100644
index 4a863132..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/Task.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration;
-
-/**
- * Enumerates the three tasks known to the Eclipse Packager.
- */
-public enum Task {
- /** Verifies requested features against the installation sites. */
- CHECK,
- /** Installs the requested features to the local extension site. */
- INSTALL,
- /** Builds the application from the requested features and the root files. */
- BUILD
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/xml/ConfigurationParser.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/xml/ConfigurationParser.java
deleted file mode 100644
index dd1edf7e..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/xml/ConfigurationParser.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration.xml;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.epp.packaging.core.configuration.IPackagerConfiguration;
-import org.eclipse.epp.packaging.core.configuration.PackagerConfiguration;
-import org.eclipse.epp.packaging.core.configuration.Platform;
-import org.xml.sax.SAXException;
-
-/**
- * Parses an Eclipse Packager configuration in XML format.
- */
-public class ConfigurationParser {
-
- private static final String LATEST = "latest"; //$NON-NLS-1$
-
- private static final String ATTRIB_ARCH = "arch"; //$NON-NLS-1$
- private static final String ATTRIB_ECLIPSE_INI_PATH = "path"; //$NON-NLS-1$
- private static final String ATTRIB_ECLIPSE_PRODUCT_ID = "eclipseProductId"; //$NON-NLS-1$
- private static final String ATTRIB_FOLDER = "folder"; //$NON-NLS-1$
- private static final String ATTRIB_FORMAT = "format"; //$NON-NLS-1$
- private static final String ATTRIB_ID = "id"; //$NON-NLS-1$
- private static final String ATTRIB_INITIAL_PERSPECTIVE_ID = "initialPerspectiveId"; //$NON-NLS-1$
- private static final String ATTRIB_NAME = "name"; //$NON-NLS-1$
- private static final String ATTRIB_OS = "os"; //$NON-NLS-1$
- private static final String ATTRIB_RELATIVE_FOLDER = "relativeFolder"; //$NON-NLS-1$
- private static final String ATTRIB_URL = "url"; //$NON-NLS-1$
- private static final String ATTRIB_VERSION = "version"; //$NON-NLS-1$
- private static final String ATTRIB_WS = "ws"; //$NON-NLS-1$
-
- private static final String TAG_ARCHIVE_FORMAT = "archiveFormat"; //$NON-NLS-1$
- private static final String TAG_ECLIPSE_INI_FILE = "eclipseIniFileContent"; //$NON-NLS-1$
- private static final String TAG_EXTENSION_SITE = "extensionSite"; //$NON-NLS-1$
- private static final String TAG_FEATURE = "feature"; //$NON-NLS-1$
- private static final String TAG_PLATFORM = "platform"; //$NON-NLS-1$
- private static final String TAG_PRODUCT = "product"; //$NON-NLS-1$
- private static final String TAG_RCP = "rcp"; //$NON-NLS-1$
- private static final String TAG_REQUIRED_FEATURES = "requiredFeatures"; //$NON-NLS-1$
- private static final String TAG_ROOT_FILE_FOLDER = "rootFileFolder"; //$NON-NLS-1$
- private static final String TAG_TARGET_PLATFORMS = "targetPlatforms"; //$NON-NLS-1$
- private static final String TAG_UPDATE_SITE = "updateSite"; //$NON-NLS-1$
- private static final String TAG_UPDATE_SITES = "updateSites"; //$NON-NLS-1$
-
- private final File xmlFile;
-
- public ConfigurationParser( final File xmlFile ) {
- this.xmlFile = xmlFile;
- }
-
- /**
- * Parses the configuration contained in xmlFile.
- */
- public IPackagerConfiguration parseConfiguration()
- throws SAXException, IOException, ParserConfigurationException
- {
- return parseConfiguration( new XMLDocument( xmlFile ).getRootElement() );
- }
-
- /**
- * Parses the configuration-string xml. Used in tests only.
- */
- public IPackagerConfiguration parseConfiguration( final String xml )
- throws MalformedURLException, SAXException, IOException,
- ParserConfigurationException
- {
- return parseConfiguration( new XMLDocument( xml ).getRootElement() );
- }
-
- private IXmlElement[] getElements( final IXmlElement element,
- final String name )
- {
- return element.getElements( name );
- }
-
- private String getFolderName( final IXmlElement element ) {
- return element.getAttributeValue( ATTRIB_FOLDER );
- }
-
- /**
- * Reads the various elements of the configuration from the root element.
- *
- * @throws MalformedURLException
- */
- private IPackagerConfiguration parseConfiguration( final IXmlElement root )
- throws MalformedURLException
- {
- PackagerConfiguration configuration = new PackagerConfiguration();
- parseRcp( configuration, root );
- parseProduct( configuration, root );
- parseUpdateSites( configuration, root );
- parseRequiredFeatures( configuration, root );
- parseRootFolder( configuration, root );
- parseExtensionSite( configuration, root );
- parsePlatforms( configuration, root );
- return configuration;
- }
-
-
- /** Loads and sets the extension site to use. */
- private void parseExtensionSite( final PackagerConfiguration configuration,
- final IXmlElement parent )
- {
- IXmlElement element = parent.getElement( TAG_EXTENSION_SITE );
- configuration.setExtensionSiteRelative( element.getAttributeValue( ATTRIB_RELATIVE_FOLDER ) );
- }
-
-
- /** Loads and sets the target platforms. */
- private void parsePlatforms( final PackagerConfiguration configuration,
- final IXmlElement parent )
- {
- IXmlElement element = parent.getElement( TAG_TARGET_PLATFORMS );
- for( IXmlElement platformElement : getElements( element, TAG_PLATFORM ) ) {
- String os = platformElement.getAttributeValue( ATTRIB_OS );
- String ws = platformElement.getAttributeValue( ATTRIB_WS );
- String arch = platformElement.getAttributeValue( ATTRIB_ARCH );
- IXmlElement eclipseIniFileElement = platformElement.getElement( TAG_ECLIPSE_INI_FILE );
- String eclipseIniFileContent = eclipseIniFileElement.getText();
- String eclipseIniFilePath = eclipseIniFileElement.getAttributeValue( ATTRIB_ECLIPSE_INI_PATH );
- Platform platform = configuration.addTargetPlatform( os, ws, arch, eclipseIniFileContent, eclipseIniFilePath );
- IXmlElement archiveFormat = platformElement.getElement( TAG_ARCHIVE_FORMAT );
- if( archiveFormat != null ) {
- platform.setArchiveFormat( archiveFormat.getAttributeValue( ATTRIB_FORMAT ) );
- }
- }
- }
-
- private void parseProduct( final PackagerConfiguration configuration,
- final IXmlElement parent )
- {
- IXmlElement productElement = parent.getElement( TAG_PRODUCT );
- String productName = productElement.getAttributeValue( ATTRIB_NAME );
- configuration.setProductName( productName );
- String eclipseProductId = productElement.getAttributeValue( ATTRIB_ECLIPSE_PRODUCT_ID );
- configuration.setEclipseProductId( eclipseProductId );
- String initialPerspectiveId = productElement.getAttributeValue( ATTRIB_INITIAL_PERSPECTIVE_ID );
- configuration.setInitialPerspectiveId( initialPerspectiveId );
- }
-
- private void parseRcp( final PackagerConfiguration configuration,
- final IXmlElement parent )
- {
- IXmlElement rcpElement = parent.getElement( TAG_RCP );
- String rcpVersion = rcpElement.getAttributeValue( ATTRIB_VERSION );
- configuration.setRcpVersion( rcpVersion );
- }
-
- /**
- * Loads and sets the required features.
- */
- private void parseRequiredFeatures( final PackagerConfiguration configuration,
- final IXmlElement parent )
- {
- IXmlElement element = parent.getElement( TAG_REQUIRED_FEATURES );
- for( IXmlElement featureElement : getElements( element, TAG_FEATURE ) ) {
- String version = featureElement.getAttributeValue( ATTRIB_VERSION );
- if( version != null ) {
- version = version.trim();
- if( version.length() == 0 || LATEST.equalsIgnoreCase( version ) ) {
- version = null;
- }
- }
- configuration.addRequiredFeature( featureElement.getAttributeValue( ATTRIB_ID ),
- version );
- }
- }
-
- /** Loads and sets the folder containing the root files. */
- private void parseRootFolder( final PackagerConfiguration configuration,
- final IXmlElement parent )
- {
- IXmlElement element = parent.getElement( TAG_ROOT_FILE_FOLDER );
- String folder = resolveRelativeFileName( getFolderName( element ) );
- configuration.setRootFileFolder( folder );
- }
-
- /**
- * Loads and sets the available update sites.
- *
- * @throws MalformedURLException
- */
- private void parseUpdateSites( final PackagerConfiguration configuration,
- final IXmlElement parent )
- throws MalformedURLException
- {
- IXmlElement element = parent.getElement( TAG_UPDATE_SITES );
- for( IXmlElement siteElement : getElements( element, TAG_UPDATE_SITE ) ) {
- configuration.addUpdateSite( siteElement.getAttributeValue( ATTRIB_URL ) );
- }
- }
-
- /*
- * This method resolves a potentially relative file name. If the path is
- * specified relative, then it is considered relative to the parent of the
- * configuration (XML) file.
- */
- private String resolveRelativeFileName( final String path ) {
- if( new File( path ).isAbsolute() )
- return path;
- return new File( this.xmlFile.getParent(), path ).toString();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/xml/IXmlElement.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/xml/IXmlElement.java
deleted file mode 100644
index f5981b00..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/xml/IXmlElement.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration.xml;
-
-/** An XML Element with sub elements and attributes. */
-public interface IXmlElement {
-
- /**
- * Returns all descendant elements of this element whose name equals the given
- * name.
- *
- * @param tagName name of the tag
- * @return element
- */
- public IXmlElement[] getElements( String tagName );
-
- /**
- * Returns the first descendant element of the given name or <code>null</code>,
- * if none exist.
- *
- * @param tagName name of the tag
- * @return the element or <code>null</code>
- */
- public IXmlElement getElement( String tagName );
-
- /**
- * Returns the value of the given attribute.
- *
- * @param attributeName name of the XML attribute
- * @return plain string value of the XML attribute
- */
- public String getAttributeValue( String attributeName );
-
- /**
- * Returns the text value of this element without any preprocessing.
- *
- * @return text of this XML element
- */
- public String getText();
-}
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/xml/XMLDocument.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/xml/XMLDocument.java
deleted file mode 100644
index 6268629c..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/xml/XMLDocument.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration.xml;
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.IOException;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.SAXException;
-
-/**
- * An XML document based on W3C DOM with a description of the EPP package.
- */
-public class XMLDocument {
-
- private final Document document;
-
- /**
- * Creates a new instance of the XMLDocument from an input file.
- *
- * @param xmlFile the EPP configuration file
- * @throws SAXException if the file cannot be parsed
- * @throws IOException if the file cannot be read or parsed
- * @throws ParserConfigurationException if the document builder cannot be
- * created
- */
- public XMLDocument( final File xmlFile )
- throws SAXException, IOException, ParserConfigurationException
- {
- DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder documentBuilder = docBuilderFactory.newDocumentBuilder();
- this.document = documentBuilder.parse( xmlFile );
- }
-
- /**
- * Creates a new instance of the XMLDocument from an XML input string.
- *
- * @param xmlString the string containing the EPP configuration
- * @throws SAXException if the file cannot be parsed
- * @throws IOException if the file cannot be read or parsed
- * @throws ParserConfigurationException if the document builder cannot be
- * created
- */
- public XMLDocument( final String xmlString )
- throws SAXException, IOException, ParserConfigurationException
- {
- DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder documentBuilder = docBuilderFactory.newDocumentBuilder();
- ByteArrayInputStream inputStream = new ByteArrayInputStream( xmlString.getBytes() );
- this.document = documentBuilder.parse( inputStream );
- }
-
- /**
- * Returns the root element (<code>configuration</code> element) of the EPP
- * XML configuration.
- *
- * @return the root element of this document
- */
- public IXmlElement getRootElement() {
- return new XmlElement( ( Element )this.document.getFirstChild() );
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/xml/XmlElement.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/xml/XmlElement.java
deleted file mode 100644
index 1c740c67..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/configuration/xml/XmlElement.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration.xml;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/** XML Element implementation using an underlying W3C DOM Element. */
-public class XmlElement implements IXmlElement {
-
- private final Element node;
-
- /**
- * Creates a new XmlElement by providing a new node.
- *
- * @param node
- */
- public XmlElement( final Element node ) {
- this.node = node;
- }
-
- public IXmlElement getElement( final String tagName ) {
- NodeList elementsByTagName = this.node.getElementsByTagName( tagName );
- IXmlElement result;
- if( elementsByTagName.getLength() == 0 ) {
- result = null;
- } else {
- result = new XmlElement( ( Element )elementsByTagName.item( 0 ) );
- }
- return result;
- }
-
- public IXmlElement[] getElements( final String tagName ) {
- NodeList elementsByTagName = this.node.getElementsByTagName( tagName );
- List<IXmlElement> result = new ArrayList<IXmlElement>();
- for( int index = 0; index < elementsByTagName.getLength(); index++ ) {
- result.add( new XmlElement( ( Element )elementsByTagName.item( index ) ) );
- }
- return result.toArray( new IXmlElement[ result.size() ] );
- }
-
- public String getAttributeValue( final String attributeName ) {
- return this.node.getAttribute( attributeName );
- }
-
- public String getText() {
- return this.node.getTextContent();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/ExtensionSiteManager.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/ExtensionSiteManager.java
deleted file mode 100644
index e3b3e1fd..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/ExtensionSiteManager.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.download;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.epp.packaging.core.configuration.IPackagerConfiguration;
-import org.eclipse.epp.packaging.core.configuration.IPlatform;
-import org.eclipse.epp.packaging.core.logging.MessageLogger;
-import org.eclipse.update.configuration.IConfiguredSite;
-import org.eclipse.update.core.IFeature;
-
-/**
- * Responsible for creating the extension site and installing the features
- * provided by an UpdateSiteManager
- */
-public class ExtensionSiteManager {
-
- private final IPackagerConfiguration configuration;
-
- public ExtensionSiteManager( final IPackagerConfiguration configuration ) {
- this.configuration = configuration;
- }
-
- public void installFeatures( final IUpdateSiteManager manager )
- throws IOException, CoreException
- {
- File localSiteFolder = this.configuration.getExtensionSite();
- MessageLogger.getInstance().log( "ExtensionSiteManager.SiteCreated", //$NON-NLS-1$
- localSiteFolder );
- IConfiguredSite site = SiteCreator.createInstallationSite( localSiteFolder );
- for( IPlatform platform : this.configuration.getTargetPlatforms() ) {
- MessageLogger.getInstance().logBeginProcess( "ExtensionSiteManager.InstallPlatform", //$NON-NLS-1$
- platform );
- platform.configureSite();
- for( IFeature feature : manager.getFeatures() ) {
- String identifier = feature.getVersionedIdentifier().getIdentifier();
- MessageLogger.getInstance().logBeginProcess( "ExtensionSiteManager.Installing", //$NON-NLS-1$
- identifier );
- site.install( feature, null, new NullProgressMonitor() );
- MessageLogger.getInstance().logEndProcess();
- }
- MessageLogger.getInstance().logEndProcess();
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/FeatureRetrievingSearchCollector.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/FeatureRetrievingSearchCollector.java
deleted file mode 100644
index 4556fc9b..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/FeatureRetrievingSearchCollector.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.download;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.update.core.IFeature;
-import org.eclipse.update.core.VersionedIdentifier;
-import org.eclipse.update.search.IUpdateSearchResultCollector;
-
-/**
- * An UpdateSearchResultCollector returning a feature.
- */
-public class FeatureRetrievingSearchCollector
- implements IUpdateSearchResultCollector
-{
-
- private final List<IFeature> features = new ArrayList<IFeature>();
- private final List<VersionedIdentifier> identifiers = new ArrayList<VersionedIdentifier>();
-
- public void accept( final IFeature match ) {
- if( !this.identifiers.contains( match.getVersionedIdentifier() ) ) {
- this.features.add( match );
- this.identifiers.add( match.getVersionedIdentifier() );
- }
- }
-
- public IFeature[] getFeatures() {
- return this.features.toArray( new IFeature[ this.features.size() ] );
- }
-}
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/FeatureSearcher.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/FeatureSearcher.java
deleted file mode 100644
index a50453d2..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/FeatureSearcher.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.download;
-
-import java.net.URL;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.update.core.VersionedIdentifier;
-import org.eclipse.update.search.IUpdateSearchResultCollector;
-import org.eclipse.update.search.UpdateSearchRequest;
-import org.eclipse.update.search.UpdateSearchScope;
-
-/**
- * Handles and executes the search for a set of features over a number of update
- * sites.
- */
-public class FeatureSearcher {
-
- private final UpdateSearchScope scope = new UpdateSearchScope();
- private final PackagerSearchCategory category = new PackagerSearchCategory();
-
- public FeatureSearcher( final VersionedIdentifier[] listedFeatures,
- final URL[] listedSites )
- {
- for( VersionedIdentifier identifier : listedFeatures ) {
- this.category.addFeatureToSearch( identifier );
- }
- for( URL siteUrl : listedSites ) {
- this.scope.addSearchSite( "", siteUrl, null ); //$NON-NLS-1$
- }
- }
-
- /**
- * Run the search.
- *
- * @param collector the collector storing the search results.
- */
- public void run( final IUpdateSearchResultCollector collector )
- throws OperationCanceledException, CoreException
- {
- UpdateSearchRequest searchRequest
- = new UpdateSearchRequest( this.category, this.scope );
- searchRequest.performSearch( collector, new NullProgressMonitor() );
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/FeatureVerifyingSearchCollector.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/FeatureVerifyingSearchCollector.java
deleted file mode 100644
index 57bb752b..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/FeatureVerifyingSearchCollector.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.download;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.update.core.IFeature;
-import org.eclipse.update.core.VersionedIdentifier;
-import org.eclipse.update.search.IUpdateSearchResultCollector;
-
-/**
- * UpdateSearchResultCollector comparing features found with a base set of
- * features to find.
- */
-public class FeatureVerifyingSearchCollector
- implements IUpdateSearchResultCollector
-{
-
- private final List<VersionedIdentifier> featuresToFind = new ArrayList<VersionedIdentifier>();
-
- public FeatureVerifyingSearchCollector( final VersionedIdentifier[] listedFeatures )
- {
- Collections.addAll( this.featuresToFind, listedFeatures );
- }
-
- public void accept( final IFeature feature ) {
- this.featuresToFind.remove( feature.getVersionedIdentifier() );
- }
-
- /**
- * @return true if all the configured features are found, false otherwise.
- */
- public boolean allFeaturesFound() {
- return this.featuresToFind.isEmpty();
- }
-
- /**
- * @return the list of missing features
- */
- public VersionedIdentifier[] getMissingFeatures() {
- return this.featuresToFind.toArray( new VersionedIdentifier[ this.featuresToFind.size() ] );
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/IUpdateSiteManager.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/IUpdateSiteManager.java
deleted file mode 100644
index 3213ba1f..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/IUpdateSiteManager.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.download;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.update.core.IFeature;
-import org.eclipse.update.core.VersionedIdentifier;
-
-/**
- * Responsible for managing the declared update sites.
- */
-public interface IUpdateSiteManager {
-
- /**
- * Checks whether all of the features given by identifiers are present on the
- * managed update sites.
- *
- * @return true, if all identified features can be found, false otherwise.
- */
- public boolean areFeaturesPresent( VersionedIdentifier[] identifiers )
- throws CoreException;
-
- /**
- * Returns the IFeatures for the configured feature references
- */
- public IFeature[] getFeatures() throws CoreException;
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/PackagerSearchCategory.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/PackagerSearchCategory.java
deleted file mode 100644
index eb9332a0..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/PackagerSearchCategory.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.download;
-
-import org.eclipse.update.core.VersionedIdentifier;
-import org.eclipse.update.search.IUpdateSearchCategory;
-import org.eclipse.update.search.IUpdateSearchQuery;
-
-/**
- * An UpdateSearchCategory looking for feature identifiers
- */
-public class PackagerSearchCategory implements IUpdateSearchCategory {
-
- private final PackagerSearchQuery query = new PackagerSearchQuery();
- private String id;
-
- public String getId() {
- return this.id;
- }
-
- /**
- * Adds a feature to search for.
- */
- public void addFeatureToSearch( final VersionedIdentifier identifier ) {
- this.query.addFeatureIdentifier( identifier );
- }
-
- public IUpdateSearchQuery[] getQueries() {
- return new IUpdateSearchQuery[]{
- this.query
- };
- }
-
- public void setId( final String id ) {
- this.id = id;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/PackagerSearchQuery.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/PackagerSearchQuery.java
deleted file mode 100644
index bd5942bf..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/PackagerSearchQuery.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.download;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.update.core.ISite;
-import org.eclipse.update.core.ISiteFeatureReference;
-import org.eclipse.update.core.VersionedIdentifier;
-import org.eclipse.update.search.IQueryUpdateSiteAdapter;
-import org.eclipse.update.search.IUpdateSearchFilter;
-import org.eclipse.update.search.IUpdateSearchQuery;
-import org.eclipse.update.search.IUpdateSearchResultCollector;
-
-/**
- * Search query looking for occurrences of configured features.
- */
-public class PackagerSearchQuery implements IUpdateSearchQuery {
-
- private final List<VersionedIdentifier> identifiers = new ArrayList<VersionedIdentifier>();
-
- public IQueryUpdateSiteAdapter getQuerySearchSite() {
- return null;
- }
-
- public void run( final ISite site,
- final String[] categoriesToSkip,
- final IUpdateSearchFilter filter,
- final IUpdateSearchResultCollector collector,
- final IProgressMonitor monitor )
- {
- ISiteFeatureReference[] featureReferences = site.getFeatureReferences();
- for( ISiteFeatureReference reference : featureReferences ) {
- try {
- if( this.identifiers.contains( reference.getVersionedIdentifier() ) ) {
- collector.accept( reference.getFeature( new NullProgressMonitor() ) );
- }
- } catch( CoreException ce ) {
- // The search is over, and there is nothing we could do about it.
- }
- }
- }
-
- /**
- * Add a feature to look for.
- */
- public void addFeatureIdentifier( final VersionedIdentifier identifier ) {
- this.identifiers.add( identifier );
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/SiteCreator.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/SiteCreator.java
deleted file mode 100644
index af8f7313..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/SiteCreator.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.download;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.epp.packaging.core.io.FileUtils;
-import org.eclipse.update.configuration.IConfiguredSite;
-import org.eclipse.update.configuration.IInstallConfiguration;
-import org.eclipse.update.configuration.ILocalSite;
-import org.eclipse.update.core.SiteManager;
-
-/**
- * Responsible for creating and deleting extension sites.
- */
-public class SiteCreator {
-
- /**
- * Adds a new extension site to the system and configures it to be able to
- * update.
- */
- public static IConfiguredSite createInstallationSite( final File folder )
- throws IOException, CoreException
- {
- if( !folder.exists() ) {
- folder.mkdir();
- }
- IInstallConfiguration config = SiteManager.getLocalSite()
- .getCurrentConfiguration();
- IConfiguredSite site = config.createConfiguredSite( folder );
- site.verifyUpdatableStatus();
- config.addConfiguredSite( site );
- return site;
- }
-
- /**
- * Removes an extension site from the system, deleting its content.
- */
- public static void removeInstallationSite( final String siteString )
- throws CoreException, MalformedURLException
- {
- ILocalSite localSite = SiteManager.getLocalSite();
- IInstallConfiguration configuration = localSite.getCurrentConfiguration();
- IConfiguredSite[] sites = configuration.getConfiguredSites();
- File file = new File( siteString );
- String fileUrl = file.toURL().toExternalForm() + "eclipse/";//$NON-NLS-1$
- for( IConfiguredSite site : sites ) {
- if( site.getSite().getURL().toExternalForm().equals( fileUrl ) ) {
- configuration.removeConfiguredSite( site );
- FileUtils.deleteFile( file );
- }
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/UpdateSiteManager.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/UpdateSiteManager.java
deleted file mode 100644
index 050bf139..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/download/UpdateSiteManager.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.download;
-
-import java.net.URL;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.epp.packaging.core.configuration.IPackagerConfiguration;
-import org.eclipse.epp.packaging.core.logging.MessageLogger;
-import org.eclipse.update.core.IFeature;
-import org.eclipse.update.core.VersionedIdentifier;
-import org.eclipse.update.search.IUpdateSearchResultCollector;
-
-/**
- * Holds references to a list of update sites and provides the methods required
- * for interaction.
- */
-public class UpdateSiteManager implements IUpdateSiteManager {
-
- private final URL[] listedSites;
- private final VersionedIdentifier[] listedFeatures;
-
- public UpdateSiteManager( final IPackagerConfiguration configuration ) {
- this.listedSites = configuration.getUpdateSites();
- this.listedFeatures = configuration.getRequiredFeatures();
- MessageLogger.getInstance().log( "UpdateSiteManager.ListedSitesCount", //$NON-NLS-1$
- Integer.valueOf( this.listedSites.length ) );
- }
-
- public boolean areFeaturesPresent( final VersionedIdentifier[] identifiers )
- throws CoreException
- {
- MessageLogger.getInstance().logBeginProcess( "UpdateSiteManager.FeatureLookup" ); //$NON-NLS-1$
- FeatureVerifyingSearchCollector collector
- = new FeatureVerifyingSearchCollector( this.listedFeatures );
- search( collector );
- boolean result = collector.allFeaturesFound();
- if( result ) {
- MessageLogger.getInstance().logEndProcess( "UpdateSiteManager.FeaturesPresent" ); //$NON-NLS-1$
- } else {
- MessageLogger.getInstance().logEndProcess( "UpdateSiteManager.FeaturesMissing" ); //$NON-NLS-1$
- for( VersionedIdentifier feature : collector.getMissingFeatures() ) {
- MessageLogger.getInstance().log( feature.toString() );
- }
- }
- return result;
- }
-
- public IFeature[] getFeatures() throws CoreException {
- FeatureRetrievingSearchCollector collector = new FeatureRetrievingSearchCollector();
- search( collector );
- return collector.getFeatures();
- }
-
- private void search( final IUpdateSearchResultCollector collector )
- throws CoreException
- {
- FeatureSearcher featureSearcher = new FeatureSearcher( this.listedFeatures,
- this.listedSites );
- featureSearcher.run( collector );
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/io/FileUtils.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/io/FileUtils.java
deleted file mode 100644
index 201a1923..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/io/FileUtils.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.io;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.nio.channels.FileChannel;
-
-/**
- * Utility class for file operation.
- */
-public class FileUtils {
-
- /**
- * Copies source to destination.
- *
- * @param source The source file.
- * @param destination The destination file.
- */
- public static void copy( final File source, final File destination )
- throws IOException
- {
- if( !source.exists() ) {
- return;
- }
- createDestinationFolder( destination );
- FileChannel inputChannel = null;
- FileChannel outputChannel = null;
- try {
- inputChannel = new FileInputStream( source ).getChannel();
- outputChannel = new FileOutputStream( destination ).getChannel();
- inputChannel.transferTo( 0, inputChannel.size(), outputChannel );
- } finally {
- if( inputChannel != null ) {
- inputChannel.close();
- }
- if( outputChannel != null ) {
- outputChannel.close();
- }
- }
- }
-
- /**
- * Copies source to destination.
- *
- * @param source Path to the source file.
- * @param destination Path to the destination file.
- */
- public static void copy( final String source, final String destination )
- throws IOException
- {
- File sourceFile = new File( source );
- copy( sourceFile, new File( destination ) );
- }
-
- /** Creates parent folders, if not existing. */
- private static void createDestinationFolder( final File destinationFile ) {
- File destinationParent = destinationFile.getParentFile();
- if( !destinationParent.exists() ) {
- destinationParent.mkdirs();
- }
- }
-
- /** Recursively deletes a file or folder. */
- public static void deleteFile( final File file ) {
- if( file.isDirectory() ) {
- for( File subFile : file.listFiles() ) {
- deleteFile( subFile );
- }
- }
- file.delete();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/io/Zip.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/io/Zip.java
deleted file mode 100644
index 76704ffd..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/io/Zip.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.io;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipOutputStream;
-
-/**
- * Capsules creation of archives in ZIP format. Begin with constructor, add
- * content, finally end creation with close().
- */
-public class Zip {
-
- private final ZipOutputStream zipOutputStream;
-
- /**
- * Opens a new zip archive in the location denoted by file and readies it for
- * writing.
- *
- * @param file the zip archive file that is used for writing
- * @throws FileNotFoundException
- */
- public Zip( final File file ) throws FileNotFoundException {
- this.zipOutputStream = new ZipOutputStream( new FileOutputStream( file ) );
- }
-
- public Zip( final File sourceFolder, final String fileName )
- throws FileNotFoundException
- {
- this( new File( sourceFolder, fileName ) );
- }
-
- /**
- * Adds a file to the zip archive.
- *
- * @param relativePath The relative path to the file to add.
- */
- public void addFile( final String relativePath ) throws IOException {
- File file = new File( relativePath );
- addFileAs( file, relativePath );
- }
-
- /**
- * Adds the contents of a folder to the zip archive.
- *
- * @param folder The folder to add. If the file is not a folder, nothing
- * happens.
- */
- public void addFolder( final File folder ) throws IOException {
- if( folder.isDirectory() ) {
- addDirectoryContents( folder, folder );
- }
- }
-
- /**
- * Adds a file or folder to the archive. *
- *
- * @param file The file or folder to add.
- * @param rootContainer The parent directory. All files' paths are made
- * relative to this folder.
- */
- private void addFile( final File file, final File rootContainer )
- throws IOException
- {
- if( file.isDirectory() ) {
- addDirectoryContents( file, rootContainer );
- } else {
- String path = file.getCanonicalPath();
- String entryName
- = path.replace( rootContainer.getCanonicalPath(), "." );//$NON-NLS-1$
- addFileAs( file, entryName );
- }
- }
-
- /**
- * Adds the given file to the archive.
- *
- * @param file The file to add.
- * @param entryName The path under which to store the file.
- */
- public void addFileAs( final File file, final String entryName )
- throws IOException, FileNotFoundException
- {
- String name = entryName;
- if( entryName.startsWith( "./" ) ) {//$NON-NLS-1$
- name = name.replaceFirst( "./", "" );//$NON-NLS-1$//$NON-NLS-2$
- }
- if( entryName.startsWith( ".\\" ) ) {//$NON-NLS-1$
- name = name.replaceFirst( ".\\\\", "" );//$NON-NLS-1$//$NON-NLS-2$
- }
- this.zipOutputStream.putNextEntry( new ZipEntry( name ) );
- writeFileToZip( new FileInputStream( file ) );
- this.zipOutputStream.closeEntry();
- }
-
- /**
- * Closes the zip file. No further additions are possible.
- *
- * @throws IOException if the file couldn't be closed
- */
- public void close() throws IOException {
- this.zipOutputStream.close();
- }
-
- /**
- * Adds all subfiles of the given directory to the archive. Paths are made
- * relative to rootContainer.
- *
- * @param file The directory to add.
- * @param rootContainer The parent directory. All files' paths are made
- * relative to this folder.
- */
- private void addDirectoryContents( final File file, final File rootContainer )
- throws IOException
- {
- for( File subFile : file.listFiles() ) {
- addFile( subFile, rootContainer );
- }
- }
-
- /**
- * Writes the given InputStream to the ZipOutputStream
- */
- private void writeFileToZip( final InputStream inStream ) throws IOException {
- byte[] buffer = new byte[ 512 ];
- int lengthRead = 0;
- while( ( lengthRead = inStream.read( buffer ) ) != -1 ) {
- this.zipOutputStream.write( buffer, 0, lengthRead );
- }
- inStream.close();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/logging/Logger.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/logging/Logger.java
deleted file mode 100644
index 32eb4d8c..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/logging/Logger.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.logging;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * A logger with basic process handling facilities.
- */
-public class Logger {
-
- private int processCount = 0;
- private Map<Integer, Boolean> subProcesses = new HashMap<Integer, Boolean>();
- private boolean justEndedProcess = false;
-
- /** Log a single event */
- public void log( final String message ) {
- createNewEntry( message );
- justEndedProcess = true;
- }
-
- /** Log the beginning of an ongoing process. */
- public void logBeginProcess( final String message ) {
- createNewEntry( message );
- System.out.print( "..." );//$NON-NLS-1$
- processCount++;
- memorizeProcess( Boolean.FALSE );
- justEndedProcess = false;
- }
-
- private void createNewEntry( final String message ) {
- memorizeProcess( Boolean.TRUE );
- System.out.println();
- indent();
- System.out.print( message );
- }
-
- private void memorizeProcess( final Boolean value ) {
- subProcesses.put( getProcessCount(), value );
- }
-
- /** Indent to indicate sub-processes. */
- private void indent() {
- for( int index = 0; index < processCount; index++ ) {
- System.out.print( " " ); //$NON-NLS-1$
- }
- }
-
- public void logEndProcess( final String message ) {
- if( processCount > 0 ) {
- if( justEndedProcess ) {
- System.out.println();
- }
- boolean booleanValue = subProcesses.get( getProcessCount() )
- .booleanValue();
- processCount--;
- if( booleanValue ) {
- indent();
- }
- System.out.print( message );
- justEndedProcess = true;
- }
- }
-
- private Integer getProcessCount() {
- return Integer.valueOf( processCount );
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/logging/MessageLogger.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/logging/MessageLogger.java
deleted file mode 100644
index 83f09475..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/logging/MessageLogger.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.logging;
-
-/**
- * Combines logging and i18n into a single class.
- */
-public class MessageLogger {
-
- private final static MessageLogger instance = new MessageLogger();
- private final Logger logger = new Logger();
-
- public static MessageLogger getInstance() {
- return instance;
- }
-
- public void log( final String messageKey ) {
- logger.log( getI18nedMessage( messageKey ) );
- }
-
- public void log( final String messageKey, final Object argument ) {
- logger.log( getI18nedMessage( messageKey, argument ) );
- }
-
- public void logBeginProcess( final String messageKey ) {
- logger.logBeginProcess( getI18nedMessage( messageKey ) );
- }
-
- public void logBeginProcess( final String messageKey, final Object argument )
- {
- logger.logBeginProcess( getI18nedMessage( messageKey, argument ) );
- }
-
-
- private String getI18nedMessage( final String message ) {
- return Messages.getString( message );
- }
-
- private String getI18nedMessage( final String messageKey,
- final Object argument )
- {
- return Messages.getString( messageKey, argument );
- }
-
- public void logEndProcess() {
- logger.logEndProcess(Messages.getString( "Logger.Done" )); //$NON-NLS-1$
- }
-
- public void logEndProcess( final String messageKey ) {
- logger.logEndProcess( getI18nedMessage( messageKey ) );
- }
-
- public void logEndProcess( final String messageKey, final Object argument ) {
- logger.logEndProcess( getI18nedMessage( messageKey, argument ) );
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/logging/Messages.java b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/logging/Messages.java
deleted file mode 100644
index a43bd855..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/logging/Messages.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.logging;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/** Utility class providing basic internationalization facilities. */
-public class Messages {
-
- private static final String BUNDLE_NAME = "org.eclipse.epp.packaging.core.logging.messages"; //$NON-NLS-1$
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
-
- private Messages() {
- // private constructor
- }
-
- /**
- * Returns the value associated with the given key, or a placeholder if the
- * key does not exist.
- */
- public static String getString( final String key ) {
- String result;
- try {
- result = RESOURCE_BUNDLE.getString( key );
- } catch( MissingResourceException e ) {
- result = '!' + key + '!';
- }
- return result;
- }
-
- /**
- * Returns the value associated with the given key, using it as a message.
- *
- * @param key An internationalization key defined in a resource file. Should
- * denote a message.
- * @param argument The argument to insert into the message.
- */
- public static String getString( final String key, final Object argument ) {
- Object[] messageArgument = {
- argument
- };
- MessageFormat formatter = new MessageFormat( "" ); //$NON-NLS-1$
- formatter.applyPattern( getString( key ) );
- String output = formatter.format( messageArgument );
- return output;
- }
-}
diff --git a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/logging/messages.properties b/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/logging/messages.properties
deleted file mode 100644
index 505482f6..00000000
--- a/plugins/org.eclipse.epp.packaging.core/src/org/eclipse/epp/packaging/core/logging/messages.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-Application.FeatureCount={0} features listed.
-UpdateSiteManager.ListedSitesCount={0} sites listed.
-UpdateSiteManager.FeatureLookup=Looking up features
-UpdateSiteManager.FeaturesPresent=All features accounted for.
-UpdateSiteManager.FeaturesMissing=Could not locate all of the requested features. A list of missing features follows:
-Application.Installing=Installing features
-ExtensionSiteManager.SiteCreated=Created installation site at {0}.
-ExtensionSiteManager.InstallPlatform=Installing features for platform {0}
-ExtensionSiteManager.Installing=Installing feature {0}
-Application.Building=Building configured application
-Application.Packing=Packing installation site.
-EclipsePackager.ConfigurationFolder=Configuration files taken from {0}.
-EclipsePackager.TargetFolder=The application will be built in {0}.
-EclipsePackager.Running=Building
-PackageMover.MovingFiles=Moving Files
-Logger.Done=Done. \ No newline at end of file
diff --git a/test/org.eclipse.epp.packaging.core.test/.classpath b/test/org.eclipse.epp.packaging.core.test/.classpath
deleted file mode 100644
index 304e8618..00000000
--- a/test/org.eclipse.epp.packaging.core.test/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <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.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/test/org.eclipse.epp.packaging.core.test/.project b/test/org.eclipse.epp.packaging.core.test/.project
deleted file mode 100644
index 5bc155ac..00000000
--- a/test/org.eclipse.epp.packaging.core.test/.project
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.epp.packaging.core.test</name>
- <comment></comment>
- <projects>
- <project>org.eclipse.epp.packaging.core</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/test/org.eclipse.epp.packaging.core.test/.settings/org.eclipse.jdt.core.prefs b/test/org.eclipse.epp.packaging.core.test/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 27ed6930..00000000
--- a/test/org.eclipse.epp.packaging.core.test/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Tue Mar 27 18:41:53 CEST 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/test/org.eclipse.epp.packaging.core.test/META-INF/MANIFEST.MF b/test/org.eclipse.epp.packaging.core.test/META-INF/MANIFEST.MF
deleted file mode 100644
index 0d255122..00000000
--- a/test/org.eclipse.epp.packaging.core.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,12 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-SymbolicName: org.eclipse.epp.packaging.core.test;singleton:=true
-Bundle-Version: 0.5.0.qualifier
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.update.core,
- org.junit,
- org.eclipse.epp.packaging.core
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/test/org.eclipse.epp.packaging.core.test/build.properties b/test/org.eclipse.epp.packaging.core.test/build.properties
deleted file mode 100644
index 4d892a61..00000000
--- a/test/org.eclipse.epp.packaging.core.test/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties,\
- resources/
diff --git a/test/org.eclipse.epp.packaging.core.test/plugin.properties b/test/org.eclipse.epp.packaging.core.test/plugin.properties
deleted file mode 100644
index 11b98fec..00000000
--- a/test/org.eclipse.epp.packaging.core.test/plugin.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 Innoopract Informationssysteme GmbH
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Innoopract - initial API and implementation
-###############################################################################
-
-# properties file for org.eclipse.epp.packaging.core.test
-Bundle-Vendor = Eclipse.org
-Bundle-Name = EPP Core Tests \ No newline at end of file
diff --git a/test/org.eclipse.epp.packaging.core.test/resources/test/singleentryfile b/test/org.eclipse.epp.packaging.core.test/resources/test/singleentryfile
deleted file mode 100644
index f7fe244d..00000000
--- a/test/org.eclipse.epp.packaging.core.test/resources/test/singleentryfile
+++ /dev/null
@@ -1 +0,0 @@
-Entry \ No newline at end of file
diff --git a/test/org.eclipse.epp.packaging.core.test/resources/test/updatesite/features/org.eclipse.buckminster.core.feature_1.0.0.v20070205.jar b/test/org.eclipse.epp.packaging.core.test/resources/test/updatesite/features/org.eclipse.buckminster.core.feature_1.0.0.v20070205.jar
deleted file mode 100644
index b86058d4..00000000
--- a/test/org.eclipse.epp.packaging.core.test/resources/test/updatesite/features/org.eclipse.buckminster.core.feature_1.0.0.v20070205.jar
+++ /dev/null
Binary files differ
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/DummyPackagerConfiguration.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/DummyPackagerConfiguration.java
deleted file mode 100644
index 097103e3..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/DummyPackagerConfiguration.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.epp.packaging.core.configuration.IPackagerConfiguration;
-import org.eclipse.epp.packaging.core.configuration.IPlatform;
-import org.eclipse.update.core.VersionedIdentifier;
-
-/** Test class */
-public class DummyPackagerConfiguration implements IPackagerConfiguration {
-
- private static final String PACKAGER_CONFIGURATION_DIRECTORY
- = "packagerConfiguration"; //$NON-NLS-1$
-
- private URL siteUrl;
- private IPlatform[] platforms;
- private File baseDir;
- private List<VersionedIdentifier> identifiers = new ArrayList<VersionedIdentifier>();
-
- public File getExtensionSite() {
- throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
- }
-
- public File getTargetFolder() {
- return baseDir;
- }
-
- public void addRequiredFeature( final VersionedIdentifier identifier ) {
- identifiers.add( identifier );
- }
-
- public VersionedIdentifier[] getRequiredFeatures() {
- return identifiers.toArray( new VersionedIdentifier[ identifiers.size() ] );
- }
-
- public IPlatform[] getTargetPlatforms() {
- return platforms;
- }
-
- public String getRootFileBaseName() {
- return "Rootfile"; //$NON-NLS-1$
- }
-
- public URL[] getUpdateSites() {
- return new URL[]{
- siteUrl
- };
- }
-
- public void setUpdateSite( final String site ) throws MalformedURLException {
- this.siteUrl = new URL( site );
- }
-
- public void setTargetPlatforms( final IPlatform[] platformArray ) {
- this.platforms = platformArray;
- }
-
- public void setBaseFolder( final String baseFolder ) {
- this.baseDir = new File( baseFolder );
- }
-
- public File getPackagerConfigurationFolder() {
- File result = new File( this.baseDir, PACKAGER_CONFIGURATION_DIRECTORY );
- result.mkdir();
- return result;
- }
-
- public File getRootFileFolder() {
- throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
- }
-
- public String getProductName() {
- throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
- }
-
- public String getEclipseProductId() {
- throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
- }
-
- public String getInitialPerspectiveId() {
- throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
- }
-
- public IStatus checkFeatures( IProgressMonitor monitor ) throws CoreException
- {
- throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
- }
-
-} \ No newline at end of file
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/assembly/PluginUtils_PdeTest.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/assembly/PluginUtils_PdeTest.java
deleted file mode 100644
index 1b4adcb4..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/assembly/PluginUtils_PdeTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.assembly;
-
-import java.io.File;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-/** Test class*/
-public class PluginUtils_PdeTest extends TestCase {
-
- public void testFindRuntimeCore() throws Exception {
- String pluginPath = PluginUtils.getPluginPath( "org.eclipse.core.runtime" ); //$NON-NLS-1$
- Assert.assertNotNull( pluginPath );
- Assert.assertTrue( new File( pluginPath ).exists() );
- }
-} \ No newline at end of file
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/CommandLineParser_Test.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/CommandLineParser_Test.java
deleted file mode 100644
index 0c0e3015..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/CommandLineParser_Test.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-/** Test class */
-public class CommandLineParser_Test extends TestCase {
-
- public void testParsesConfigFile() throws Exception {
- ICommands command = ArgumentParser.parse( new String[]{
- "eclipsepackager.xml"} ); //$NON-NLS-1$
- Assert.assertEquals( "eclipsepackager.xml", command.getConfigurationFile().getName() ); //$NON-NLS-1$
- }
-
- public void testDefaultTasks() {
- ICommands command = ArgumentParser.parse( new String[]{
- "eclipsepackager.xml"} ); //$NON-NLS-1$
- Assert.assertTrue( command.mustDo( Task.CHECK ) );
- Assert.assertTrue( command.mustDo( Task.INSTALL ) );
- Assert.assertTrue( command.mustDo( Task.BUILD ) );
- }
-
- public void testParsesTasks() throws Exception {
- ICommands command = ArgumentParser.parse( new String[]{
- "eclipsepackager.xml", "check", "install"} ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- Assert.assertTrue( command.mustDo( Task.CHECK ) );
- Assert.assertTrue( command.mustDo( Task.INSTALL ) );
- }
-
- public void testParsesAllTasks() throws Exception {
- ICommands command = ArgumentParser.parse( new String[]{
- "eclipsepackager.xml", "check", "install", "build"} ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- Assert.assertTrue( command.mustDo( Task.CHECK ) );
- Assert.assertTrue( command.mustDo( Task.INSTALL ) );
- Assert.assertTrue( command.mustDo( Task.BUILD ) );
- }
-
- public void testBadArgumentType() throws Exception {
- try {
- ArgumentParser.parse( null );
- fail();
- } catch( IllegalArgumentException e ) {
- // expected exception
- }
- }
-} \ No newline at end of file
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/Platform_Test.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/Platform_Test.java
deleted file mode 100644
index 808c5d70..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/Platform_Test.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration;
-
-import org.eclipse.epp.packaging.core.configuration.Platform;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-/**Test class */
-public class Platform_Test extends TestCase {
-
- public void testEquals() throws Exception {
- Platform platform = new Platform( "win32", "win32", "x86", null, null ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- Platform secondPlatform = new Platform( "win32", "win32", "x86", null, null ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- assertTrue( platform.equals( secondPlatform ) );
- }
-
- public void testToString() throws Exception {
- Platform platform = new Platform( "win32", "win32", "x86", null, null ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- Assert.assertEquals( "win32,win32,x86", platform.toString() ); //$NON-NLS-1$
- }
-
- public void testAdvancedToString() throws Exception {
- Platform platform = new Platform( "win32", "win32", "x86", null, null ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- Assert.assertEquals( "win32nwin32nx86", platform.toString( 'n' ) ); //$NON-NLS-1$
- }
-
- public void testDefaultArchiveFormat() {
- Platform platform = new Platform( "win32", "win32", "x86", null, null ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- Assert.assertEquals( "antZip", platform.getArchiveFormat().name() ); //$NON-NLS-1$
- }
-
- public void testSetArchiveFormat() throws Exception {
- Platform platform = new Platform( "win32", "win32", "x86", null, null ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- platform.setArchiveFormat( "tar" ); //$NON-NLS-1$
- Assert.assertEquals( "tar", platform.getArchiveFormat().name() ); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/xml/ConfigurationParser_PdeTest.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/xml/ConfigurationParser_PdeTest.java
deleted file mode 100644
index e0930875..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/configuration/xml/ConfigurationParser_PdeTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.configuration.xml;
-
-import java.io.File;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.epp.packaging.core.configuration.ArchiveFormat;
-import org.eclipse.epp.packaging.core.configuration.IPackagerConfiguration;
-import org.eclipse.epp.packaging.core.configuration.IPlatform;
-import org.eclipse.epp.packaging.core.configuration.Platform;
-import org.eclipse.epp.packaging.core.configuration.xml.ConfigurationParser;
-import org.eclipse.update.core.VersionedIdentifier;
-
-/** Test class */
-public class ConfigurationParser_PdeTest extends TestCase {
-
- private final static String xml = "<configuration>" //$NON-NLS-1$
- + "<rcp version=\"3.2\"/>" //$NON-NLS-1$
- + "<product name=\"EPPBuild\"" //$NON-NLS-1$
- + " eclipseProductId=\"org.eclipse.platform.ide\"" //$NON-NLS-1$
- + " initialPerspectiveId=\"org.eclipse.cdt.ui.CPerspective\" />" //$NON-NLS-1$
- + "<updateSites>" //$NON-NLS-1$
- + " <updateSite url=\"http://update.eclipse.org/updates/3.2/\"/>" //$NON-NLS-1$
- + "</updateSites>" //$NON-NLS-1$
- + "<requiredFeatures>" //$NON-NLS-1$
- + " <feature id=\"org.eclipse.rcp\" version=\"3.1.1\"/>" //$NON-NLS-1$
- + "</requiredFeatures>" //$NON-NLS-1$
- + "<rootFileFolder folder=\"/home/root\"/>" //$NON-NLS-1$
- + "<extensionSite relativeFolder=\"site\"/>" //$NON-NLS-1$
- + "<targetPlatforms>" //$NON-NLS-1$
- + " <platform os=\"linux\" ws=\"gtk\" arch=\"x86\">" //$NON-NLS-1$
- + " <eclipseIniFileContent path=\"/eclipse/\">Content" //$NON-NLS-1$
- + "of first eclipse.ini</eclipseIniFileContent>" //$NON-NLS-1$
- + " </platform>" //$NON-NLS-1$
- + " <platform os=\"win32\" ws=\"win32\" arch=\"x86\">" //$NON-NLS-1$
- + " <archiveFormat format=\"tar\"/>" //$NON-NLS-1$
- + " <eclipseIniFileContent path=\"/eclipse/\">Content" //$NON-NLS-1$
- + "of second eclipse.ini</eclipseIniFileContent>" //$NON-NLS-1$
- + " </platform>" //$NON-NLS-1$
- + "</targetPlatforms>" //$NON-NLS-1$
- + "</configuration>"; //$NON-NLS-1$
-
- public void testParseUpdateSites() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- Assert.assertEquals( "http://update.eclipse.org/updates/3.2/", //$NON-NLS-1$
- config.getUpdateSites()[ 0 ].toExternalForm() );
- }
-
- public void testParseFeatures() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- Assert.assertEquals( new VersionedIdentifier( "org.eclipse.rcp", "3.1.1" ), //$NON-NLS-1$ //$NON-NLS-2$
- config.getRequiredFeatures()[ 0 ] );
- }
-
- public void testParseRelativeExtensionSite() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- Assert.assertEquals( new File( org.eclipse.core.runtime.Platform.getLocation()
- .toFile(),
- "site" ), //$NON-NLS-1$
- config.getExtensionSite() );
- }
-
- public void testParseTargetPlatformWithoutFormat() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- IPlatform platform = config.getTargetPlatforms()[ 0 ];
- Assert.assertEquals( new Platform( "linux", "gtk", "x86", null, null ), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- platform );
- Assert.assertEquals( ArchiveFormat.antZip, platform.getArchiveFormat() );
- }
-
- public void testParsePlatformWithFormat() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- IPlatform platform = config.getTargetPlatforms()[ 1 ];
- Assert.assertEquals( new Platform( "win32", "win32", "x86", null, null ), platform ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- Assert.assertEquals( ArchiveFormat.tar, platform.getArchiveFormat() );
- }
-
- public void testParseRcpVersion() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- String basename = config.getRootFileBaseName();
- Assert.assertEquals( "eclipse-platform-3.2-", basename ); //$NON-NLS-1$
- }
-
- public void testParseRootFiles() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- File folder = config.getRootFileFolder();
- Assert.assertEquals( new File( "/home/root" ), folder ); //$NON-NLS-1$
- }
-
- public void testParseProductName() throws Exception {
- IPackagerConfiguration config = new ConfigurationParser( null ).parseConfiguration( xml );
- Assert.assertEquals( "EPPBuild", config.getProductName() ); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/download/SiteCreator_PdeTest.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/download/SiteCreator_PdeTest.java
deleted file mode 100644
index 4e8e5644..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/download/SiteCreator_PdeTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.download;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.epp.packaging.core.download.SiteCreator;
-import org.eclipse.update.configuration.IConfiguredSite;
-import org.eclipse.update.core.SiteManager;
-
-/** Test class */
-public class SiteCreator_PdeTest extends TestCase {
-
- private static final String SITE = "./site"; //$NON-NLS-1$
-
- public void testFilesAreCreated() throws IOException, CoreException {
- SiteCreator.createInstallationSite( new File( SITE ) );
- Assert.assertTrue( new File( SITE ).exists() );
- }
-
- public void testExtensionSiteIsCreated() throws IOException, CoreException {
- IConfiguredSite site = SiteCreator.createInstallationSite( new File( SITE ) );
- Assert.assertTrue( site.isExtensionSite() );
- Assert.assertTrue( site.isEnabled() );
- Assert.assertTrue( site.isUpdatable() );
- }
-
- public void testClearExtensionSite() throws CoreException, IOException {
- SiteCreator.createInstallationSite( new File( SITE ) );
- SiteCreator.removeInstallationSite( SITE );
- IConfiguredSite[] configuredSites = SiteManager.getLocalSite()
- .getCurrentConfiguration()
- .getConfiguredSites();
- File file = new File( SITE );
- String fileUrl = file.toURL().toExternalForm() + "eclipse/"; //$NON-NLS-1$
- for( IConfiguredSite site : configuredSites ) {
- Assert.assertFalse( site.getSite()
- .getURL()
- .toExternalForm()
- .equals( fileUrl ) );
- }
- Assert.assertFalse( file.exists() );
- }
-
- @Override
- public void tearDown() throws CoreException, MalformedURLException
- {
- SiteCreator.removeInstallationSite( SITE );
- }
-}
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/download/UpdateSiteManager_PdeTest.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/download/UpdateSiteManager_PdeTest.java
deleted file mode 100644
index 3d8457e7..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/download/UpdateSiteManager_PdeTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.download;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.epp.packaging.core.DummyPackagerConfiguration;
-import org.eclipse.epp.packaging.core.download.UpdateSiteManager;
-import org.eclipse.update.core.IFeature;
-import org.eclipse.update.core.VersionedIdentifier;
-
-/** Test class*/
-public class UpdateSiteManager_PdeTest extends TestCase {
-
- private static final String UPDATESITE_URL
- = "http://download.eclipse.org/eclipse/updates/"; //$NON-NLS-1$
- private static final VersionedIdentifier FEATURE_1
- = new VersionedIdentifier( "org.eclipse.platform", //$NON-NLS-1$
- "2.0.0" ); //$NON-NLS-1$
- private static final VersionedIdentifier FEATURE_2
- = new VersionedIdentifier( "org.eclipse.jdt", //$NON-NLS-1$
- "2.0.0" ); //$NON-NLS-1$
- private DummyPackagerConfiguration configuration;
- private UpdateSiteManager manager;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- this.configuration = new DummyPackagerConfiguration();
- this.configuration.setUpdateSite( UPDATESITE_URL );
- this.configuration.addRequiredFeature( FEATURE_1 );
- this.configuration.addRequiredFeature( FEATURE_2 );
- this.manager = new UpdateSiteManager( this.configuration );
- }
-
- // For some reason, this fails with the local update site.
- public void testGetFeature()
- throws CoreException, MalformedURLException, IOException
- {
- IFeature[] feature = this.manager.getFeatures();
- Assert.assertEquals( 2, feature.length );
- }
-
- public void testAllFeaturesPresent()
- throws MalformedURLException, IOException, CoreException
- {
- this.manager = new UpdateSiteManager( this.configuration );
- Assert.assertTrue( this.manager.areFeaturesPresent( new VersionedIdentifier[]{
- FEATURE_1, FEATURE_2
- } ) );
- }
-}
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/io/FileUtils_Test.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/io/FileUtils_Test.java
deleted file mode 100644
index f0755d93..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/io/FileUtils_Test.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.io;
-
-import java.io.File;
-
-import org.eclipse.epp.packaging.core.io.FileUtils;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-/** Test class */
-public class FileUtils_Test extends TestCase {
-
- public void testFileIsCopied() throws Exception {
- FileUtils.copy( "./resources/test/singleentryfile", //$NON-NLS-1$
- "./resources/test/copy" ); //$NON-NLS-1$
- Assert.assertTrue( new File( "./resources/test/copy" ).exists() ); //$NON-NLS-1$
- }
-
- public void testCopyFileDirectly() throws Exception {
- FileUtils.copy( new File( "./resources/test/singleentryfile" ), //$NON-NLS-1$
- new File( "./resources/test/copy" ) ); //$NON-NLS-1$
- Assert.assertTrue( new File( "./resources/test/copy" ).exists() ); //$NON-NLS-1$
- }
-
- public void testDirectoryIsCreated() throws Exception {
- FileUtils.copy( "./resources/test/singleentryfile", //$NON-NLS-1$
- "./resources/test/copy/copy" ); //$NON-NLS-1$
- Assert.assertTrue( new File( "./resources/test/copy/copy" ).exists() ); //$NON-NLS-1$
- new File( "./resources/test/copy/copy" ).delete(); //$NON-NLS-1$
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- new File( "./resources/test/copy" ).delete(); //$NON-NLS-1$
- }
-}
diff --git a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/io/Zip_Test.java b/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/io/Zip_Test.java
deleted file mode 100644
index 4f1ff4df..00000000
--- a/test/org.eclipse.epp.packaging.core.test/src/org/eclipse/epp/packaging/core/io/Zip_Test.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Innoopract Informationssysteme GmbH
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Innoopract - initial API and implementation
- *******************************************************************************/
-package org.eclipse.epp.packaging.core.io;
-
-import java.io.File;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.epp.packaging.core.io.Zip;
-
-/** Test class */
-public class Zip_Test extends TestCase {
-
- private static final String TEST_ZIP_PATH
- = "./resources/test/test.zip"; //$NON-NLS-1$
- private Zip zip = null;
-
- @Override
- protected void setUp() throws Exception
- {
- this.zip = new Zip( new File( TEST_ZIP_PATH ) );
- }
-
- public void testCreateZipFile() throws Exception {
- this.zip.addFile( "./resources/test/singleentryfile" ); //$NON-NLS-1$
- this.zip.close();
- Assert.assertTrue( new File( TEST_ZIP_PATH ).exists() );
- }
-
- public void testAddFile() throws Exception {
- this.zip.addFile( "./resources/test/singleentryfile" ); //$NON-NLS-1$
- this.zip.close();
- ZipFile zipFile = new ZipFile( TEST_ZIP_PATH );
- ZipEntry entry = zipFile.getEntry( "resources/test/singleentryfile" ); //$NON-NLS-1$
- Assert.assertNotNull( entry );
- }
-
- // TODO test fails sometimes when not in debug mode... timing problem?
- public void testAddFolder() throws Exception {
- this.zip.addFolder( new File( "./resources/test/updatesite/features" ) ); //$NON-NLS-1$
- this.zip.close();
- ZipFile zipFile = new ZipFile( TEST_ZIP_PATH );
- ZipEntry entry = zipFile.getEntry( "org.eclipse.buckminster.core.feature_1.0.0.v20070205.jar" ); //$NON-NLS-1$
- Assert.assertNotNull( entry );
- }
-
- // TODO test fails sometimes when not in debug mode... timing problem?
- public void testAddFileAs() throws Exception {
- File testFile = new File( "./resources/test/singleentryfile" ); //$NON-NLS-1$
- this.zip.addFileAs( testFile, "eclipse/configuration/config.ini" ); //$NON-NLS-1$
- this.zip.close();
- ZipEntry entry = new ZipFile( TEST_ZIP_PATH ).getEntry( "eclipse/configuration/config.ini" ); //$NON-NLS-1$
- Assert.assertNotNull( entry );
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- new File( TEST_ZIP_PATH ).delete();
- }
-}

Back to the top