You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Marshall Schor <ms...@schor.com> on 2013/07/23 16:28:29 UTC

Re: What is the reason for the true setting in DUCC parent pom?

Found another reason why setting index = true is not a good idea.

If you have a Jar which specifies a classpath in its manifest, then you need
special steps to insure that the index is built that includes the jars specified
in the classpath. 

See
http://closingbraces.net/2007/05/13/jarclasspathandindex/

But, it seems this is not needed for the case where the Jars are local, and the
classes are all expected to be found.

-Marshall


On 6/19/2013 2:43 PM, Marshall Schor wrote:
> The DUCC parent pom has a section for the maven-jar-plugin manifest
> configuration which adds <index>true</index>.  My reading of this is that it is
> designed for collections of Jars - where the index is built in such a way as to
> have all the entries for all the Jars, to enable applets to avoid downloading
> Jars just to search their contents.  (The 1st Jar has the index for all the Jars).
>
> I don't think this usage in individual Jars helps anything, and just takes up
> space...  Other opinions?
>
> -Marshall
>


Re: What is the reason for the true setting in DUCC parent pom?

Posted by Jaroslaw Cwiklik <ui...@gmail.com>.
Fixed under JIRA: https://issues.apache.org/jira/browse/UIMA-2881.


On Tue, Jul 23, 2013 at 10:44 AM, Jaroslaw Cwiklik <ui...@gmail.com> wrote:

> I dont recall as to why index=true is in the pom. I suspect it was pasted
> in from some configuration
> found on the web. It causes no harm as we are running with this setting
> since day 1. But since since
> it potentially may cause problems if our poms evolve I will remove it.
>
>
>
> On Tue, Jul 23, 2013 at 10:28 AM, Marshall Schor <ms...@schor.com> wrote:
>
>> Found another reason why setting index = true is not a good idea.
>>
>> If you have a Jar which specifies a classpath in its manifest, then you
>> need
>> special steps to insure that the index is built that includes the jars
>> specified
>> in the classpath.
>>
>> See
>> http://closingbraces.net/2007/05/13/jarclasspathandindex/
>>
>> But, it seems this is not needed for the case where the Jars are local,
>> and the
>> classes are all expected to be found.
>>
>> -Marshall
>>
>>
>> On 6/19/2013 2:43 PM, Marshall Schor wrote:
>> > The DUCC parent pom has a section for the maven-jar-plugin manifest
>> > configuration which adds <index>true</index>.  My reading of this is
>> that it is
>> > designed for collections of Jars - where the index is built in such a
>> way as to
>> > have all the entries for all the Jars, to enable applets to avoid
>> downloading
>> > Jars just to search their contents.  (The 1st Jar has the index for all
>> the Jars).
>> >
>> > I don't think this usage in individual Jars helps anything, and just
>> takes up
>> > space...  Other opinions?
>> >
>> > -Marshall
>> >
>>
>>
>

Re: What is the reason for the true setting in DUCC parent pom?

Posted by Marshall Schor <ms...@schor.com>.
Well, this may not be quite right...  :-)

Maven archiver (run as part of Jar) has code to build a Jar which has a manifest
entry for Class-path and to include the jars in the index file, which it
builds.  I think it does something like this:

First it skips doing anything unless the manifest has the addClasspath
configuration option set.  (Note that the DUCC parent pom is setting this to
false.  So this "blocks" the Maven archiver from doing the "right thing" with
respect to the indexes, for DUCC).

The code, if this was set to true, would do the following:

  * it gets the runtime classpath elements from the project being built.
  * it gets a File for each of those, and those are what gets "indexed".

I tried this but wasn't able to get it to generate a good index, so I think I
don't have this yet quite figured out. 

It's a bit of an academic exercise, in any case, as we're dropping the index
configuration anyways.

-Marshall


