Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2007-11-08 17:54:11 +0000
committerDJ Houghton2007-11-08 17:54:11 +0000
commit7c54b56327b689b17b5ccd78fca0733d6dcfe78e (patch)
tree1e295f85bba464dbee1684d62627aa9e5f8942e3 /bundles
parent932b58e539fe44b914bfad520508aebc9ba53ba9 (diff)
downloadrt.equinox.p2-7c54b56327b689b17b5ccd78fca0733d6dcfe78e.tar.gz
rt.equinox.p2-7c54b56327b689b17b5ccd78fca0733d6dcfe78e.tar.xz
rt.equinox.p2-7c54b56327b689b17b5ccd78fca0733d6dcfe78e.zip
Bug 209086 - [prov] Need to create Ant tasks for p2 applicationsv20071108-1253
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.classpath1
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.cvsignore3
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.externalToolBuilders/Build Director Ant Tasks.launch20
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.project10
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.ui.prefs9
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/build.properties5
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/plugin.xml12
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml51
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java170
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.classpath1
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.cvsignore2
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch20
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.project10
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.ui.prefs6
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator RCP (1).launch24
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator RCP (2).launch24
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/build.properties5
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/plugin.xml13
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml51
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java15
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/p2/metadata/generator/ant/GeneratorTask.java194
23 files changed, 644 insertions, 18 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.classpath b/bundles/org.eclipse.equinox.p2.director.app/.classpath
index ce0c7a5d4..47ddcce2d 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/.classpath
+++ b/bundles/org.eclipse.equinox.p2.director.app/.classpath
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src_ant"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.0%Foundation-1.0"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.cvsignore b/bundles/org.eclipse.equinox.p2.director.app/.cvsignore
index c5e82d745..905d1d66d 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/.cvsignore
+++ b/bundles/org.eclipse.equinox.p2.director.app/.cvsignore
@@ -1 +1,2 @@
-bin \ No newline at end of file
+bin
+ant_tasks \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.externalToolBuilders/Build Director Ant Tasks.launch b/bundles/org.eclipse.equinox.p2.director.app/.externalToolBuilders/Build Director Ant Tasks.launch
new file mode 100644
index 000000000..4fe9972cb
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.director.app/.externalToolBuilders/Build Director Ant Tasks.launch
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.director.app"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.project b/bundles/org.eclipse.equinox.p2.director.app/.project
index 94d69c3bd..e163d3d36 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/.project
+++ b/bundles/org.eclipse.equinox.p2.director.app/.project
@@ -11,6 +11,16 @@
</arguments>
</buildCommand>
<buildCommand>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value>&lt;project&gt;/.externalToolBuilders/Build Director Ant Tasks.launch</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.ui.prefs
index 03102cb3f..6eb32386b 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.ui.prefs
+++ b/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.ui.prefs
@@ -1,4 +1,4 @@
-#Sun Sep 23 11:57:58 EDT 2007
+#Thu Nov 08 11:15:08 EST 2007
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_core
@@ -12,6 +12,7 @@ sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
sp_cleanup.add_serial_version_id=false
@@ -20,14 +21,16 @@ sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
sp_cleanup.make_local_variable_final=false
sp_cleanup.make_parameters_final=false
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_variable_declarations_final=true
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
+sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
@@ -46,7 +49,7 @@ sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
+sp_cleanup.sort_members=true
sp_cleanup.sort_members_all=false
sp_cleanup.use_blocks=false
sp_cleanup.use_blocks_only_for_return_and_throw=false
diff --git a/bundles/org.eclipse.equinox.p2.director.app/build.properties b/bundles/org.eclipse.equinox.p2.director.app/build.properties
index 4bbd9bd55..fd5507d03 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/build.properties
+++ b/bundles/org.eclipse.equinox.p2.director.app/build.properties
@@ -9,10 +9,15 @@
# IBM Corporation - initial API and implementation
###############################################################################
source.. = src/
+source.ant_tasks/director-ant.jar=src_ant/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
+ ant_tasks/director-ant.jar,\
about.html,\
plugin.properties
src.includes = about.html
+jars.compile.order=.,ant_tasks/director-ant.jar
+extra.ant_tasks/director-ant.jar = platform:/plugin/org.apache.ant
+jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
diff --git a/bundles/org.eclipse.equinox.p2.director.app/plugin.xml b/bundles/org.eclipse.equinox.p2.director.app/plugin.xml
index 9b8a9c1d2..8760c1333 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/plugin.xml
+++ b/bundles/org.eclipse.equinox.p2.director.app/plugin.xml
@@ -15,4 +15,16 @@
</product>
</extension>
+ <extension point="org.eclipse.ant.core.antTasks">
+ <antTask
+ library="ant_tasks/director-ant.jar"
+ name="p2.director"
+ class="org.eclipse.equinox.p2.director.app.ant.DirectorTask">
+ </antTask>
+ </extension>
+
+ <extension point="org.eclipse.ant.core.extraClasspathEntries">
+ <extraClasspathEntry library="ant_tasks/director-ant.jar"/>
+ </extension>
+
</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml b/bundles/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml
new file mode 100644
index 000000000..eddf1d9d2
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="org.eclipse.core.resources" default="main" basedir="..">
+
+ <target name="main" depends="clean, ant_tasks/director-ant.jar">
+ </target>
+
+ <target name="init" depends="properties">
+ <property name="plugin" value="org.eclipse.equinox.p2.director.app"/>
+ <property name="temp.folder" value="${basedir}/temp.folder"/>
+ <property name="plugin.destination" value="${basedir}"/>
+ <property name="build.result.folder" value="${basedir}/ant_tasks"/>
+ <property name="version.suffix" value="_3.1.0"/>
+ </target>
+
+ <target name="properties" if="eclipse.running">
+ <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+ </target>
+
+ <target name="ant_tasks/director-ant.jar" depends="init" unless="ant_tasks/director-ant.jar">
+ <property name="destdir" value="${temp.folder}/ant_tasks/director-ant.jar.bin"/>
+ <delete dir="${temp.folder}/ant_tasks/director-ant.jar.bin"/>
+ <mkdir dir="${temp.folder}/ant_tasks/director-ant.jar.bin"/>
+ <!-- compile the source code -->
+ <javac destdir="${temp.folder}/ant_tasks/director-ant.jar.bin" failonerror="true" verbose="true" debug="on">
+ <classpath>
+ <dirset dir="${basedir}/..">
+ <include name="org.eclipse.equinox.p2.director.app/bin"/>
+ <include name="org.eclipse.osgi/bin"/>
+ </dirset>
+ <fileset dir="${eclipse.home}">
+ <include name="plugins/org.eclipse.equinox.p2.director.app*.jar"/>
+ <include name="plugins/org.eclipse.osgi*.jar"/>
+ </fileset>
+ </classpath>
+ <src path="src_ant/"/>
+ </javac>
+ <!-- copy necessary resources -->
+ <copy todir="${temp.folder}/ant_tasks/director-ant.jar.bin">
+ <fileset dir="src_ant/" excludes="**/*.java"/>
+ </copy>
+ <mkdir dir="${build.result.folder}"/>
+ <jar jarfile="${build.result.folder}/director-ant.jar" basedir="${temp.folder}/ant_tasks/director-ant.jar.bin"/>
+ <delete dir="${temp.folder}/ant_tasks/director-ant.jar.bin"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+
+ <target name="clean" depends="init">
+ <delete file="${build.result.folder}/director-ant.jar"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+</project> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java
index 71f2b5642..5dfc0e2a3 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java
+++ b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java
@@ -9,7 +9,8 @@
package org.eclipse.equinox.internal.p2.director.app;
import java.net.URL;
-import java.util.*;
+import java.util.Enumeration;
+import java.util.Properties;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
@@ -52,9 +53,12 @@ public class Application implements IApplication {
* @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
*/
public Object start(IApplicationContext context) throws Exception {
+ return run((String[]) context.getArguments().get("application.args"));
+ }
+
+ public Object run(String[] args) throws Exception {
long time = -System.currentTimeMillis();
- Map args = context.getArguments();
- initializeFromArguments((String[]) args.get("application.args"));
+ initializeFromArguments(args);
Properties props = new Properties();
props.setProperty(Profile.PROP_INSTALL_FOLDER, destination);
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java b/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java
new file mode 100644
index 000000000..fb430c1ee
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java
@@ -0,0 +1,170 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.equinox.p2.director.app.ant;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.tools.ant.*;
+import org.eclipse.equinox.internal.p2.director.app.Application;
+import org.osgi.framework.Version;
+
+/**
+ * An Ant task to call the p2 Director application.
+ *
+ * @since 1.0
+ */
+public class DirectorTask extends Task {
+
+ boolean roaming;
+ String profile, flavor, os, ws, nl, arch, installIU, uninstallIU;
+ File destination, bundlePool;
+ URL metadataRepository, artifactRepository;
+ Version version;
+
+ /*
+ * (non-Javadoc)
+ * @see org.apache.tools.ant.Task#execute()
+ */
+ public void execute() throws BuildException {
+ try {
+ // collect the arguments and call the application
+ new Application().run(getArguments());
+ } catch (Exception e) {
+ throw new BuildException("Exception while calling the director task.", e);
+ }
+ }
+
+ private String[] getArguments() {
+ List result = new ArrayList();
+ if (roaming)
+ result.add("-roaming");
+ if (profile != null) {
+ result.add("-profile");
+ result.add(profile);
+ }
+ if (destination != null) {
+ result.add("-destination");
+ result.add(destination.getAbsolutePath());
+ }
+ if (bundlePool != null) {
+ result.add("-bundlePool");
+ result.add(bundlePool.getAbsolutePath());
+ }
+ if (metadataRepository != null) {
+ result.add("-metadataRepository");
+ result.add(metadataRepository.toExternalForm());
+ }
+ if (artifactRepository != null) {
+ result.add("-artifactRepository");
+ result.add(artifactRepository.toExternalForm());
+ }
+ if (flavor != null) {
+ result.add("-flavor");
+ result.add(flavor);
+ }
+ if (version != null) {
+ result.add("-version");
+ result.add(version.toString());
+ }
+ if (os != null) {
+ result.add("-p2.os");
+ result.add(os);
+ }
+ if (ws != null) {
+ result.add("-p2.ws");
+ result.add(ws);
+ }
+ if (arch != null) {
+ result.add("-p2.arch");
+ result.add(arch);
+ }
+ if (nl != null) {
+ result.add("-p2.nl");
+ result.add(nl);
+ }
+ if (installIU != null) {
+ result.add("-installIU");
+ result.add(installIU);
+ }
+ if (uninstallIU != null) {
+ result.add("-uninstallIU");
+ result.add(uninstallIU);
+ }
+ return (String[]) result.toArray(new String[result.size()]);
+ }
+
+ public void setArch(String value) {
+ arch = value;
+ }
+
+ public void setArtifactRepository(String value) {
+ try {
+ artifactRepository = new URL(value);
+ } catch (MalformedURLException e) {
+ log("Error setting the artifact repository.", e, Project.MSG_ERR);
+ }
+ }
+
+ public void setBundlePool(String value) {
+ bundlePool = new File(value);
+ }
+
+ public void setDestination(String value) {
+ destination = new File(value);
+ }
+
+ public void setFlavor(String value) {
+ flavor = value;
+ }
+
+ public void setInstallIU(String value) {
+ installIU = value;
+ }
+
+ public void setMetadataRepository(String value) {
+ try {
+ metadataRepository = new URL(value);
+ } catch (MalformedURLException e) {
+ log("Error setting the metadata repository.", e, Project.MSG_ERR);
+ }
+ }
+
+ public void setNl(String value) {
+ nl = value;
+ }
+
+ public void setOs(String value) {
+ os = value;
+ }
+
+ public void setProfile(String value) {
+ profile = value;
+ }
+
+ public void setRoaming(String value) {
+ roaming = Boolean.valueOf(value).booleanValue();
+ }
+
+ public void setUninstallIU(String value) {
+ uninstallIU = value;
+ }
+
+ public void setVersion(String value) {
+ version = new Version(value);
+ }
+
+ public void setWs(String value) {
+ ws = value;
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.classpath b/bundles/org.eclipse.equinox.p2.metadata.generator/.classpath
index ce7393340..dbdcc847a 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.classpath
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/.classpath
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src_ant"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.cvsignore b/bundles/org.eclipse.equinox.p2.metadata.generator/.cvsignore
index f2fc20d10..e17d879bf 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.cvsignore
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/.cvsignore
@@ -1,2 +1,4 @@
org.eclipse.equinox.simpleconfigurator.jar
org.eclipse.update.configurator.jar
+bin
+ant_tasks \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch b/bundles/org.eclipse.equinox.p2.metadata.generator/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch
new file mode 100644
index 000000000..b515c413e
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.metadata.generator"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value=""/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.project b/bundles/org.eclipse.equinox.p2.metadata.generator/.project
index e6dfdd066..6e83cc27a 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.project
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/.project
@@ -11,6 +11,16 @@
</arguments>
</buildCommand>
<buildCommand>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value>&lt;project&gt;/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs
index 1aa30c50f..5ec10c2a1 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Mon Oct 22 13:16:24 EDT 2007
+#Thu Nov 08 09:42:47 EST 2007
eclipse.preferences.version=1
org.eclipse.jdt.core.builder.cleanOutputFolder=clean
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -36,6 +36,9 @@ org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=wa
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
@@ -43,6 +46,7 @@ org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.ui.prefs
index 6fa219331..d23434f7b 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.ui.prefs
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.ui.prefs
@@ -1,4 +1,4 @@
-#Mon Oct 22 13:16:24 EDT 2007
+#Thu Nov 08 09:42:47 EST 2007
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_core
@@ -30,7 +30,7 @@ sp_cleanup.make_private_fields_final=true
sp_cleanup.make_variable_declarations_final=true
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
+sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
@@ -49,7 +49,7 @@ sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
+sp_cleanup.sort_members=true
sp_cleanup.sort_members_all=false
sp_cleanup.use_blocks=false
sp_cleanup.use_blocks_only_for_return_and_throw=false
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator RCP (1).launch b/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator RCP (1).launch
new file mode 100644
index 000000000..def65edc7
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator RCP (1).launch
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="automaticAdd" value="false"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Metadata Generator RCP (1)"/>
+<booleanAttribute key="default_auto_start" value="false"/>
+<intAttribute key="default_start_level" value="4"/>
+<booleanAttribute key="includeOptional" value="false"/>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog&#13;&#10;-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator&#13;&#10;-root rcp.1 -rootVersion 3.3.0 -flavor tooling &#10;-publishArtifacts -append&#13;&#10;-metadataRepository file:d:/temp/zzz.servers/&#13;&#10;-artifactRepository file:d:/temp/zzz.servers/&#13;&#10;-source d:/temp/zzz.rcp/eclipse"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="target_bundles" value="com.ibm.icu@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime@default:default,org.eclipse.core.runtime.compatibility.registry@default:default,org.eclipse.equinox.app@default:true,org.eclipse.equinox.common@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.launcher.win32.win32.x86@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi@:,org.eclipse.osgi.services@default:default,org.eclipse.update.configurator@default:default"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useNamedJRE" value="true"/>
+<stringAttribute key="vminstall" value="jdk 1.4.2"/>
+<stringAttribute key="workspace_bundles" value="org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.eclipse.ecf@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:true,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.download@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.metadata.repository@default:default"/>
+</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator RCP (2).launch b/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator RCP (2).launch
new file mode 100644
index 000000000..f4444aa2d
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator RCP (2).launch
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="automaticAdd" value="false"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Metadata Generator RCP (2)"/>
+<booleanAttribute key="default_auto_start" value="false"/>
+<intAttribute key="default_start_level" value="4"/>
+<booleanAttribute key="includeOptional" value="false"/>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog&#13;&#10;-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator&#13;&#10;-root rcp.2 -rootVersion 3.3.0 -flavor tooling &#10;-publishArtifacts -append&#13;&#10;-metadataRepository file:d:/temp/zzz.servers/&#13;&#10;-artifactRepository file:d:/temp/zzz.servers/&#13;&#10;-source d:/temp/zzz.rcp/eclipse"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="target_bundles" value="com.ibm.icu@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime@default:default,org.eclipse.core.runtime.compatibility.registry@default:default,org.eclipse.equinox.app@default:true,org.eclipse.equinox.common@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.launcher.win32.win32.x86@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi@:,org.eclipse.osgi.services@default:default,org.eclipse.update.configurator@default:default"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useNamedJRE" value="true"/>
+<stringAttribute key="vminstall" value="jdk 1.4.2"/>
+<stringAttribute key="workspace_bundles" value="org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.eclipse.ecf@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:true,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.download@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.metadata.repository@default:default"/>
+</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/build.properties b/bundles/org.eclipse.equinox.p2.metadata.generator/build.properties
index 923cc056b..ca56ce627 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/build.properties
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/build.properties
@@ -9,6 +9,7 @@
# IBM Corporation - initial API and implementation
###############################################################################
source.. = src/
+source.ant_tasks/generator-ant.jar=src_ant/
output.. = bin/
bin.includes = META-INF/,\
.,\
@@ -24,5 +25,9 @@ bin.includes = META-INF/,\
CDC-1.1_Foundation-1.1.profile,\
CDC-1.0_Foundation-1.0.profile,\
plugin.xml,\
+ ant_tasks/generator-ant.jar,\
plugin.properties
src.includes = about.html
+jars.compile.order=.,ant_tasks/generator-ant.jar
+extra.ant_tasks/generator-ant.jar = platform:/plugin/org.apache.ant
+jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.xml b/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.xml
index 1f7928fc2..b102cf756 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.xml
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.xml
@@ -19,4 +19,17 @@
name="Equinox Provisioning Metadata Generator">
</product>
</extension>
+
+ <extension point="org.eclipse.ant.core.antTasks">
+ <antTask
+ library="ant_tasks/p2-generator.jar"
+ name="p2.generator"
+ class="org.eclipse.equinox.p2.metadata.generator.ant.GeneratorTask">
+ </antTask>
+ </extension>
+
+ <extension point="org.eclipse.ant.core.extraClasspathEntries">
+ <extraClasspathEntry library="ant_tasks/generator-ant.jar"/>
+ </extension>
+
</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml b/bundles/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml
new file mode 100644
index 000000000..78206643b
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="org.eclipse.core.resources" default="main" basedir="..">
+
+ <target name="main" depends="clean, ant_tasks/generator-ant.jar">
+ </target>
+
+ <target name="init" depends="properties">
+ <property name="plugin" value="org.eclipse.equinox.p2.generator.app"/>
+ <property name="temp.folder" value="${basedir}/temp.folder"/>
+ <property name="plugin.destination" value="${basedir}"/>
+ <property name="build.result.folder" value="${basedir}/ant_tasks"/>
+ <property name="version.suffix" value="_3.1.0"/>
+ </target>
+
+ <target name="properties" if="eclipse.running">
+ <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+ </target>
+
+ <target name="ant_tasks/generator-ant.jar" depends="init" unless="ant_tasks/generator-ant.jar">
+ <property name="destdir" value="${temp.folder}/ant_tasks/generator-ant.jar.bin"/>
+ <delete dir="${temp.folder}/ant_tasks/generator-ant.jar.bin"/>
+ <mkdir dir="${temp.folder}/ant_tasks/generator-ant.jar.bin"/>
+ <!-- compile the source code -->
+ <javac destdir="${temp.folder}/ant_tasks/generator-ant.jar.bin" failonerror="true" verbose="true" debug="on">
+ <classpath>
+ <dirset dir="${basedir}/..">
+ <include name="org.eclipse.equinox.p2.metadata.generator/bin"/>
+ <include name="org.eclipse.osgi/bin"/>
+ </dirset>
+ <fileset dir="${eclipse.home}">
+ <include name="plugins/org.eclipse.equinox.p2.metadata.generator*.jar"/>
+ <include name="plugins/org.eclipse.osgi*.jar"/>
+ </fileset>
+ </classpath>
+ <src path="src_ant/"/>
+ </javac>
+ <!-- copy necessary resources -->
+ <copy todir="${temp.folder}/ant_tasks/generator-ant.jar.bin">
+ <fileset dir="src_ant/" excludes="**/*.java"/>
+ </copy>
+ <mkdir dir="${build.result.folder}"/>
+ <jar jarfile="${build.result.folder}/generator-ant.jar" basedir="${temp.folder}/ant_tasks/generator-ant.jar.bin"/>
+ <delete dir="${temp.folder}/ant_tasks/generator-ant.jar.bin"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+
+ <target name="clean" depends="init">
+ <delete file="${build.result.folder}/generator-ant.jar"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+</project> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java
index 275aba69f..278e7bc2a 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java
@@ -13,7 +13,6 @@ package org.eclipse.equinox.internal.p2.metadata.generator;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.Map;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
@@ -249,20 +248,18 @@ public class EclipseGeneratorApplication implements IApplication {
}
}
- public Object start(IApplicationContext context) throws Exception {
+ public Object run(String args[]) throws Exception {
registerEventBus();
registerDefaultMetadataRepoManager();
registerDefaultArtifactRepoManager();
EclipseInstallGeneratorInfoProvider provider = new EclipseInstallGeneratorInfoProvider();
- Map args = context.getArguments();
- processCommandLineArguments((String[]) args.get("application.args"), provider);
+ processCommandLineArguments(args, provider);
initialize(provider);
if (provider.getBaseLocation() == null) {
System.out.println("Eclipse base location not specified");
- String[] a = (String[]) args.get("application.args");
- for (int i = 0; i < a.length; i++)
- System.out.println(a[i]);
+ for (int i = 0; i < args.length; i++)
+ System.out.println(args[i]);
return IApplication.EXIT_OK;
}
System.out.println("Generating metadata for " + provider.getBaseLocation());
@@ -278,6 +275,10 @@ public class EclipseGeneratorApplication implements IApplication {
return new Integer(1);
}
+ public Object start(IApplicationContext context) throws Exception {
+ return run((String[]) context.getArguments().get("application.args"));
+ }
+
public void stop() {
if (registrationDefaultMetadataManager != null) {
registrationDefaultMetadataManager.unregister();
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/p2/metadata/generator/ant/GeneratorTask.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/p2/metadata/generator/ant/GeneratorTask.java
new file mode 100644
index 000000000..334de51a9
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/p2/metadata/generator/ant/GeneratorTask.java
@@ -0,0 +1,194 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata.generator.ant;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.tools.ant.*;
+import org.eclipse.equinox.internal.p2.metadata.generator.EclipseGeneratorApplication;
+
+/**
+ * An Ant task to call the p2 Metadata Generator application.
+ *
+ * @since 1.0
+ */
+public class GeneratorTask extends Task {
+
+ URL metadataRepository, artifactRepository;
+ File source, inplace, updateSite, config;
+ String rootVersion, root, flavor, p2OS;
+ boolean publishArtifacts, publishArtifactRepository, append, noDefaultIUs;
+ File exe, base, features, bundles;
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.Task#execute()
+ */
+ public void execute() throws BuildException {
+ try {
+ // collect the arguments and call the application
+ new EclipseGeneratorApplication().run(getArguments());
+ } catch (Exception e) {
+ throw new BuildException("Error occurred when calling generator.", e);
+ }
+ }
+
+ private String[] getArguments() {
+ List result = new ArrayList();
+ if (metadataRepository != null) {
+ result.add("-metadataRepository");
+ result.add(metadataRepository.toExternalForm());
+ }
+ if (artifactRepository != null) {
+ result.add("-artifactRepository");
+ result.add(artifactRepository.toExternalForm());
+ }
+ if (source != null) {
+ result.add("-source");
+ result.add(source.getAbsolutePath());
+ }
+ if (config != null) {
+ result.add("-config");
+ result.add(config.getAbsolutePath());
+ }
+ if (updateSite != null) {
+ result.add("-updateSite");
+ result.add(updateSite.getAbsolutePath());
+ }
+ if (inplace != null) {
+ result.add("-inplace");
+ result.add(inplace.getAbsolutePath());
+ }
+ if (rootVersion != null) {
+ result.add("-rootVersion");
+ result.add(rootVersion);
+ }
+ if (root != null) {
+ result.add("-root");
+ result.add(root);
+ }
+ if (flavor != null) {
+ result.add("-flavor");
+ result.add(flavor);
+ }
+ if (exe != null) {
+ result.add("-exe");
+ result.add(exe.getAbsolutePath());
+ }
+ if (features != null) {
+ result.add("-features");
+ result.add(features.getAbsolutePath());
+ }
+ if (bundles != null) {
+ result.add("-bundles");
+ result.add(bundles.getAbsolutePath());
+ }
+ if (base != null) {
+ result.add("-base");
+ result.add(base.getAbsolutePath());
+ }
+ if (p2OS != null) {
+ result.add("-p2.os");
+ result.add(p2OS);
+ }
+ if (publishArtifacts)
+ result.add("-publishArtifacts");
+ if (publishArtifactRepository)
+ result.add("-publishArtifactRepository");
+ if (append)
+ result.add("-append");
+ if (noDefaultIUs)
+ result.add("-noDefaultIUs");
+ return (String[]) result.toArray(new String[result.size()]);
+ }
+
+ public void setAppend(String value) {
+ this.append = Boolean.valueOf(value).booleanValue();
+ }
+
+ public void setArtifactRepository(String location) {
+ try {
+ artifactRepository = new URL(location);
+ } catch (MalformedURLException e) {
+ log("Error setting artifact repository.", e, Project.MSG_WARN);
+ }
+ }
+
+ public void setBase(String value) {
+ base = new File(value);
+ }
+
+ public void setBundles(String value) {
+ bundles = new File(value);
+ }
+
+ public void setConfig(String value) {
+ this.config = new File(value);
+ }
+
+ public void setExe(String value) {
+ exe = new File(value);
+ }
+
+ public void setFeatures(String value) {
+ features = new File(value);
+ }
+
+ public void setFlavor(String flavor) {
+ this.flavor = flavor;
+ }
+
+ public void setInplace(String value) {
+ this.inplace = new File(value);
+ }
+
+ public void setMetadataRepository(String location) {
+ try {
+ metadataRepository = new URL(location);
+ } catch (MalformedURLException e) {
+ log("Error setting metadata repository.", e, Project.MSG_WARN);
+ }
+ }
+
+ public void setNoDefaultIUs(String value) {
+ noDefaultIUs = Boolean.valueOf(value).booleanValue();
+ }
+
+ public void setP2OS(String value) {
+ p2OS = value;
+ }
+
+ public void setPublishArtifactRepository(String value) {
+ publishArtifactRepository = Boolean.valueOf(value).booleanValue();
+ }
+
+ public void setPublishArtifacts(String value) {
+ this.publishArtifacts = Boolean.valueOf(value).booleanValue();
+ }
+
+ public void setRoot(String root) {
+ this.root = root;
+ }
+
+ public void setRootVersion(String rootVersion) {
+ this.rootVersion = rootVersion;
+ }
+
+ public void setSource(String location) {
+ source = new File(location);
+ }
+
+ public void setUpdateSite(String value) {
+ this.updateSite = new File(value);
+ }
+}

Back to the top