Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 132476 Details for
Bug 269201
[jar exporter] ant file produced by Export runnable jar contains absolute paths instead of relative to workspace
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch for tests to accept new ant scripts
patch_269201_test_20090420.txt (text/plain), 8.60 KB, created by
Ferenc Hechler
on 2009-04-20 14:47:37 EDT
(
hide
)
Description:
patch for tests to accept new ant scripts
Filename:
MIME Type:
Creator:
Ferenc Hechler
Created:
2009-04-20 14:47:37 EDT
Size:
8.60 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui.tests >Index: ui/org/eclipse/jdt/ui/tests/jarexport/FatJarExportTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/jarexport/FatJarExportTests.java,v >retrieving revision 1.11 >diff -u -r1.11 FatJarExportTests.java >--- ui/org/eclipse/jdt/ui/tests/jarexport/FatJarExportTests.java 18 Feb 2009 17:17:20 -0000 1.11 >+++ ui/org/eclipse/jdt/ui/tests/jarexport/FatJarExportTests.java 20 Apr 2009 18:46:33 -0000 >@@ -14,6 +14,7 @@ > * Ferenc Hechler, ferenc_hechler@users.sourceforge.net - 219530 [jar application] add Jar-in-Jar ClassLoader option > * Ferenc Hechler, ferenc_hechler@users.sourceforge.net - 262766 [jar exporter] ANT file for Jar-in-Jar option contains relative path to jar-rsrc-loader.zip > * Ferenc Hechler, ferenc_hechler@users.sourceforge.net - 262763 [jar exporter] remove Built-By attribute in ANT files from Fat JAR Exporter >+ * Ferenc Hechler, ferenc_hechler@users.sourceforge.net - 269201 [jar exporter] ant file produced by Export runnable jar contains absolut paths instead of relative to workspace > *******************************************************************************/ > package org.eclipse.jdt.ui.tests.jarexport; > >@@ -469,8 +470,6 @@ > } > > private static void assertAntScriptCopy(String archiveName, IPath antScriptLocation, String[] filesets, String[] zipfilesets) throws Exception { >- String subfolderName= archiveName.replaceFirst("^(.*)[.]jar$", "$1_lib"); //$NON-NLS-1$//$NON-NLS-2$ >- > String projectNameValue= "Create Runnable Jar for Project TestSetupProject"; //$NON-NLS-1$ > projectNameValue+= " with libraries in sub-folder"; //$NON-NLS-1$ > >@@ -479,11 +478,15 @@ > assertEquals("create_run_jar", xmlProject.getAttribute("default")); //$NON-NLS-1$ //$NON-NLS-2$ > assertEquals(projectNameValue, xmlProject.getAttribute("name")); //$NON-NLS-1$ > >+ Element xmlProperty= (Element)xmlProject.getElementsByTagName("property").item(2); //$NON-NLS-1$ >+ assertTrue("actual: " + xmlProperty.getAttribute("name"), xmlProperty.getAttribute("name").equals("destname")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ assertTrue("actual: " + xmlProperty.getAttribute("value"), archiveName.equals(xmlProperty.getAttribute("value") + ".jar")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ > Element xmlTarget= (Element)xmlProject.getElementsByTagName("target").item(0); //$NON-NLS-1$ > assertEquals("create_run_jar", xmlTarget.getAttribute("name")); //$NON-NLS-1$//$NON-NLS-2$ > > Element xmlJar= (Element)xmlTarget.getElementsByTagName("jar").item(0); //$NON-NLS-1$ >- assertTrue("actual: " + xmlJar.getAttribute("destfile"), xmlJar.getAttribute("destfile").endsWith(archiveName)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ assertTrue("actual: " + xmlJar.getAttribute("destfile"), xmlJar.getAttribute("destfile").endsWith("${destjar}")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ > > Element xmlManifest= (Element)xmlJar.getElementsByTagName("manifest").item(0); //$NON-NLS-1$ > >@@ -499,7 +502,7 @@ > assertEquals(filesets.length, xmlFilesets.getLength()); > > for (int i= 0; i < xmlFilesets.getLength(); i++) { >- String dir= ((Element)xmlFilesets.item(i)).getAttribute("dir"); //$NON-NLS-1$ >+ String dir= ((Element)xmlFilesets.item(i)).getAttribute("dir").replace('\\', '/'); //$NON-NLS-1$ > boolean found= false; > for (int j= 0; j < filesets.length; j++) { > if (dir.endsWith(filesets[j])) { >@@ -511,10 +514,10 @@ > } > > Element xmlDelete= (Element)xmlTarget.getElementsByTagName("delete").item(0); //$NON-NLS-1$ >- assertTrue("actual: " + xmlDelete.getAttribute("dir"), xmlDelete.getAttribute("dir").endsWith(subfolderName)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ assertTrue("actual: " + xmlDelete.getAttribute("dir"), xmlDelete.getAttribute("dir").equals("${subdir}")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ > > Element xmlMkdir= (Element)xmlTarget.getElementsByTagName("mkdir").item(0); //$NON-NLS-1$ >- assertTrue("actual: " + xmlMkdir.getAttribute("dir"), xmlMkdir.getAttribute("dir").endsWith(subfolderName)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ assertTrue("actual: " + xmlMkdir.getAttribute("dir"), xmlMkdir.getAttribute("dir").equals("${subdir}")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ > > NodeList xmlCopies= xmlTarget.getElementsByTagName("copy"); //$NON-NLS-1$ > assertEquals(zipfilesets.length, xmlCopies.getLength()); >@@ -543,11 +546,15 @@ > assertEquals("create_run_jar", xmlProject.getAttribute("default")); //$NON-NLS-1$ //$NON-NLS-2$ > assertEquals(projectNameValue, xmlProject.getAttribute("name")); //$NON-NLS-1$ > >+ Element xmlProperty= (Element)xmlProject.getElementsByTagName("property").item(2); //$NON-NLS-1$ >+ assertTrue("actual: " + xmlProperty.getAttribute("name"), xmlProperty.getAttribute("name").equals("destname")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ assertTrue("actual: " + xmlProperty.getAttribute("value"), archiveName.equals(xmlProperty.getAttribute("value") + ".jar")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ > Element xmlTarget= (Element)xmlProject.getElementsByTagName("target").item(0); //$NON-NLS-1$ > assertEquals("create_run_jar", xmlTarget.getAttribute("name")); //$NON-NLS-1$//$NON-NLS-2$ > > Element xmlJar= (Element)xmlTarget.getElementsByTagName("jar").item(0); //$NON-NLS-1$ >- assertTrue("actual: " + xmlJar.getAttribute("destfile"), xmlJar.getAttribute("destfile").endsWith(archiveName)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ assertTrue("actual: " + xmlJar.getAttribute("destfile"), xmlJar.getAttribute("destfile").endsWith("${destjar}")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ > > Element xmlManifest= (Element)xmlJar.getElementsByTagName("manifest").item(0); //$NON-NLS-1$ > >@@ -574,7 +581,7 @@ > assertEquals(zipfilesets.length + 1, xmlZipfilesets.getLength()); > > for (int i= 0; i < xmlFilesets.getLength(); i++) { >- String dir= ((Element)xmlFilesets.item(i)).getAttribute("dir"); //$NON-NLS-1$ >+ String dir= ((Element)xmlFilesets.item(i)).getAttribute("dir").replace('\\', '/'); //$NON-NLS-1$ > boolean found= false; > for (int j= 0; j < filesets.length; j++) { > if (dir.endsWith(filesets[j])) { >@@ -610,11 +617,15 @@ > assertEquals("create_run_jar", xmlProject.getAttribute("default")); //$NON-NLS-1$ //$NON-NLS-2$ > assertEquals(projectNameValue, xmlProject.getAttribute("name")); //$NON-NLS-1$ > >+ Element xmlProperty= (Element)xmlProject.getElementsByTagName("property").item(2); //$NON-NLS-1$ >+ assertTrue("actual: " + xmlProperty.getAttribute("name"), xmlProperty.getAttribute("name").equals("destname")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ assertTrue("actual: " + xmlProperty.getAttribute("value"), archiveName.equals(xmlProperty.getAttribute("value") + ".jar")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ > Element xmlTarget= (Element)xmlProject.getElementsByTagName("target").item(0); //$NON-NLS-1$ > assertEquals("create_run_jar", xmlTarget.getAttribute("name")); //$NON-NLS-1$//$NON-NLS-2$ > > Element xmlJar= (Element)xmlTarget.getElementsByTagName("jar").item(0); //$NON-NLS-1$ >- assertTrue("actual: " + xmlJar.getAttribute("destfile"), xmlJar.getAttribute("destfile").endsWith(archiveName)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ assertTrue("actual: " + xmlJar.getAttribute("destfile"), xmlJar.getAttribute("destfile").equals("${destjar}")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ > assertEquals("mergewithoutmain", xmlJar.getAttribute("filesetmanifest")); //$NON-NLS-1$ //$NON-NLS-2$ > > Element xmlManifest= (Element)xmlJar.getElementsByTagName("manifest").item(0); //$NON-NLS-1$ >@@ -634,7 +645,7 @@ > assertEquals(zipfilesets.length, xmlZipfilesets.getLength()); > > for (int i= 0; i < xmlFilesets.getLength(); i++) { >- String dir= ((Element)xmlFilesets.item(i)).getAttribute("dir"); //$NON-NLS-1$ >+ String dir= ((Element)xmlFilesets.item(i)).getAttribute("dir").replace('\\', '/'); //$NON-NLS-1$ > boolean found= false; > for (int j= 0; j < filesets.length; j++) { > if (dir.endsWith(filesets[j])) { >@@ -648,7 +659,7 @@ > for (int i= 0; i < xmlZipfilesets.getLength(); i++) { > String excludes= ((Element)xmlZipfilesets.item(i)).getAttribute("excludes"); //$NON-NLS-1$ > assertEquals("META-INF/*.SF", excludes); //$NON-NLS-1$ >- String src= ((Element)xmlZipfilesets.item(i)).getAttribute("src"); //$NON-NLS-1$ >+ String src= ((Element)xmlZipfilesets.item(i)).getAttribute("src").replace('\\', '/'); //$NON-NLS-1$ > boolean found= false; > for (int j= 0; j < zipfilesets.length; j++) { > if (src.endsWith(zipfilesets[j])) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 269201
:
129325
|
129326
|
132288
|
132476
|
222585
|
223065
|
244414