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 08:43:29 GMT
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?


Here is the current algo used to consider an artifact as the source artifact
of another artifact:
                if (a.getName().equals(artifact.getName()) &&

a.getId().getRevision().equals(artifact.getId().getRevision())
&&
                        IvyPlugin.isSources(_javaProject, a))

with isSources:
    public static boolean isSources(IJavaProject project, Artifact artifact)
{
        return getSourcesTypes(project).contains(artifact.getType());
    }

getSourcesTypes returns the collection configured in IvyDE, by default
{"source"}.

Therefore to be considered a source artifact your artifact must:
- have the same name and revision as the artifact to which it must be
attached
- have a "source" type (or another type configured in IvyDE).

Hence the 'ext' is free.

HTH,

Xavier



-----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
>



-- 
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