On 7/23/2013 11:29 AM, Marshall Schor wrote:
> On 7/23/2013 10:44 AM, Jaroslaw Cwiklik wrote:
>> I dont recall as to why index=true is in the pom. I suspect it was pasted
>> in from some configuration
>> found on the web. It causes no harm as we are running with this setting
>> since day 1. But since since
>> it potentially may cause problems if our poms evolve I will remove it.
> Example harm: using a standard maven jar build to build a jar where you set
> additional class paths in the manifest - this fails because the part of the jar
> building which indexes the jars doesn't index the addition jars included in the
> manifest class-path entry.
>
> -Marshall
>>
>>
>> On Tue, Jul 23, 2013 at 10:28 AM, Marshall Schor <ms...@schor.com> wrote:
>>
>>> Found another reason why setting index = true is not a good idea.
>>>
>>> If you have a Jar which specifies a classpath in its manifest, then you
>>> need
>>> special steps to insure that the index is built that includes the jars
>>> specified
>>> in the classpath.
>>>
>>> See
>>> http://closingbraces.net/2007/05/13/jarclasspathandindex/
>>>
>>> But, it seems this is not needed for the case where the Jars are local,
>>> and the
>>> classes are all expected to be found.
>>>
>>> -Marshall
>>>
>>>
>>> On 6/19/2013 2:43 PM, Marshall Schor wrote:
>>>> The DUCC parent pom has a section for the maven-jar-plugin manifest
>>>> configuration which adds <index>true</index>.  My reading of this is
>>> that it is
>>>> designed for collections of Jars - where the index is built in such a
>>> way as to
>>>> have all the entries for all the Jars, to enable applets to avoid
>>> downloading
>>>> Jars just to search their contents.  (The 1st Jar has the index for all
>>> the Jars).
>>>> I don't think this usage in individual Jars helps anything, and just
>>> takes up
>>>> space...  Other opinions?
>>>>
>>>> -Marshall
>>>>
>


Re: What is the reason for the true setting in DUCC parent pom?

Posted by Marshall Schor <ms...@schor.com>.
On 7/23/2013 10:44 AM, Jaroslaw Cwiklik wrote:
> I dont recall as to why index=true is in the pom. I suspect it was pasted
> in from some configuration
> found on the web. It causes no harm as we are running with this setting
> since day 1. But since since
> it potentially may cause problems if our poms evolve I will remove it.
Example harm: using a standard maven jar build to build a jar where you set
additional class paths in the manifest - this fails because the part of the jar
building which indexes the jars doesn't index the addition jars included in the
manifest class-path entry.

-Marshall
>
>
>
> On Tue, Jul 23, 2013 at 10:28 AM, Marshall Schor <ms...@schor.com> wrote:
>
>> Found another reason why setting index = true is not a good idea.
>>
>> If you have a Jar which specifies a classpath in its manifest, then you
>> need
>> special steps to insure that the index is built that includes the jars
>> specified
>> in the classpath.
>>
>> See
>> http://closingbraces.net/2007/05/13/jarclasspathandindex/
>>
>> But, it seems this is not needed for the case where the Jars are local,
>> and the
>> classes are all expected to be found.
>>
>> -Marshall
>>
>>
>> On 6/19/2013 2:43 PM, Marshall Schor wrote:
>>> The DUCC parent pom has a section for the maven-jar-plugin manifest
>>> configuration which adds <index>true</index>.  My reading of this is
>> that it is
>>> designed for collections of Jars - where the index is built in such a
>> way as to
>>> have all the entries for all the Jars, to enable applets to avoid
>> downloading
>>> Jars just to search their contents.  (The 1st Jar has the index for all
>> the Jars).
>>> I don't think this usage in individual Jars helps anything, and just
>> takes up
>>> space...  Other opinions?
>>>
>>> -Marshall
>>>
>>


Re: What is the reason for the true setting in DUCC parent pom?

Posted by Jaroslaw Cwiklik <ui...@gmail.com>.
I dont recall as to why index=true is in the pom. I suspect it was pasted
in from some configuration
found on the web. It causes no harm as we are running with this setting
since day 1. But since since
it potentially may cause problems if our poms evolve I will remove it.



On Tue, Jul 23, 2013 at 10:28 AM, Marshall Schor <ms...@schor.com> wrote:

> Found another reason why setting index = true is not a good idea.
>
> If you have a Jar which specifies a classpath in its manifest, then you
> need
> special steps to insure that the index is built that includes the jars
> specified
> in the classpath.
>
> See
> http://closingbraces.net/2007/05/13/jarclasspathandindex/
>
> But, it seems this is not needed for the case where the Jars are local,
> and the
> classes are all expected to be found.
>
> -Marshall
>
>
> On 6/19/2013 2:43 PM, Marshall Schor wrote:
> > The DUCC parent pom has a section for the maven-jar-plugin manifest
> > configuration which adds <index>true</index>.  My reading of this is
> that it is
> > designed for collections of Jars - where the index is built in such a
> way as to
> > have all the entries for all the Jars, to enable applets to avoid
> downloading
> > Jars just to search their contents.  (The 1st Jar has the index for all
> the Jars).
> >
> > I don't think this usage in individual Jars helps anything, and just
> takes up
> > space...  Other opinions?
> >
> > -Marshall
> >
>
>