ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: Source [war] in eclipse IvyDE
Date Mon, 02 Jul 2007 09:38:07 GMT
On 7/2/07, Bhatia Saurabh <Bhatia@ofac.ch> wrote:
>
>
> So,
> 2) Where do I add the pattern [artifact](-[classifier]).[ext] ?


In your repository settings, in the artifact pattern. The (-[classifier])
part means that Ivy will add -[classifier] only if the classifier is non
empty. So the artifact:
<artifact name="mylib" type="source" ext="war" classifier="src" />
will be found at:
mylib-src.war

while the artifact:
<artifact name="mylib" type="war" ext="war" />
will be found at:
mylib.war

But note that if you can choose your artifact names, I wouldn't use the
classifier extra attribute. This answer was given to John who want to deal
with existing source artifacts. In your case I would stick with a
distinction in the type only (using 'source' for the type, read the algo I
posted earlier in this thread).

Xavier

-----Message d'origine-----
> De: Bhatia Saurabh [mailto:Bhatia@OFAC.CH]
> Envoyé: lundi, 2. juillet 2007 11:13
> À: ivy-user@incubator.apache.org
> Objet: RE: Source [war] in eclipse IvyDE
>
> Ok. SO I guess I need to take the following steps to publish and discover
> my sources:
> 1) <property name="classifier " value="-src" /> in the ivyconf.xml
> 2) Ivy --> Sources Types in IvyDE = -src or source or ???
> 3) Add source artefact in the ivy.xml of my project.
>
> Anything else I am missing ?
>
> Thanks to all of you !!
>
> -----Message d'origine-----
> De: Xavier Hanin [mailto:xavier.hanin@gmail.com]
> Envoyé: lundi, 2. juillet 2007 10:57
> À: ivy-user@incubator.apache.org
> Objet: Re: Source [war] in eclipse IvyDE
>
> On 7/2/07, John Gill <llignhoj@gmail.com> wrote:
> >
> > The extension can be whatever you like. I don't think an extension of
> war
> > is
> > a good idea though. I quite like the idea of using .src.war as the
> > extension.
> >
> > Interestingly (or maybe not), I have some legacy source jars which are
> > named
> > mylib-src.jar. However the problem with that is that IvyDE will not like
> > that unless the names of the actual libs are mylib-src.jar also (which
> > they
> > are not, it is mylib.jar). What would be nice is if instead of using
> > ext="jar", I could use postfix="-src.jar". Obviously "ext" and "postfix"
> > would be mutually exclusive attributes.
>
>
> The name you have is very similar to maven 2 notations which involves
> another token: classifier. In your case the classifier is "src", and the
> pattern is:
> [artifact](-[classifier]).[ext]
>
> Classifier is not yet a supported attribute in Ivy, so you need to use an
> extra attribute for this (and disable xsd validation). If validation
> disabling is a problem, I suggest voting for
> https://issues.apache.org/jira/browse/IVY-553 or
> https://issues.apache.org/jira/browse/IVY-521. We will probably have
> either
> to implement IVY-553 or make classifier a real ivy attribute before 2.0,
> because when a pom with a classifier is converted to an ivy file in cache,
> it later cause a validation error when Ivy use the file from the cache. So
> using classifier will be standardized in ivy 2.0 either as a standard att
> or
> as maven2:classifier attribute (which I would prefer). Hence I recommend
> using classifier in your case.
>
> Xavier
>
> Does anyone else think the a postfix attribute would be useful (might be
> > tricky to implement though)?
> >
> > On 7/2/07, Bhatia Saurabh <Bhatia@ofac.ch> wrote:
> > >
> > > This is a very valid discussion.
> > >
> > > What should I do to publish the sources of a war file ?
> > > Should I name it \source\mylib.war?
> > >
> > > -----Message d'origine-----
> > > De: John Gill [mailto:llignhoj@gmail.com]
> > > Envoyé: jeudi, 28. juin 2007 13:54
> > > À: ivy-user@incubator.apache.org
> > > Objet: Re: Source in eclipse IvyDE
> > >
> > > Make sure the name of the source jar is exactly the same name as the
> > > implementation jar.
> > >
> > > For example, if your jar is mylib.jar, then its type would be jar. The
> > > source would be mylib.jar and it's type would be source, and its ext
> > would
> > > be jar (or zip if you like).
> > >
> > > The same applies for javadoc, if you have a zip of javadoc, then it's
> > name
> > > would be the mylib.zip, but its type would be javadoc.
> > >
> > > So, your repsoitory would have
> > >
> > > myorg\mylib\1.0.0\jar\mylib.jar
> > > myorg\mylib\1.0.0\source\mylib.jar
> > > myorg\mylib\1.0.0\javadoc\mylib.zip
> > >
> > >
> > > On 6/28/07, Foreman, Alex (IT) <Alexander.Foreman@morganstanley.com>
> > > wrote:
> > > >
> > > > Hi,
> > > >
> > > > I have configured eclipseIDE to use Ivy and it is currently
> resolving
> > > > all my complex dependancies.  It is imperitive that we have our
> > sources
> > > > available for use by developers.
> > > >
> > > > I noticed in the ivy preferences page there is a source
> > attachment.  In
> > > > there I have added 'source'
> > > > In one library I have added an extra artifact of type 'source' and
> > > > pointed it to the source jar.  However ivy resolves all jars
> downloads
> > > > them to the cache but eclipse doesnot view the source code when I
> view
> > > > it though its java editor.
> > > >
> > > > Have I missed anything out?
> > > > This would be a real blocker if we cannot view the source
> > automatically
> > > > once resolved.
> > > >
> > > > Also is there away to remove the cache to enable it to be refreshed
> > via
> > > > eclipse?  Currently I have to go thrugh a file manager and remove
> the
> > > > directory by hand then refresh in eclipse.
> > > >
> > > > Many thanks,
> > > >
> > > > Alex
> > > > --------------------------------------------------------
> > > >
> > > > NOTICE: If received in error, please destroy and notify sender.
> Sender
> > > > does not intend to waive confidentiality or privilege. Use of this
> > email
> > > is
> > > > prohibited when received in error.
> > > >
> > >
> > >
> > >
> > > --
> > > Regards,
> > > John Gill
> > >
> >
> >
> >
> > --
> > Regards,
> > John Gill
> >
>
>
>
> --
> Xavier Hanin - Independent Java Consultant
> Creator of Ivy, xooki and xoocode.org
> More about me: http://xhab.blogspot.com/
>



-- 
Xavier Hanin - Independent Java Consultant
Creator of Ivy, xooki and xoocode.org
More about me: http://xhab.blogspot.com/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message