ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Lalevée <>
Subject Re: IvyDE automatically include javadoc and source
Date Mon, 24 Aug 2009 16:30:24 GMT
On Friday 21 August 2009 18:03:16 Mitch Gitman wrote:
> Speaking as someone who had struggled to grasp how IvyDE went about
> automatically finding source and Javadoc, I would agree that it's a lot
> easier to put the -source and -javadoc artifacts in the same Ivy conf as
> the binary--rather than giving them their own special Ivy confs.
> There's one ramification to this approach and I'm just curious if anyone
> has run into trouble with this. It comes when you need to gather up a set
> of files for a deployment, such as to place in a webapp's WEB-INF/lib/. The
> cachefileset
> Ant
> task<
>ml>lets you specify type. If you specify
> type="*", then you're going to get all the source and Javadoc artifacts.
> But what if you don't want them in the deployment?
> Now, in the particular case of placing files in WEB-INF/lib/, you're
> probably safe in specifying type="jar". I'm showing the limits of my
> understanding of the Servlet API when I say I don't know if other types can
> go in WEB-INF/lib/. Maybe sar? But that's kind of my point. What if you *
> don't* know the full range of types you want to gather up at deployment
> time but you do know you *don't *want source and javadoc?
> Nicolas, how do you recommend avoiding this potential problem? Has anyone
> run into this problem? And I'm wondering if *cachefileset *shouldn't have
> an attribute like *excludetype*, although I'm not sure how that would
> coexist with the *type *attribute.
> See:

One way or the other you can still face issues. If you are not sure of the 
list of types that exist in the repository you are relying on, then two sorts 
of problem can occur. The one you mentioned, we specify type="jar" but 
actually we will miss type="sar". Or we can have the reverse, we specify 
type="*" excludetype="javadoc,javadocs,doc,docs,source,sources,src", and we 
will get unwanted artifact with type="pdfdoc".

I prefer specify what I want rather than specify what I don't want. And if 
really I miss a type (which would be very rare, there are not hundreds of 
types), at least me running my webapp or one of my colleague or even the QA 
should detect that what I deliver is incomplete.


> 2009/8/21 Nicolas Lalevée <>
> > On Thursday 30 July 2009 22:25:01 snowflake wrote:
> > > Hi,
> > > Is it possible to have IvyDE automatically include chosen
> > > configurations (such as javadoc and source) for all dependencies?  This
> > > will be a nice feature as currently I have to add conf="...; javadoc;
> > > sources" to every dependency, then remove it prior to publishing my
> > > project.
> >
> > Rather than choosing the configuration to select or not the javadocs and
> > the
> > sources, you should use the types. Configurations and types are
> > orthogonal concepts, you should try to not mix them. And then IvyDE will
> > be capable of retrieving every artifact of type source and javadoc of
> > every dependency.
> >
> > Nicolas

View raw message