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 52123 Details for
Bug 159028
[JarProcessor] Support options controlling processing of nested jars
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]
Extra verbose debugging info
patch.txt (text/plain), 5.65 KB, created by
John Arthorne
on 2006-10-17 10:40:30 EDT
(
hide
)
Description:
Extra verbose debugging info
Filename:
MIME Type:
Creator:
John Arthorne
Created:
2006-10-17 10:40:30 EDT
Size:
5.65 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.update.core >Index: src/org/eclipse/update/internal/jarprocessor/PackUnpackStep.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.update.core/src/org/eclipse/update/internal/jarprocessor/PackUnpackStep.java,v >retrieving revision 1.3 >diff -u -r1.3 PackUnpackStep.java >--- src/org/eclipse/update/internal/jarprocessor/PackUnpackStep.java 22 Aug 2006 19:07:23 -0000 1.3 >+++ src/org/eclipse/update/internal/jarprocessor/PackUnpackStep.java 17 Oct 2006 14:40:59 -0000 >@@ -44,7 +44,7 @@ > */ > public File postProcess(File input, File workingDirectory) { > if (canPack() && packCommand != null) { >- Properties inf = Utils.getEclipseInf(input); >+ Properties inf = Utils.getEclipseInf(input, verbose); > if (inf != null && inf.containsKey(Utils.MARK_EXCLUDE_PACK) && Boolean.valueOf(inf.getProperty(Utils.MARK_EXCLUDE_PACK)).booleanValue()) { > if (verbose) > System.out.println("Excluding " + input.getName() + " from " + getStepName()); //$NON-NLS-1$ //$NON-NLS-2$ >Index: src/org/eclipse/update/internal/jarprocessor/SignCommandStep.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.update.core/src/org/eclipse/update/internal/jarprocessor/SignCommandStep.java,v >retrieving revision 1.4 >diff -u -r1.4 SignCommandStep.java >--- src/org/eclipse/update/internal/jarprocessor/SignCommandStep.java 22 Aug 2006 19:07:23 -0000 1.4 >+++ src/org/eclipse/update/internal/jarprocessor/SignCommandStep.java 17 Oct 2006 14:40:59 -0000 >@@ -52,7 +52,7 @@ > */ > public File postProcess(File input, File workingDirectory) { > if (command != null) { >- Properties inf = Utils.getEclipseInf(input); >+ Properties inf = Utils.getEclipseInf(input, verbose); > if (inf != null && inf.containsKey(Utils.MARK_EXCLUDE_SIGN) && Boolean.valueOf(inf.getProperty(Utils.MARK_EXCLUDE_SIGN)).booleanValue()) { > if(verbose) > System.out.println("Excluding " + input.getName() + " from signing."); //$NON-NLS-1$ //$NON-NLS-2$ >Index: src/org/eclipse/update/internal/jarprocessor/Utils.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.update.core/src/org/eclipse/update/internal/jarprocessor/Utils.java,v >retrieving revision 1.5 >diff -u -r1.5 Utils.java >--- src/org/eclipse/update/internal/jarprocessor/Utils.java 22 Aug 2006 19:07:23 -0000 1.5 >+++ src/org/eclipse/update/internal/jarprocessor/Utils.java 17 Oct 2006 14:40:59 -0000 >@@ -210,12 +210,14 @@ > * Get the properties from the eclipse.inf file from the given jar. If the file is not a jar, null is returned. > * If the file is a jar, but does not contain an eclipse.inf file, an empty Properties object is returned. > * @param jarFile >- * @return >+ * @return The eclipse.inf properties for the given jar file > */ >- public static Properties getEclipseInf(File jarFile) { >- if (jarFile == null || !jarFile.exists()) >+ public static Properties getEclipseInf(File jarFile, boolean verbose) { >+ if (jarFile == null || !jarFile.exists()) { >+ if (verbose) >+ System.out.println("Failed to obtain eclipse.inf due to missing jar file: " + jarFile); > return null; >- >+ } > JarFile jar = null; > try { > jar = new JarFile(jarFile, false); >@@ -229,15 +231,19 @@ > } > return new Properties(); > } catch (IOException e) { >+ if (verbose) { >+ System.out.println("Failed to obtain eclipse.inf due to IOException: " + jarFile); >+ e.printStackTrace(); >+ } > //not a jar >+ return null; > } finally { > close(jar); > } >- return null; > } > > public static boolean shouldSkipJar(File input, boolean processAll, boolean verbose) { >- Properties inf = getEclipseInf(input); >+ Properties inf = getEclipseInf(input, verbose); > if (inf == null) { > //not a jar, could be a pack.gz > return false; >Index: src/org/eclipse/update/internal/jarprocessor/JarProcessor.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.update.core/src/org/eclipse/update/internal/jarprocessor/JarProcessor.java,v >retrieving revision 1.4 >diff -u -r1.4 JarProcessor.java >--- src/org/eclipse/update/internal/jarprocessor/JarProcessor.java 22 Aug 2006 19:07:23 -0000 1.4 >+++ src/org/eclipse/update/internal/jarprocessor/JarProcessor.java 17 Oct 2006 14:40:59 -0000 >@@ -286,7 +286,7 @@ > Map replacements = new HashMap(); > extractEntries(jar, tempDir, replacements); > >- Properties inf = Utils.getEclipseInf(workingFile); >+ Properties inf = Utils.getEclipseInf(workingFile, verbose); > if (inf != null) > adjustInf(workingFile, inf); > >Index: src/org/eclipse/update/internal/jarprocessor/PackStep.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.update.core/src/org/eclipse/update/internal/jarprocessor/PackStep.java,v >retrieving revision 1.4 >diff -u -r1.4 PackStep.java >--- src/org/eclipse/update/internal/jarprocessor/PackStep.java 22 Aug 2006 19:07:23 -0000 1.4 >+++ src/org/eclipse/update/internal/jarprocessor/PackStep.java 17 Oct 2006 14:40:59 -0000 >@@ -71,7 +71,7 @@ > > public File postProcess(File input, File workingDirectory) { > if (canPack() && packCommand != null) { >- Properties inf = Utils.getEclipseInf(input); >+ Properties inf = Utils.getEclipseInf(input, verbose); > if (inf != null && inf.containsKey(Utils.MARK_EXCLUDE_PACK) && Boolean.valueOf(inf.getProperty(Utils.MARK_EXCLUDE_PACK)).booleanValue()) { > if(verbose) > System.out.println("Excluding " + input.getName() + " from " + getStepName()); //$NON-NLS-1$ //$NON-NLS-2$
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 159028
:
52123
|
52167