maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Hoffer <dhoff...@gmail.com>
Subject Re: How to use maven-dependency-plugin to unpack-dependencies for 2 artifacts?
Date Thu, 02 Apr 2009 21:36:05 GMT
I did use excludeTransitive but did not help so I just can't fall back
to unpack-dependencies.  I'm in trouble if unpack has trouble with the
release goal.

I just want to unpack two artifacts at two locations before package
phase, is there a different plugin that can handle this simple case?

-Dave

On Thu, Apr 2, 2009 at 2:28 PM, Stephen Connolly
<stephen.alan.connolly@gmail.com> wrote:
> 2009/4/2 Brian E. Fox <brianf@reply.infinity.nu>
>
>> >It's things like this that give maven a bad rep.  Folks spend hours
>> >trying to get it to work and never do.  Fixing it is in order, but why
>> >on earth can't the keepers of the plugin document this in an obvious
>> >place?
>>
>> Because that assumption below isn't true. The unpack and copy goals allow
>> you very fine grained control over which artifacts go where since you can
>> name them one at a time. The xxx-dependencies goals are intended for
>> operation en-mass of your dependencies and you filter them down using many
>> different filters. It is possible to specify a single artifactId in the
>> filter. This case though would require multiple executions since it wasn't
>> designed like the copy/unpack to run in a single execution and cherry pick
>> artifacts.
>>
>
> What I find is that you need to excludeTrasitive as well in order to make
> the multiple executions work.
>
> The reason why people fall back to unpack-dependencies is because unpack
> does not handle searching the reactor correctly and so will interact poorly
> with the release plugin :-(
>
> -Stephen
>
>
>>
>> On Thu, Apr 2, 2009 at 11:41 AM, Bryan Loofbourrow
>> <bryan.loofbourrow@amdocs.com> wrote:
>> >
>> > I've run into this too. I inferred that the dependency plugin's
>> > unpack-dependencies goal was simply not written in a way that allows it
>> > to be executed twice in the same project. I can see how that could
>> > happen, if one were not pretty careful in the execute() method about
>> > making the scratchpad controlling the scratchpad. I resorted to
>> > splitting up Maven projects so that there's no more than one
>> > unpack-dependencies per pom. But I too would love a better solution.
>> >
>> > Actually, the situation could be a bit worse than I portray it above, if
>> > Maven itself does not handle multiple executions by making separate
>> > calls to execute, with a different set of instantiated parameters each
>> > time. But I hope it does.
>> >
>> > -- Bryan
>> >
>> > -----Original Message-----
>> > From: David Hoffer [mailto:dhoffer6@gmail.com]
>> > Sent: Wednesday, April 01, 2009 8:42 PM
>> > To: users@maven.apache.org
>> > Subject: How to use maven-dependency-plugin to unpack-dependencies for 2
>> > artifacts?
>> >
>> > I'm having problems figuring out how to configure the
>> > maven-dependency-plugin to unpack 2 separate dependencies.  I have 3
>> > executions, the first uses the copy-dependencies goal to copy a swf
>> > artifact, this seems to work.
>> >
>> > Then I have two executions each using unpack-dependencies goal; the
>> > first unpacks some flex config files and the second unpacks a spring
>> > configuration file.  Here is my pom:
>> >
>> > <executions>
>> >                    <execution>
>> >                        <id>copy-swf</id>
>> >                        <phase>process-classes</phase>
>> >                        <goals>
>> >                            <goal>copy-dependencies</goal>
>> >                        </goals>
>> >                        <configuration>
>> >
>> > <outputDirectory>${project.build.directory}/${project.build.finalName}</
>> > outputDirectory>
>> >
>> > <includeArtifacIds>cdf-as-client-testapp</includeArtifacIds>
>> >                            <includeTypes>swf</includeTypes>
>> >                            <overWrite>true</overWrite>
>> >                        </configuration>
>> >                    </execution>
>> >
>> >                    <execution>
>> >                        <id>unpack-config</id>
>> >                        <goals>
>> >                            <goal>unpack-dependencies</goal>
>> >                        </goals>
>> >                        <phase>package</phase>
>> >                        <configuration>
>> >
>> > <outputDirectory>${project.build.directory}/${project.build.finalName}/W
>> > EB-INF/flex
>> >                            </outputDirectory>
>> >
>> > <includeArtifacIds>cdf-blaze-svcs-config</includeArtifacIds>
>> >                            <excludeTransitive>true</excludeTransitive>
>> >                            <excludeTypes>jar,swf,pom</excludeTypes>
>> >                            <overWriteReleases>true</overWriteReleases>
>> >
>> > <overWriteSnapshots>true</overWriteSnapshots>
>> >                        </configuration>
>> >                    </execution>
>> >
>> >                    <execution>
>> >                        <id>unpack-spring-config</id>
>> >                        <goals>
>> >                            <goal>unpack-dependencies</goal>
>> >                        </goals>
>> >                        <phase>package</phase>
>> >                        <configuration>
>> >
>> > <outputDirectory>${project.build.directory}/${project.build.finalName}/W
>> > EB-INF/spring
>> >                            </outputDirectory>
>> >
>> > <includeArtifacIds>cdf-spring-directbroker-config</includeArtifacIds>
>> >                            <excludeTransitive>true</excludeTransitive>
>> >                            <excludeTypes>jar,swf,pom</excludeTypes>
>> >                            <overWriteReleases>true</overWriteReleases>
>> >
>> > <overWriteSnapshots>true</overWriteSnapshots>
>> >                        </configuration>
>> >                    </execution>
>> > </executions>
>> >
>> > The problem is that the output folders /WEB-INF/flex & /WEB-INF/spring
>> > BOTH contain the same contents, i.e. they BOTH contain what is
>> > supposed to be only in flex and only in spring.  Furthermore BOTH
>> > contain some content not from either artifact!?!  This unexpected
>> > content seems to be some flex content which I have no idea why it is
>> > adding.
>> >
>> > How can I use maven-dependency-plugin to just unpack one artifact and
>> > put it in a separate folder?
>> >
>> > -Dave
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>> > This message and the information contained herein is proprietary and
>> confidential and subject to the Amdocs policy statement,
>> > you may review at http://www.amdocs.com/email_disclaimer.asp
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

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


Mime
View raw message