You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/02/20 10:04:53 UTC
svn commit: r1570115 - in /tomcat/tc7.0.x/trunk: ./ build.xml
webapps/docs/changelog.xml
Author: markt
Date: Thu Feb 20 09:04:52 2014
New Revision: 1570115
URL: http://svn.apache.org/r1570115
Log:
Simplify patternsets where possible
Avoid pattern sets ending in "/*" as much as possible as they usually result in JARs containing empty packages with the contents of the package in a different JAR
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/build.xml
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1570114
Modified: tomcat/tc7.0.x/trunk/build.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.xml?rev=1570115&r1=1570114&r2=1570115&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/build.xml (original)
+++ tomcat/tc7.0.x/trunk/build.xml Thu Feb 20 09:04:52 2014
@@ -277,20 +277,18 @@
<!-- ========= Pattern sets used to control content of JAR files ========= -->
<!-- Pattern sets for jar files in standard distributions -->
<patternset id="files.annotations-api">
- <include name="javax/annotation/*" />
- <include name="javax/annotation/security/*" />
- <include name="javax/annotation/sql/*" />
- <include name="javax/ejb/*" />
- <include name="javax/persistence/*" />
- <include name="javax/xml/ws/*" />
+ <include name="javax/annotation/**" />
+ <include name="javax/ejb/**" />
+ <include name="javax/persistence/**" />
+ <include name="javax/xml/ws/**" />
</patternset>
<patternset id="files.servlet-api">
- <include name="javax/servlet/*" />
- <include name="javax/servlet/annotation/*" />
- <include name="javax/servlet/descriptor/*" />
- <include name="javax/servlet/http/*" />
- <include name="javax/servlet/resources/*" />
+ <include name="javax/servlet/*.class" />
+ <include name="javax/servlet/annotation/**" />
+ <include name="javax/servlet/descriptor/**" />
+ <include name="javax/servlet/http/**" />
+ <include name="javax/servlet/resources/**" />
</patternset>
<patternset id="files.jsp-api">
@@ -298,7 +296,7 @@
</patternset>
<patternset id="files.el-api">
- <include name="javax/el/*" />
+ <include name="javax/el/**" />
</patternset>
<patternset id="files.websocket-api">
@@ -328,7 +326,7 @@
</patternset>
<patternset id="files.tomcat-api">
- <include name="org/apache/tomcat/*" />
+ <include name="org/apache/tomcat/*.class" />
</patternset>
<patternset id="files.tomcat-util">
@@ -358,8 +356,7 @@
</patternset>
<patternset id="files.catalina-ant">
- <include name="org/apache/catalina/ant/*" />
- <include name="org/apache/catalina/ant/jmx/*" />
+ <include name="org/apache/catalina/ant/**" />
<include name="org/apache/catalina/util/Base64.*" />
</patternset>
@@ -1997,8 +1994,8 @@ Apache Tomcat ${version} native binaries
<include name="org/apache/catalina/startup/DigesterFactory.class" />
<include name="org/apache/catalina/util/SchemaResolver.class" />
<include name="org/apache/catalina/util/StringManager.class" />
- <include name="org/apache/tomcat/util/*" />
- <include name="org/apache/tomcat/util/digester/*" />
+ <include name="org/apache/tomcat/util/*.class" />
+ <include name="org/apache/tomcat/util/digester/**" />
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1570115&r1=1570114&r2=1570115&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Feb 20 09:04:52 2014
@@ -120,6 +120,9 @@
<bug>56139</bug>: Avoid a web application class loader leak in some unit
tests when running on Windows. (markt)
</fix>
+ <fix>
+ Correct build script to avoid building JARs with empty packages. (markt)
+ </fix>
</changelog>
</subsection>
</section>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1570115 - in /tomcat/tc7.0.x/trunk: ./ build.xml
webapps/docs/changelog.xml
Posted by Mark Thomas <ma...@apache.org>.
On 20/02/2014 09:26, Mark Thomas wrote:
> On 20/02/2014 09:10, Konstantin Kolinko wrote:
>> 2014-02-20 13:04 GMT+04:00 <ma...@apache.org>:
>>> Author: markt
>>> Date: Thu Feb 20 09:04:52 2014
>>> New Revision: 1570115
>>>
>>> URL: http://svn.apache.org/r1570115
>>> Log:
>>> Simplify patternsets where possible
>>> Avoid pattern sets ending in "/*" as much as possible as they usually result in JARs containing empty packages with the contents of the package in a different JAR
>>>
>>> Modified:
>>> tomcat/tc7.0.x/trunk/ (props changed)
>>> tomcat/tc7.0.x/trunk/build.xml
>>> tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>>>
>>> Propchange: tomcat/tc7.0.x/trunk/
>>> ------------------------------------------------------------------------------
>>> Merged /tomcat/trunk:r1570114
>>>
>>> Modified: tomcat/tc7.0.x/trunk/build.xml
>>> URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.xml?rev=1570115&r1=1570114&r2=1570115&view=diff
>>> ==============================================================================
>>> --- tomcat/tc7.0.x/trunk/build.xml (original)
>>> +++ tomcat/tc7.0.x/trunk/build.xml Thu Feb 20 09:04:52 2014
>>> @@ -277,20 +277,18 @@
>>> <!-- ========= Pattern sets used to control content of JAR files ========= -->
>>> <!-- Pattern sets for jar files in standard distributions -->
>>> <patternset id="files.annotations-api">
>>> - <include name="javax/annotation/*" />
>>> - <include name="javax/annotation/security/*" />
>>> - <include name="javax/annotation/sql/*" />
>>> - <include name="javax/ejb/*" />
>>> - <include name="javax/persistence/*" />
>>> - <include name="javax/xml/ws/*" />
>>> + <include name="javax/annotation/**" />
>>> + <include name="javax/ejb/**" />
>>> + <include name="javax/persistence/**" />
>>> + <include name="javax/xml/ws/**" />
>>> </patternset>
>>>
>>> <patternset id="files.servlet-api">
>>> - <include name="javax/servlet/*" />
>>> - <include name="javax/servlet/annotation/*" />
>>> - <include name="javax/servlet/descriptor/*" />
>>> - <include name="javax/servlet/http/*" />
>>> - <include name="javax/servlet/resources/*" />
>>> + <include name="javax/servlet/*.class" />
>>
>> I do not like these *.class patterns.
>>
>> I think occasionally having an empty package is less evil than missing
>> a *.properties file.
>
> Empty packages might cause issues when we start signing JARs. I know you
> can't have classes from the same package in different signed JARs. I'm
> not sure about empty packages.
>
> We can always add a *.properties pattern to those patternsets.
>
> What is bothering me more right now, is why the servlet-api.jar didn't
> have any *.properties files in it before this change. I'm looking into
> this now but any hints welcome.
Scratch that. I'm blind. The properties file was there. I'll get the
patterns fixed.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1570115 - in /tomcat/tc7.0.x/trunk: ./ build.xml webapps/docs/changelog.xml
Posted by Konstantin Kolinko <kn...@gmail.com>.
2014-03-03 0:21 GMT+04:00 Mark Thomas <ma...@apache.org>:
> On 25/02/2014 12:17, Konstantin Kolinko wrote:
>
>> Regarding the use of filesonly="true" in
>> http://svn.apache.org/r1570629
>>
>> It is known that such setting breaks some jar scanning technologies, e.g
>> https://ecosystem.atlassian.net/browse/PLUG-949
>> https://jira.springsource.org/browse/SPR-8551
>>
>> I think none of those would scan Tomcat jars, so not a stopper.
>> Just mentioning it to encourage testing.
>
>
> I've just hit a problem with this and the ASF's Jira instance. It looks
> like Jira uses Apache Felix which turns Tomcat's Servlet JAR into an
> OSGI bundle somehow but the missing directories means that fails. The
> result is that Jira fails to start.
>
> I'm going to revert the filesonly change. I'll look into explicit
> excludes for the empty directories.
>
It looks that it is possible to restrict resource collection itself to
"files only" with resource set filtering.
<restrict><fileset .../><type type="file"/></restrict>
http://ant.apache.org/manual/Types/resources.html#rsel.type
I wonder whether zip task will create directory entries in this case.
Just noting. I have not experimented with this option.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1570115 - in /tomcat/tc7.0.x/trunk: ./ build.xml
webapps/docs/changelog.xml
Posted by Mark Thomas <ma...@apache.org>.
On 25/02/2014 12:17, Konstantin Kolinko wrote:
> Regarding the use of filesonly="true" in
> http://svn.apache.org/r1570629
>
> It is known that such setting breaks some jar scanning technologies, e.g
> https://ecosystem.atlassian.net/browse/PLUG-949
> https://jira.springsource.org/browse/SPR-8551
>
> I think none of those would scan Tomcat jars, so not a stopper.
> Just mentioning it to encourage testing.
I've just hit a problem with this and the ASF's Jira instance. It looks
like Jira uses Apache Felix which turns Tomcat's Servlet JAR into an
OSGI bundle somehow but the missing directories means that fails. The
result is that Jira fails to start.
I'm going to revert the filesonly change. I'll look into explicit
excludes for the empty directories.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1570115 - in /tomcat/tc7.0.x/trunk: ./ build.xml webapps/docs/changelog.xml
Posted by Konstantin Kolinko <kn...@gmail.com>.
2014-02-21 19:40 GMT+04:00 Mark Thomas <ma...@apache.org>:
> On 21/02/2014 15:35, Konstantin Kolinko wrote:
>> 2014-02-20 13:53 GMT+04:00 Konstantin Kolinko <kn...@gmail.com>:
>>> 2014-02-20 13:26 GMT+04:00 Mark Thomas <ma...@apache.org>:
>>>> On 20/02/2014 09:10, Konstantin Kolinko wrote:
>>>>> 2014-02-20 13:04 GMT+04:00 <ma...@apache.org>:
>>>>>> Author: markt
>>>>>> Date: Thu Feb 20 09:04:52 2014
>>>>>> New Revision: 1570115
>>>>>>
>>>>>> URL: http://svn.apache.org/r1570115
>>>>>> Log:
>>>>>> Simplify patternsets where possible
>>>>>> Avoid pattern sets ending in "/*" as much as possible as they usually result in JARs containing empty packages with the contents of the package in a different JAR
>>>>>>
>>>>>> Modified:
>>>>>> tomcat/tc7.0.x/trunk/ (props changed)
>>>>>> tomcat/tc7.0.x/trunk/build.xml
>>>>>> tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>>>>>>
>>>>>> Propchange: tomcat/tc7.0.x/trunk/
>>>>>> ------------------------------------------------------------------------------
>>>>>> Merged /tomcat/trunk:r1570114
>>>>>>
>>>>>> Modified: tomcat/tc7.0.x/trunk/build.xml
>>>>>> URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.xml?rev=1570115&r1=1570114&r2=1570115&view=diff
>>>>>> ==============================================================================
>>>>>> --- tomcat/tc7.0.x/trunk/build.xml (original)
>>>>>> +++ tomcat/tc7.0.x/trunk/build.xml Thu Feb 20 09:04:52 2014
>>>>>> @@ -277,20 +277,18 @@
>>>>>> <!-- ========= Pattern sets used to control content of JAR files ========= -->
>>>>>> <!-- Pattern sets for jar files in standard distributions -->
>>>>>> <patternset id="files.annotations-api">
>>>>>> - <include name="javax/annotation/*" />
>>>>>> - <include name="javax/annotation/security/*" />
>>>>>> - <include name="javax/annotation/sql/*" />
>>>>>> - <include name="javax/ejb/*" />
>>>>>> - <include name="javax/persistence/*" />
>>>>>> - <include name="javax/xml/ws/*" />
>>>>>> + <include name="javax/annotation/**" />
>>>>>> + <include name="javax/ejb/**" />
>>>>>> + <include name="javax/persistence/**" />
>>>>>> + <include name="javax/xml/ws/**" />
>>>>>> </patternset>
>>>>>>
>>>>>> <patternset id="files.servlet-api">
>>>>>> - <include name="javax/servlet/*" />
>>>>>> - <include name="javax/servlet/annotation/*" />
>>>>>> - <include name="javax/servlet/descriptor/*" />
>>>>>> - <include name="javax/servlet/http/*" />
>>>>>> - <include name="javax/servlet/resources/*" />
>>>>>> + <include name="javax/servlet/*.class" />
>>>>>
>>>>> I do not like these *.class patterns.
>>>>>
>>>>> I think occasionally having an empty package is less evil than missing
>>>>> a *.properties file.
>>>>
>>>> Empty packages might cause issues when we start signing JARs. I know you
>>>> can't have classes from the same package in different signed JARs. I'm
>>>> not sure about empty packages.
>>>
>>> IIRC from looking into WebappClassLoader a month ago, processing of
>>> certificates is triggered by having found a *.class. If there is no
>>> class file there, it is not triggered.
>>>
>>>> We can always add a *.properties pattern to those patternsets.
>>>>
>>>
>>> There might also be *.xml (mbeans-descriptors.xml,
>>> \storeconfig\server-registry.xml).
>>>
>>> The rest are in their special packages (antlib.xml, *.tasks,
>>> tagPlugins.xml, *.dtd, *.xsd).
>>>
>>> *.html, *.gif, *.jjt are there, but are needed in the source only. Be
>>> sure to pack them into *src zips.
>>>
>>
>> -1 (veto) to r1570115 and followups.
>
> OK. I'll see if I can come up with a better solution. If not, I'll
> revert to the /* pattern that creates empty dirs.
>
OK.
Regarding the use of filesonly="true" in
http://svn.apache.org/r1570629
It is known that such setting breaks some jar scanning technologies, e.g
https://ecosystem.atlassian.net/browse/PLUG-949
https://jira.springsource.org/browse/SPR-8551
I think none of those would scan Tomcat jars, so not a stopper.
Just mentioning it to encourage testing.
>> (...)
>>
>> As I mentioned, I think that empty packages won't prevent code
>> signing. If they are, I'd better deal with this when it happens.
>> (Could there be an option in jar task or resources collection in Ant
>> to skip empty directories when creating the jar file?)
>>
Regarding the issue of empty directories vs. signing:
We have fr/es/jp message files in separate i18n jars.
If those do not interfere with signing, then I think empty directories
wouldn't hurt either.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1570115 - in /tomcat/tc7.0.x/trunk: ./ build.xml
webapps/docs/changelog.xml
Posted by Mark Thomas <ma...@apache.org>.
On 21/02/2014 15:35, Konstantin Kolinko wrote:
> 2014-02-20 13:53 GMT+04:00 Konstantin Kolinko <kn...@gmail.com>:
>> 2014-02-20 13:26 GMT+04:00 Mark Thomas <ma...@apache.org>:
>>> On 20/02/2014 09:10, Konstantin Kolinko wrote:
>>>> 2014-02-20 13:04 GMT+04:00 <ma...@apache.org>:
>>>>> Author: markt
>>>>> Date: Thu Feb 20 09:04:52 2014
>>>>> New Revision: 1570115
>>>>>
>>>>> URL: http://svn.apache.org/r1570115
>>>>> Log:
>>>>> Simplify patternsets where possible
>>>>> Avoid pattern sets ending in "/*" as much as possible as they usually result in JARs containing empty packages with the contents of the package in a different JAR
>>>>>
>>>>> Modified:
>>>>> tomcat/tc7.0.x/trunk/ (props changed)
>>>>> tomcat/tc7.0.x/trunk/build.xml
>>>>> tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>>>>>
>>>>> Propchange: tomcat/tc7.0.x/trunk/
>>>>> ------------------------------------------------------------------------------
>>>>> Merged /tomcat/trunk:r1570114
>>>>>
>>>>> Modified: tomcat/tc7.0.x/trunk/build.xml
>>>>> URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.xml?rev=1570115&r1=1570114&r2=1570115&view=diff
>>>>> ==============================================================================
>>>>> --- tomcat/tc7.0.x/trunk/build.xml (original)
>>>>> +++ tomcat/tc7.0.x/trunk/build.xml Thu Feb 20 09:04:52 2014
>>>>> @@ -277,20 +277,18 @@
>>>>> <!-- ========= Pattern sets used to control content of JAR files ========= -->
>>>>> <!-- Pattern sets for jar files in standard distributions -->
>>>>> <patternset id="files.annotations-api">
>>>>> - <include name="javax/annotation/*" />
>>>>> - <include name="javax/annotation/security/*" />
>>>>> - <include name="javax/annotation/sql/*" />
>>>>> - <include name="javax/ejb/*" />
>>>>> - <include name="javax/persistence/*" />
>>>>> - <include name="javax/xml/ws/*" />
>>>>> + <include name="javax/annotation/**" />
>>>>> + <include name="javax/ejb/**" />
>>>>> + <include name="javax/persistence/**" />
>>>>> + <include name="javax/xml/ws/**" />
>>>>> </patternset>
>>>>>
>>>>> <patternset id="files.servlet-api">
>>>>> - <include name="javax/servlet/*" />
>>>>> - <include name="javax/servlet/annotation/*" />
>>>>> - <include name="javax/servlet/descriptor/*" />
>>>>> - <include name="javax/servlet/http/*" />
>>>>> - <include name="javax/servlet/resources/*" />
>>>>> + <include name="javax/servlet/*.class" />
>>>>
>>>> I do not like these *.class patterns.
>>>>
>>>> I think occasionally having an empty package is less evil than missing
>>>> a *.properties file.
>>>
>>> Empty packages might cause issues when we start signing JARs. I know you
>>> can't have classes from the same package in different signed JARs. I'm
>>> not sure about empty packages.
>>
>> IIRC from looking into WebappClassLoader a month ago, processing of
>> certificates is triggered by having found a *.class. If there is no
>> class file there, it is not triggered.
>>
>>> We can always add a *.properties pattern to those patternsets.
>>>
>>
>> There might also be *.xml (mbeans-descriptors.xml,
>> \storeconfig\server-registry.xml).
>>
>> The rest are in their special packages (antlib.xml, *.tasks,
>> tagPlugins.xml, *.dtd, *.xsd).
>>
>> *.html, *.gif, *.jjt are there, but are needed in the source only. Be
>> sure to pack them into *src zips.
>>
>
> -1 (veto) to r1570115 and followups.
OK. I'll see if I can come up with a better solution. If not, I'll
revert to the /* pattern that creates empty dirs.
Mark
>
> You are using the same pattern to pack source jars.
>
> <jarIt jarfile="${servlet-api-src.jar}"
> filesDir="java"
> filesId="files.servlet-api"
> manifest="${tomcat.manifests}/servlet-api.jar.manifest"
> notice="${tomcat.manifests}/servlet-api.jar.notice"
> license="${tomcat.manifests}/servlet-api.jar.license" />
>
> Thus specifying specific file extensions such as *.class, *.properties
> will leave some valuable files.from the sources jars.
>
> For example, javax\servlet\package.html
>
> Furthermore, currently *.java files are missing.
>
> For example:
> 1. Run "ant package-src-jar"
> 2. In output/src-jars/servlet-api-src.jar
> There are no *.java files in javax\servlet\ subdirectory.
>
> As I mentioned, I think that empty packages won't prevent code
> signing. If they are, I'd better deal with this when it happens.
> (Could there be an option in jar task or resources collection in Ant
> to skip empty directories when creating the jar file?)
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1570115 - in /tomcat/tc7.0.x/trunk: ./ build.xml webapps/docs/changelog.xml
Posted by Konstantin Kolinko <kn...@gmail.com>.
2014-02-20 13:53 GMT+04:00 Konstantin Kolinko <kn...@gmail.com>:
> 2014-02-20 13:26 GMT+04:00 Mark Thomas <ma...@apache.org>:
>> On 20/02/2014 09:10, Konstantin Kolinko wrote:
>>> 2014-02-20 13:04 GMT+04:00 <ma...@apache.org>:
>>>> Author: markt
>>>> Date: Thu Feb 20 09:04:52 2014
>>>> New Revision: 1570115
>>>>
>>>> URL: http://svn.apache.org/r1570115
>>>> Log:
>>>> Simplify patternsets where possible
>>>> Avoid pattern sets ending in "/*" as much as possible as they usually result in JARs containing empty packages with the contents of the package in a different JAR
>>>>
>>>> Modified:
>>>> tomcat/tc7.0.x/trunk/ (props changed)
>>>> tomcat/tc7.0.x/trunk/build.xml
>>>> tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>>>>
>>>> Propchange: tomcat/tc7.0.x/trunk/
>>>> ------------------------------------------------------------------------------
>>>> Merged /tomcat/trunk:r1570114
>>>>
>>>> Modified: tomcat/tc7.0.x/trunk/build.xml
>>>> URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.xml?rev=1570115&r1=1570114&r2=1570115&view=diff
>>>> ==============================================================================
>>>> --- tomcat/tc7.0.x/trunk/build.xml (original)
>>>> +++ tomcat/tc7.0.x/trunk/build.xml Thu Feb 20 09:04:52 2014
>>>> @@ -277,20 +277,18 @@
>>>> <!-- ========= Pattern sets used to control content of JAR files ========= -->
>>>> <!-- Pattern sets for jar files in standard distributions -->
>>>> <patternset id="files.annotations-api">
>>>> - <include name="javax/annotation/*" />
>>>> - <include name="javax/annotation/security/*" />
>>>> - <include name="javax/annotation/sql/*" />
>>>> - <include name="javax/ejb/*" />
>>>> - <include name="javax/persistence/*" />
>>>> - <include name="javax/xml/ws/*" />
>>>> + <include name="javax/annotation/**" />
>>>> + <include name="javax/ejb/**" />
>>>> + <include name="javax/persistence/**" />
>>>> + <include name="javax/xml/ws/**" />
>>>> </patternset>
>>>>
>>>> <patternset id="files.servlet-api">
>>>> - <include name="javax/servlet/*" />
>>>> - <include name="javax/servlet/annotation/*" />
>>>> - <include name="javax/servlet/descriptor/*" />
>>>> - <include name="javax/servlet/http/*" />
>>>> - <include name="javax/servlet/resources/*" />
>>>> + <include name="javax/servlet/*.class" />
>>>
>>> I do not like these *.class patterns.
>>>
>>> I think occasionally having an empty package is less evil than missing
>>> a *.properties file.
>>
>> Empty packages might cause issues when we start signing JARs. I know you
>> can't have classes from the same package in different signed JARs. I'm
>> not sure about empty packages.
>
> IIRC from looking into WebappClassLoader a month ago, processing of
> certificates is triggered by having found a *.class. If there is no
> class file there, it is not triggered.
>
>> We can always add a *.properties pattern to those patternsets.
>>
>
> There might also be *.xml (mbeans-descriptors.xml,
> \storeconfig\server-registry.xml).
>
> The rest are in their special packages (antlib.xml, *.tasks,
> tagPlugins.xml, *.dtd, *.xsd).
>
> *.html, *.gif, *.jjt are there, but are needed in the source only. Be
> sure to pack them into *src zips.
>
-1 (veto) to r1570115 and followups.
You are using the same pattern to pack source jars.
<jarIt jarfile="${servlet-api-src.jar}"
filesDir="java"
filesId="files.servlet-api"
manifest="${tomcat.manifests}/servlet-api.jar.manifest"
notice="${tomcat.manifests}/servlet-api.jar.notice"
license="${tomcat.manifests}/servlet-api.jar.license" />
Thus specifying specific file extensions such as *.class, *.properties
will leave some valuable files.from the sources jars.
For example, javax\servlet\package.html
Furthermore, currently *.java files are missing.
For example:
1. Run "ant package-src-jar"
2. In output/src-jars/servlet-api-src.jar
There are no *.java files in javax\servlet\ subdirectory.
As I mentioned, I think that empty packages won't prevent code
signing. If they are, I'd better deal with this when it happens.
(Could there be an option in jar task or resources collection in Ant
to skip empty directories when creating the jar file?)
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1570115 - in /tomcat/tc7.0.x/trunk: ./ build.xml webapps/docs/changelog.xml
Posted by Konstantin Kolinko <kn...@gmail.com>.
2014-02-20 13:26 GMT+04:00 Mark Thomas <ma...@apache.org>:
> On 20/02/2014 09:10, Konstantin Kolinko wrote:
>> 2014-02-20 13:04 GMT+04:00 <ma...@apache.org>:
>>> Author: markt
>>> Date: Thu Feb 20 09:04:52 2014
>>> New Revision: 1570115
>>>
>>> URL: http://svn.apache.org/r1570115
>>> Log:
>>> Simplify patternsets where possible
>>> Avoid pattern sets ending in "/*" as much as possible as they usually result in JARs containing empty packages with the contents of the package in a different JAR
>>>
>>> Modified:
>>> tomcat/tc7.0.x/trunk/ (props changed)
>>> tomcat/tc7.0.x/trunk/build.xml
>>> tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>>>
>>> Propchange: tomcat/tc7.0.x/trunk/
>>> ------------------------------------------------------------------------------
>>> Merged /tomcat/trunk:r1570114
>>>
>>> Modified: tomcat/tc7.0.x/trunk/build.xml
>>> URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.xml?rev=1570115&r1=1570114&r2=1570115&view=diff
>>> ==============================================================================
>>> --- tomcat/tc7.0.x/trunk/build.xml (original)
>>> +++ tomcat/tc7.0.x/trunk/build.xml Thu Feb 20 09:04:52 2014
>>> @@ -277,20 +277,18 @@
>>> <!-- ========= Pattern sets used to control content of JAR files ========= -->
>>> <!-- Pattern sets for jar files in standard distributions -->
>>> <patternset id="files.annotations-api">
>>> - <include name="javax/annotation/*" />
>>> - <include name="javax/annotation/security/*" />
>>> - <include name="javax/annotation/sql/*" />
>>> - <include name="javax/ejb/*" />
>>> - <include name="javax/persistence/*" />
>>> - <include name="javax/xml/ws/*" />
>>> + <include name="javax/annotation/**" />
>>> + <include name="javax/ejb/**" />
>>> + <include name="javax/persistence/**" />
>>> + <include name="javax/xml/ws/**" />
>>> </patternset>
>>>
>>> <patternset id="files.servlet-api">
>>> - <include name="javax/servlet/*" />
>>> - <include name="javax/servlet/annotation/*" />
>>> - <include name="javax/servlet/descriptor/*" />
>>> - <include name="javax/servlet/http/*" />
>>> - <include name="javax/servlet/resources/*" />
>>> + <include name="javax/servlet/*.class" />
>>
>> I do not like these *.class patterns.
>>
>> I think occasionally having an empty package is less evil than missing
>> a *.properties file.
>
> Empty packages might cause issues when we start signing JARs. I know you
> can't have classes from the same package in different signed JARs. I'm
> not sure about empty packages.
IIRC from looking into WebappClassLoader a month ago, processing of
certificates is triggered by having found a *.class. If there is no
class file there, it is not triggered.
> We can always add a *.properties pattern to those patternsets.
>
There might also be *.xml (mbeans-descriptors.xml,
\storeconfig\server-registry.xml).
The rest are in their special packages (antlib.xml, *.tasks,
tagPlugins.xml, *.dtd, *.xsd).
*.html, *.gif, *.jjt are there, but are needed in the source only. Be
sure to pack them into *src zips.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1570115 - in /tomcat/tc7.0.x/trunk: ./ build.xml
webapps/docs/changelog.xml
Posted by Mark Thomas <ma...@apache.org>.
On 20/02/2014 09:10, Konstantin Kolinko wrote:
> 2014-02-20 13:04 GMT+04:00 <ma...@apache.org>:
>> Author: markt
>> Date: Thu Feb 20 09:04:52 2014
>> New Revision: 1570115
>>
>> URL: http://svn.apache.org/r1570115
>> Log:
>> Simplify patternsets where possible
>> Avoid pattern sets ending in "/*" as much as possible as they usually result in JARs containing empty packages with the contents of the package in a different JAR
>>
>> Modified:
>> tomcat/tc7.0.x/trunk/ (props changed)
>> tomcat/tc7.0.x/trunk/build.xml
>> tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>>
>> Propchange: tomcat/tc7.0.x/trunk/
>> ------------------------------------------------------------------------------
>> Merged /tomcat/trunk:r1570114
>>
>> Modified: tomcat/tc7.0.x/trunk/build.xml
>> URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.xml?rev=1570115&r1=1570114&r2=1570115&view=diff
>> ==============================================================================
>> --- tomcat/tc7.0.x/trunk/build.xml (original)
>> +++ tomcat/tc7.0.x/trunk/build.xml Thu Feb 20 09:04:52 2014
>> @@ -277,20 +277,18 @@
>> <!-- ========= Pattern sets used to control content of JAR files ========= -->
>> <!-- Pattern sets for jar files in standard distributions -->
>> <patternset id="files.annotations-api">
>> - <include name="javax/annotation/*" />
>> - <include name="javax/annotation/security/*" />
>> - <include name="javax/annotation/sql/*" />
>> - <include name="javax/ejb/*" />
>> - <include name="javax/persistence/*" />
>> - <include name="javax/xml/ws/*" />
>> + <include name="javax/annotation/**" />
>> + <include name="javax/ejb/**" />
>> + <include name="javax/persistence/**" />
>> + <include name="javax/xml/ws/**" />
>> </patternset>
>>
>> <patternset id="files.servlet-api">
>> - <include name="javax/servlet/*" />
>> - <include name="javax/servlet/annotation/*" />
>> - <include name="javax/servlet/descriptor/*" />
>> - <include name="javax/servlet/http/*" />
>> - <include name="javax/servlet/resources/*" />
>> + <include name="javax/servlet/*.class" />
>
> I do not like these *.class patterns.
>
> I think occasionally having an empty package is less evil than missing
> a *.properties file.
Empty packages might cause issues when we start signing JARs. I know you
can't have classes from the same package in different signed JARs. I'm
not sure about empty packages.
We can always add a *.properties pattern to those patternsets.
What is bothering me more right now, is why the servlet-api.jar didn't
have any *.properties files in it before this change. I'm looking into
this now but any hints welcome.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1570115 - in /tomcat/tc7.0.x/trunk: ./ build.xml webapps/docs/changelog.xml
Posted by Konstantin Kolinko <kn...@gmail.com>.
2014-02-20 13:04 GMT+04:00 <ma...@apache.org>:
> Author: markt
> Date: Thu Feb 20 09:04:52 2014
> New Revision: 1570115
>
> URL: http://svn.apache.org/r1570115
> Log:
> Simplify patternsets where possible
> Avoid pattern sets ending in "/*" as much as possible as they usually result in JARs containing empty packages with the contents of the package in a different JAR
>
> Modified:
> tomcat/tc7.0.x/trunk/ (props changed)
> tomcat/tc7.0.x/trunk/build.xml
> tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>
> Propchange: tomcat/tc7.0.x/trunk/
> ------------------------------------------------------------------------------
> Merged /tomcat/trunk:r1570114
>
> Modified: tomcat/tc7.0.x/trunk/build.xml
> URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.xml?rev=1570115&r1=1570114&r2=1570115&view=diff
> ==============================================================================
> --- tomcat/tc7.0.x/trunk/build.xml (original)
> +++ tomcat/tc7.0.x/trunk/build.xml Thu Feb 20 09:04:52 2014
> @@ -277,20 +277,18 @@
> <!-- ========= Pattern sets used to control content of JAR files ========= -->
> <!-- Pattern sets for jar files in standard distributions -->
> <patternset id="files.annotations-api">
> - <include name="javax/annotation/*" />
> - <include name="javax/annotation/security/*" />
> - <include name="javax/annotation/sql/*" />
> - <include name="javax/ejb/*" />
> - <include name="javax/persistence/*" />
> - <include name="javax/xml/ws/*" />
> + <include name="javax/annotation/**" />
> + <include name="javax/ejb/**" />
> + <include name="javax/persistence/**" />
> + <include name="javax/xml/ws/**" />
> </patternset>
>
> <patternset id="files.servlet-api">
> - <include name="javax/servlet/*" />
> - <include name="javax/servlet/annotation/*" />
> - <include name="javax/servlet/descriptor/*" />
> - <include name="javax/servlet/http/*" />
> - <include name="javax/servlet/resources/*" />
> + <include name="javax/servlet/*.class" />
I do not like these *.class patterns.
I think occasionally having an empty package is less evil than missing
a *.properties file.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org