Bug 41201 - [jar-task] wrong name for services folder
[jar-task] wrong name for services folder
Status: RESOLVED FIXED
Product: Ant
Classification: Unclassified
Component: Core tasks
1.7.0RC1
All Mac OS X 10.4
: P2 major (vote)
: 1.7.1
Assigned To: Ant Notifications List
:
: 41879 42527 43028 44395 44848 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2006-12-18 04:26 UTC by johannes.rieken
Modified: 2008-04-21 11:36 UTC (History)
5 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description johannes.rieken 2006-12-18 04:26:14 UTC
The newly introduced element 'service' creates where the name of the services folder is worng.
(1) Input:

<jar jarfile="${dist}/jass.modern.core-${DSTAMP}.jar" basedir="${build}" 
	manifest="${basedir}/build/manifest.mf">

	<service 
		type="javax.annotation.processing.Processor" 
		provider="jass.modern.core.apt.AnnotationProcessor" />
</jar>

(2) Output:
...
/META-INF/MANIFEST.MF
/META-INF/service/javax.ann...   <---- should be 'services' (plural) and not 'service' 
...
Comment 1 Peter Reilly 2006-12-18 04:42:55 UTC
Yes, you are correct.
The fix will however be too late for ant 1.7.0.

Index: src/main/org/apache/tools/ant/taskdefs/Jar.java
===================================================================
--- src/main/org/apache/tools/ant/taskdefs/Jar.java     (revision 488251)
+++ src/main/org/apache/tools/ant/taskdefs/Jar.java     (working copy)
@@ -397,7 +397,7 @@
            service = (Service) serviceIterator.next();
            //stolen from writeManifest
            super.zipFile(service.getAsStream(), zOut,
-                         "META-INF/service/" + service.getType(),
+                         "META-INF/services/" + service.getType(),
                          System.currentTimeMillis(), null,
                          ZipFileSet.DEFAULT_FILE_MODE);
Comment 2 Peter Reilly 2006-12-18 13:58:55 UTC
Fixed in svn, should be in the Ant 1.7.1 release

Thanks for the report.
Comment 3 Jesse Glick 2006-12-24 20:48:12 UTC
New feature useless => higher severity, no?
Comment 4 Peter Reilly 2006-12-25 13:33:16 UTC
*blush* yes, I should have tested this a little better...
Comment 5 Peter Reilly 2007-03-20 02:30:50 UTC
*** Bug 41879 has been marked as a duplicate of this bug. ***
Comment 6 Peter Reilly 2007-05-28 01:47:11 UTC
*** Bug 42527 has been marked as a duplicate of this bug. ***
Comment 7 Matt Benson 2007-08-03 20:13:19 UTC
*** Bug 43028 has been marked as a duplicate of this bug. ***
Comment 8 Peter Reilly 2008-02-12 00:34:17 UTC
*** Bug 44395 has been marked as a duplicate of this bug. ***
Comment 9 Peter Reilly 2008-04-21 11:36:49 UTC
*** Bug 44848 has been marked as a duplicate of this bug. ***