On 2 November 2011 09:06, Tim Mickelson <mickel...@ietservizi.it> wrote:
>  I want to write a plugin to maven that copies the flex modules from a flex
> project (type swf) which contains modules. This  because the flexmojos does
> not do this. My problem is that independent of how the flexmodules are
> configured in the pom of the flex project they are saved on the local
> repository with a naming convention using artifactId, version and the name
> in lowercase as configured in the pom.
>
>  I need to copy them as configured in the pom. Well, actually this is not a
> great problem, just some manipulation extracting information from the pom
> and I'm done. The problem is, that when flex project is in some way part of
> my project (modular) then the files are not saved with this convention but
> in the path as configured in the pom and with the name as configured in the
> pom.
>
>  I would like to know, how I can distinguish if the swf project that I have
> at hand is in the repository, because it was previously installed or if it
> is part of my current project. I don't know if I've explained myself well,
> with being in my current project I mean specifically the case in which I
> have a pom that has e.g. two modules, one for the swf, and then one war
> where I want to put the peaces together.
>

You should be looking for the references to the files from the
reactor's attached artifacts not on the disk directly, so you'd
iterate through the reactorProjects looking for the one with the
matching GAV, if present then you look at that project's attached
artifacts for the matching GAVCT and if the getFile() != null then
that is your file. Otherwise if you have not found the file, then hit
the repositories.

That is the _correct_ way in principle....

What I cannot recall is if there are some handy helper methods/utility
classes to do just that for you or whether you have to reinvent the
wheel each time

-Stephen

>
>  Any link to documentation is welcome, all I can find is to simple from e.g.
> the maven site or the complete guide.
>
>  Tim
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to