maven-dependency-plugin:unpack-dependencies doesn't always work

View: New views
17 Messages — Rating Filter:   Alert me  

maven-dependency-plugin:unpack-dependencies doesn't always work

by EJ Ciramella-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm having a bit of difficulty with unpacking some dependencies - and I'm not entirely sure why this process is failing.

In _some_ projects, we define the dependency we'd like to unpack within the plugin configuration - like this:

         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-dependency-plugin</artifactId>
           <version>2.1</version>
           <dependencies>
              <dependency>
                  <groupId> </groupId>
                  <artifactId> </artifactId>
                  <version></version>
                  <classifier>templates</classifier>
                  <scope>provided</scope>
                  <type>zip</type>
              </dependency>
           </dependencies>
           <executions>
              <execution>
                  <id>unpack- templates</id>
                  <phase>generate-resources</phase>
                  <goals>
                      <goal>unpack-dependencies</goal>
                  </goals>
                  <configuration>
                      <overWriteReleases>false</overWriteReleases>
                      <overWriteSnapshots>true</overWriteSnapshots>
                      <includeGroupIds> </includeGroupIds>
                      <includeArtifactIds> </includeArtifactIds>
                      <classifier>templates</classifier>
                      <type>zip</type>
                      <outputDirectory>target/foo</outputDirectory>
                  </configuration>
              </execution>
           </executions>
         </plugin>

In another project, if I copy and paste this block in, it not only doesn't unpack, but doesn't fail.  With -X -e, the debug output shows it saying "hey, I'm unpacking now" but there's nothing there.

Any suggestions?

RE: maven-dependency-plugin:unpack-dependencies doesn't always work

by EJ Ciramella-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I literally see it skipping the actual unpack (with no errors or warnings):

BAD:

[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack-dependencies' -->
[DEBUG]   (f) classifier = default
[DEBUG]   (s) copyPom = false
[DEBUG]   (f) excludeTransitive = false
[DEBUG]   (s) failOnMissingClassifierArtifact = true
[DEBUG]   (f) includeArtifactIds = <ID>
[DEBUG]   (f) includeGroupIds = <GROUP>
[DEBUG]   (s) local = [local] -> file://E:/work/m2Repo
[DEBUG]   (s) markersDirectory = <MARKERS DIR>
[DEBUG]   (f) outputAbsoluteArtifactFilename = false
[DEBUG]   (s) outputDirectory = <OUTPUT DIR>
[DEBUG]   (f) overWriteIfNewer = true
[DEBUG]   (f) overWriteReleases = false
[DEBUG]   (f) overWriteSnapshots = true
<SNIP>
[DEBUG]   (f) silent = false
[DEBUG]   (s) stripVersion = false
[DEBUG]   (f) type = zip
[DEBUG]   (s) useRepositoryLayout = false
[DEBUG]   (s) useSubDirectoryPerArtifact = false
[DEBUG]   (s) useSubDirectoryPerType = false
[DEBUG] -- end configuration --
[INFO] [dependency:unpack-dependencies {execution: <EXECUTION ID>}]

GOOD:

[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack-dependencies' -->
[DEBUG]   (f) classifier = templates
[DEBUG]   (s) copyPom = false
[DEBUG]   (f) excludeTransitive = false
[DEBUG]   (s) failOnMissingClassifierArtifact = true
[DEBUG]   (f) includeArtifactIds = <ID>
[DEBUG]   (f) includeGroupIds = <GROUP>
[DEBUG]   (s) local = [local] -> file://E:/work/m2Repo
[DEBUG]   (s) markersDirectory = <MARKERS DIR>
[DEBUG]   (f) outputAbsoluteArtifactFilename = false
[DEBUG]   (s) outputDirectory = <OUTPUT DIR>
[DEBUG]   (f) overWriteIfNewer = true
[DEBUG]   (f) overWriteReleases = false
[DEBUG]   (f) overWriteSnapshots = true
<SNIP>
[DEBUG]   (f) silent = false
[DEBUG]   (s) stripVersion = false
[DEBUG]   (f) type = zip
[DEBUG]   (s) useRepositoryLayout = false
[DEBUG]   (s) useSubDirectoryPerArtifact = false
[DEBUG]   (s) useSubDirectoryPerType = false
[DEBUG] -- end configuration --
[INFO] [dependency:unpack-dependencies {execution: <EXECUTION ID>}]
[DEBUG] Translating Artifacts using Classifier: templates and Type: zip
[INFO] Unpacking <PATH TO DEPENDENCY> to
<OUTPUT DIR>
   with includes null and excludes:null

Why is the first one not doing anything?!

-----Original Message-----
From: EJ Ciramella [mailto:eciramella@...]
Sent: Thursday, November 05, 2009 9:43 PM
To: users@...
Subject: maven-dependency-plugin:unpack-dependencies doesn't always work

I'm having a bit of difficulty with unpacking some dependencies - and I'm not entirely sure why this process is failing.

In _some_ projects, we define the dependency we'd like to unpack within the plugin configuration - like this:

         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-dependency-plugin</artifactId>
           <version>2.1</version>
           <dependencies>
              <dependency>
                  <groupId> </groupId>
                  <artifactId> </artifactId>
                  <version></version>
                  <classifier>templates</classifier>
                  <scope>provided</scope>
                  <type>zip</type>
              </dependency>
           </dependencies>
           <executions>
              <execution>
                  <id>unpack- templates</id>
                  <phase>generate-resources</phase>
                  <goals>
                      <goal>unpack-dependencies</goal>
                  </goals>
                  <configuration>
                      <overWriteReleases>false</overWriteReleases>
                      <overWriteSnapshots>true</overWriteSnapshots>
                      <includeGroupIds> </includeGroupIds>
                      <includeArtifactIds> </includeArtifactIds>
                      <classifier>templates</classifier>
                      <type>zip</type>
                      <outputDirectory>target/foo</outputDirectory>
                  </configuration>
              </execution>
           </executions>
         </plugin>

In another project, if I copy and paste this block in, it not only doesn't unpack, but doesn't fail.  With -X -e, the debug output shows it saying "hey, I'm unpacking now" but there's nothing there.

Any suggestions?

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


RE: maven-dependency-plugin:unpack-dependencies doesn't always work

by EJ Ciramella-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What's really wonky is if I change what dependency I'd like to unpack from the bad one to something like one of the apache commons jars, it works fine.

What else would make the dependency-unpack just choose NOT to unpack something?

-----Original Message-----
From: EJ Ciramella [mailto:eciramella@...]
Sent: Friday, November 06, 2009 2:54 PM
To: users@...
Subject: RE: maven-dependency-plugin:unpack-dependencies doesn't always work

I literally see it skipping the actual unpack (with no errors or warnings):

BAD:

[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack-dependencies' -->
[DEBUG]   (f) classifier = default
[DEBUG]   (s) copyPom = false
[DEBUG]   (f) excludeTransitive = false
[DEBUG]   (s) failOnMissingClassifierArtifact = true
[DEBUG]   (f) includeArtifactIds = <ID>
[DEBUG]   (f) includeGroupIds = <GROUP>
[DEBUG]   (s) local = [local] -> file://E:/work/m2Repo
[DEBUG]   (s) markersDirectory = <MARKERS DIR>
[DEBUG]   (f) outputAbsoluteArtifactFilename = false
[DEBUG]   (s) outputDirectory = <OUTPUT DIR>
[DEBUG]   (f) overWriteIfNewer = true
[DEBUG]   (f) overWriteReleases = false
[DEBUG]   (f) overWriteSnapshots = true
<SNIP>
[DEBUG]   (f) silent = false
[DEBUG]   (s) stripVersion = false
[DEBUG]   (f) type = zip
[DEBUG]   (s) useRepositoryLayout = false
[DEBUG]   (s) useSubDirectoryPerArtifact = false
[DEBUG]   (s) useSubDirectoryPerType = false
[DEBUG] -- end configuration --
[INFO] [dependency:unpack-dependencies {execution: <EXECUTION ID>}]

GOOD:

[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack-dependencies' -->
[DEBUG]   (f) classifier = templates
[DEBUG]   (s) copyPom = false
[DEBUG]   (f) excludeTransitive = false
[DEBUG]   (s) failOnMissingClassifierArtifact = true
[DEBUG]   (f) includeArtifactIds = <ID>
[DEBUG]   (f) includeGroupIds = <GROUP>
[DEBUG]   (s) local = [local] -> file://E:/work/m2Repo
[DEBUG]   (s) markersDirectory = <MARKERS DIR>
[DEBUG]   (f) outputAbsoluteArtifactFilename = false
[DEBUG]   (s) outputDirectory = <OUTPUT DIR>
[DEBUG]   (f) overWriteIfNewer = true
[DEBUG]   (f) overWriteReleases = false
[DEBUG]   (f) overWriteSnapshots = true
<SNIP>
[DEBUG]   (f) silent = false
[DEBUG]   (s) stripVersion = false
[DEBUG]   (f) type = zip
[DEBUG]   (s) useRepositoryLayout = false
[DEBUG]   (s) useSubDirectoryPerArtifact = false
[DEBUG]   (s) useSubDirectoryPerType = false
[DEBUG] -- end configuration --
[INFO] [dependency:unpack-dependencies {execution: <EXECUTION ID>}]
[DEBUG] Translating Artifacts using Classifier: templates and Type: zip
[INFO] Unpacking <PATH TO DEPENDENCY> to
<OUTPUT DIR>
   with includes null and excludes:null

Why is the first one not doing anything?!

-----Original Message-----
From: EJ Ciramella [mailto:eciramella@...]
Sent: Thursday, November 05, 2009 9:43 PM
To: users@...
Subject: maven-dependency-plugin:unpack-dependencies doesn't always work

I'm having a bit of difficulty with unpacking some dependencies - and I'm not entirely sure why this process is failing.

In _some_ projects, we define the dependency we'd like to unpack within the plugin configuration - like this:

         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-dependency-plugin</artifactId>
           <version>2.1</version>
           <dependencies>
              <dependency>
                  <groupId> </groupId>
                  <artifactId> </artifactId>
                  <version></version>
                  <classifier>templates</classifier>
                  <scope>provided</scope>
                  <type>zip</type>
              </dependency>
           </dependencies>
           <executions>
              <execution>
                  <id>unpack- templates</id>
                  <phase>generate-resources</phase>
                  <goals>
                      <goal>unpack-dependencies</goal>
                  </goals>
                  <configuration>
                      <overWriteReleases>false</overWriteReleases>
                      <overWriteSnapshots>true</overWriteSnapshots>
                      <includeGroupIds> </includeGroupIds>
                      <includeArtifactIds> </includeArtifactIds>
                      <classifier>templates</classifier>
                      <type>zip</type>
                      <outputDirectory>target/foo</outputDirectory>
                  </configuration>
              </execution>
           </executions>
         </plugin>

In another project, if I copy and paste this block in, it not only doesn't unpack, but doesn't fail.  With -X -e, the debug output shows it saying "hey, I'm unpacking now" but there's nothing there.

Any suggestions?

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


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


RE: maven-dependency-plugin:unpack-dependencies doesn't always work

by EJ Ciramella-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here's a perfect example of this _not_ working.  Anyone willing to try this out as well?

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>foo</groupId>
  <artifactId>bar</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>bar</name>
  <url>http://maven.apache.org</url>
  <build>
    <plugins>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-dependency-plugin</artifactId>
           <version>2.1</version>
           <dependencies>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.0</version>
            </dependency>
           </dependencies>
           <executions>
              <execution>
                  <id>unpack-capi-templates</id>
                  <phase>generate-resources</phase>
                  <goals>
                      <goal>unpack-dependencies</goal>
                  </goals>
                  <configuration>
                      <overWriteReleases>false</overWriteReleases>
                      <overWriteSnapshots>true</overWriteSnapshots>
                      <includeGroupIds>junit</includeGroupIds>
                      <includeArtifactIds>junit</includeArtifactIds>
                      <type>jar</type>
                      <outputDirectory>target/junit</outputDirectory>
                  </configuration>
              </execution>
           </executions>
         </plugin>
    </plugins>
  </build>
</project>

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


RE: maven-dependency-plugin:unpack-dependencies doesn't always work

by Jörg Schaible-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

EJ Ciramella wrote:

> Here's a perfect example of this _not_ working.  Anyone willing to try
> this out as well?

[snip]

I did not try it, but junit is typically of scope "test" and that's not the
default for the "unpack-dependencies" goal.

- Jörg



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


Re: maven-dependency-plugin:unpack-dependencies doesn't always work

by Sony Antony :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

My apologies if I didnt understand your Q correctly :
The following works for me
<plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.1</version>
            <executions>
               <execution>
                  <id>fetch-wsdls-and-schemas</id>
                  <phase>generate-sources</phase>
                  <goals>
                     <goal>unpack-dependencies</goal>
                  </goals>
                  <configuration>

<outputDirectory>${project.build.directory}/wsdls-and-schemas</outputDirect
ory>
                     <includeGroupIds>mygroupid</includeGroupIds>
                     <includeArtifacIds>sms-wsdlfiles</includeArtifacIds>
                     <excludeTransitive>true</excludeTransitive>
                  </configuration>
               </execution>
            </executions>
         </plugin>

Also I had to give teh dependency as the project dependency ( not inside the
plugin )
--sony

On Fri, Nov 6, 2009 at 4:19 PM, Jörg Schaible <joerg.schaible@...> wrote:

> EJ Ciramella wrote:
>
> > Here's a perfect example of this _not_ working.  Anyone willing to try
> > this out as well?
>
> [snip]
>
> I did not try it, but junit is typically of scope "test" and that's not the
> default for the "unpack-dependencies" goal.
>
> - Jörg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

Re: maven-dependency-plugin:unpack-dependencies doesn't always work

by Jörg Schaible-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sony,

Sony Antony wrote:

> My apologies if I didnt understand your Q correctly :
> The following works for me
> <plugin>
>             <artifactId>maven-dependency-plugin</artifactId>
>             <version>2.1</version>
>             <executions>
>                <execution>
>                   <id>fetch-wsdls-and-schemas</id>
>                   <phase>generate-sources</phase>
>                   <goals>
>                      <goal>unpack-dependencies</goal>
>                   </goals>
>                   <configuration>
>
>
<outputDirectory>${project.build.directory}/wsdls-and-schemas</outputDirect

> ory>
>                      <includeGroupIds>mygroupid</includeGroupIds>
>                      <includeArtifacIds>sms-wsdlfiles</includeArtifacIds>
>                      <excludeTransitive>true</excludeTransitive>
>                   </configuration>
>                </execution>
>             </executions>
>          </plugin>
>
> Also I had to give teh dependency as the project dependency ( not inside
> the plugin )

Good catch, I did not notice this. The dependency-plugin works on the
proejct's deps, not on the deps of the plugin itself.

- Jörg


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


RE: maven-dependency-plugin:unpack-dependencies doesn't always work

by EJ Ciramella-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Of course - I'm aware of that, it was just the first jar I could copy/paste into this example.

It could be an arbitrary jar.

-----Original Message-----
From: news [mailto:news@...] On Behalf Of Jörg Schaible
Sent: Friday, November 06, 2009 4:20 PM
To: users@...
Subject: RE: maven-dependency-plugin:unpack-dependencies doesn't always work

EJ Ciramella wrote:

> Here's a perfect example of this _not_ working.  Anyone willing to try
> this out as well?

[snip]

I did not try it, but junit is typically of scope "test" and that's not the
default for the "unpack-dependencies" goal.

- Jörg



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


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


RE: maven-dependency-plugin:unpack-dependencies doesn't always work

by EJ Ciramella-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Right - that's my question exactly.

We (in our real env) specify two dependencies in the plugin.  One of them is unpacked, the other is not.

The (bad) solution is to put both things in the overall project dependency listings.  I'm just not sure why something would skip unpacking.

I think it's something with the second artifact, as I type, I tried swapping out our second zip with the junit jar (and it works).

There is no error by the way, it just says it's unpacking, but doesn't.

-----Original Message-----
From: Sony Antony [mailto:sony.antony@...]
Sent: Friday, November 06, 2009 4:59 PM
To: Maven Users List; joerg.schaible@...
Subject: Re: maven-dependency-plugin:unpack-dependencies doesn't always work

My apologies if I didnt understand your Q correctly :
The following works for me
<plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.1</version>
            <executions>
               <execution>
                  <id>fetch-wsdls-and-schemas</id>
                  <phase>generate-sources</phase>
                  <goals>
                     <goal>unpack-dependencies</goal>
                  </goals>
                  <configuration>

<outputDirectory>${project.build.directory}/wsdls-and-schemas</outputDirect
ory>
                     <includeGroupIds>mygroupid</includeGroupIds>
                     <includeArtifacIds>sms-wsdlfiles</includeArtifacIds>
                     <excludeTransitive>true</excludeTransitive>
                  </configuration>
               </execution>
            </executions>
         </plugin>

Also I had to give teh dependency as the project dependency ( not inside the
plugin )
--sony

On Fri, Nov 6, 2009 at 4:19 PM, Jörg Schaible <joerg.schaible@...> wrote:

> EJ Ciramella wrote:
>
> > Here's a perfect example of this _not_ working.  Anyone willing to try
> > this out as well?
>
> [snip]
>
> I did not try it, but junit is typically of scope "test" and that's not the
> default for the "unpack-dependencies" goal.
>
> - Jörg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

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


RE: maven-dependency-plugin:unpack-dependencies doesn't always work

by EJ Ciramella-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is really strange then - one dependency (within the plugin) is unpacked, the second one isn't.

I don't see the one that does get unpacked listed (even as a transitive dependency) anywhere (via dependency:tree).

Also, if I throw in junit and (you pick a second dependency), it unpacks both successfully....

If it's set in stone that the plugin operates ONLY on the project dependency list (and not the plugin dependency list), I'd really love to understand the inconsistency I'm seeing before putting the dependencies in the project dependency list.

-----Original Message-----
From: news [mailto:news@...] On Behalf Of Jörg Schaible
Sent: Friday, November 06, 2009 5:24 PM
To: users@...
Subject: Re: maven-dependency-plugin:unpack-dependencies doesn't always work

Hi Sony,

Sony Antony wrote:

> My apologies if I didnt understand your Q correctly :
> The following works for me
> <plugin>
>             <artifactId>maven-dependency-plugin</artifactId>
>             <version>2.1</version>
>             <executions>
>                <execution>
>                   <id>fetch-wsdls-and-schemas</id>
>                   <phase>generate-sources</phase>
>                   <goals>
>                      <goal>unpack-dependencies</goal>
>                   </goals>
>                   <configuration>
>
>
<outputDirectory>${project.build.directory}/wsdls-and-schemas</outputDirect

> ory>
>                      <includeGroupIds>mygroupid</includeGroupIds>
>                      <includeArtifacIds>sms-wsdlfiles</includeArtifacIds>
>                      <excludeTransitive>true</excludeTransitive>
>                   </configuration>
>                </execution>
>             </executions>
>          </plugin>
>
> Also I had to give teh dependency as the project dependency ( not inside
> the plugin )

Good catch, I did not notice this. The dependency-plugin works on the
proejct's deps, not on the deps of the plugin itself.

- Jörg


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


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


Re: maven-dependency-plugin:unpack-dependencies doesn't always work

by Sony Antony :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

did you explicitly give teh <type> for the zip artifact ?
--sony

On Fri, Nov 6, 2009 at 5:50 PM, EJ Ciramella <eciramella@...>wrote:

> Right - that's my question exactly.
>
> We (in our real env) specify two dependencies in the plugin.  One of them
> is unpacked, the other is not.
>
> The (bad) solution is to put both things in the overall project dependency
> listings.  I'm just not sure why something would skip unpacking.
>
> I think it's something with the second artifact, as I type, I tried
> swapping out our second zip with the junit jar (and it works).
>
> There is no error by the way, it just says it's unpacking, but doesn't.
>
> -----Original Message-----
> From: Sony Antony [mailto:sony.antony@...]
> Sent: Friday, November 06, 2009 4:59 PM
> To: Maven Users List; joerg.schaible@...
> Subject: Re: maven-dependency-plugin:unpack-dependencies doesn't always
> work
>
> My apologies if I didnt understand your Q correctly :
> The following works for me
> <plugin>
>            <artifactId>maven-dependency-plugin</artifactId>
>            <version>2.1</version>
>            <executions>
>               <execution>
>                  <id>fetch-wsdls-and-schemas</id>
>                  <phase>generate-sources</phase>
>                  <goals>
>                     <goal>unpack-dependencies</goal>
>                  </goals>
>                  <configuration>
>
> <outputDirectory>${project.build.directory}/wsdls-and-schemas</outputDirect
> ory>
>                     <includeGroupIds>mygroupid</includeGroupIds>
>                     <includeArtifacIds>sms-wsdlfiles</includeArtifacIds>
>                     <excludeTransitive>true</excludeTransitive>
>                  </configuration>
>               </execution>
>            </executions>
>         </plugin>
>
> Also I had to give teh dependency as the project dependency ( not inside
> the
> plugin )
> --sony
>
> On Fri, Nov 6, 2009 at 4:19 PM, Jörg Schaible <joerg.schaible@...>
> wrote:
>
> > EJ Ciramella wrote:
> >
> > > Here's a perfect example of this _not_ working.  Anyone willing to try
> > > this out as well?
> >
> > [snip]
> >
> > I did not try it, but junit is typically of scope "test" and that's not
> the
> > default for the "unpack-dependencies" goal.
> >
> > - Jörg
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@...
> > For additional commands, e-mail: users-help@...
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

Re: maven-dependency-plugin:unpack-dependencies doesn't always work

by BRIAN FOX-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

if you do a clean build does it unpack? Just wondering if it's seeing
the marker file in target/dependencies and deciding to not unpack
again.

On Fri, Nov 6, 2009 at 4:02 PM, Sony Antony <sony.antony@...> wrote:

> did you explicitly give teh <type> for the zip artifact ?
> --sony
>
> On Fri, Nov 6, 2009 at 5:50 PM, EJ Ciramella <eciramella@...>wrote:
>
>> Right - that's my question exactly.
>>
>> We (in our real env) specify two dependencies in the plugin.  One of them
>> is unpacked, the other is not.
>>
>> The (bad) solution is to put both things in the overall project dependency
>> listings.  I'm just not sure why something would skip unpacking.
>>
>> I think it's something with the second artifact, as I type, I tried
>> swapping out our second zip with the junit jar (and it works).
>>
>> There is no error by the way, it just says it's unpacking, but doesn't.
>>
>> -----Original Message-----
>> From: Sony Antony [mailto:sony.antony@...]
>> Sent: Friday, November 06, 2009 4:59 PM
>> To: Maven Users List; joerg.schaible@...
>> Subject: Re: maven-dependency-plugin:unpack-dependencies doesn't always
>> work
>>
>> My apologies if I didnt understand your Q correctly :
>> The following works for me
>> <plugin>
>>            <artifactId>maven-dependency-plugin</artifactId>
>>            <version>2.1</version>
>>            <executions>
>>               <execution>
>>                  <id>fetch-wsdls-and-schemas</id>
>>                  <phase>generate-sources</phase>
>>                  <goals>
>>                     <goal>unpack-dependencies</goal>
>>                  </goals>
>>                  <configuration>
>>
>> <outputDirectory>${project.build.directory}/wsdls-and-schemas</outputDirect
>> ory>
>>                     <includeGroupIds>mygroupid</includeGroupIds>
>>                     <includeArtifacIds>sms-wsdlfiles</includeArtifacIds>
>>                     <excludeTransitive>true</excludeTransitive>
>>                  </configuration>
>>               </execution>
>>            </executions>
>>         </plugin>
>>
>> Also I had to give teh dependency as the project dependency ( not inside
>> the
>> plugin )
>> --sony
>>
>> On Fri, Nov 6, 2009 at 4:19 PM, Jörg Schaible <joerg.schaible@...>
>> wrote:
>>
>> > EJ Ciramella wrote:
>> >
>> > > Here's a perfect example of this _not_ working.  Anyone willing to try
>> > > this out as well?
>> >
>> > [snip]
>> >
>> > I did not try it, but junit is typically of scope "test" and that's not
>> the
>> > default for the "unpack-dependencies" goal.
>> >
>> > - Jörg
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@...
>> > For additional commands, e-mail: users-help@...
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>

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


RE: maven-dependency-plugin:unpack-dependencies doesn't always work

by EJ Ciramella-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes - I gave it everything - classifier, type and when that didn't work - scope as well - this is what I put in my original email:

         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-dependency-plugin</artifactId>
           <version>2.1</version>
           <dependencies>
              <dependency>
                  <groupId> </groupId>
                  <artifactId> </artifactId>
                  <version></version>
                  <classifier>templates</classifier>
                  <scope>provided</scope>
                  <type>zip</type>
              </dependency>
           </dependencies>
           <executions>
              <execution>
                  <id>unpack-templates</id>
                  <phase>generate-resources</phase>
                  <goals>
                      <goal>unpack-dependencies</goal>
                  </goals>
                  <configuration>
                      <overWriteReleases>false</overWriteReleases>
                      <overWriteSnapshots>true</overWriteSnapshots>
                      <includeGroupIds> </includeGroupIds>
                      <includeArtifactIds> </includeArtifactIds>
                      <classifier>templates</classifier>
                      <type>zip</type>
                      <outputDirectory>target/foo</outputDirectory>
                  </configuration>
              </execution>
           </executions>
         </plugin>

Everything is filled out, looks like the mailing list snipped out something, so it isn't a misconfiguration.  Again, two dependencies, one works, one doesn't.

Even with just classifier and type (which is the minimum we need in order to find this dependency), I saw this (taken from my earlier email):

....
[DEBUG] -- end configuration --
[INFO] [dependency:unpack-dependencies {execution: <EXECUTION ID>}]

The one dependency that it does find/extract says this:

...
[DEBUG] -- end configuration --
[INFO] [dependency:unpack-dependencies {execution: <EXECUTION ID>}] [DEBUG] Translating Artifacts using Classifier: templates and Type: zip [INFO] Unpacking <PATH TO DEPENDENCY> to <OUTPUT DIR>
   with includes null and excludes:null




-----Original Message-----
From: Sony Antony [mailto:sony.antony@...]
Sent: Friday, November 06, 2009 7:03 PM
To: Maven Users List
Subject: Re: maven-dependency-plugin:unpack-dependencies doesn't always work

did you explicitly give teh <type> for the zip artifact ?
--sony

On Fri, Nov 6, 2009 at 5:50 PM, EJ Ciramella <eciramella@...>wrote:

> Right - that's my question exactly.
>
> We (in our real env) specify two dependencies in the plugin.  One of them
> is unpacked, the other is not.
>
> The (bad) solution is to put both things in the overall project dependency
> listings.  I'm just not sure why something would skip unpacking.
>
> I think it's something with the second artifact, as I type, I tried
> swapping out our second zip with the junit jar (and it works).
>
> There is no error by the way, it just says it's unpacking, but doesn't.
>
> -----Original Message-----
> From: Sony Antony [mailto:sony.antony@...]
> Sent: Friday, November 06, 2009 4:59 PM
> To: Maven Users List; joerg.schaible@...
> Subject: Re: maven-dependency-plugin:unpack-dependencies doesn't always
> work
>
> My apologies if I didnt understand your Q correctly :
> The following works for me
> <plugin>
>            <artifactId>maven-dependency-plugin</artifactId>
>            <version>2.1</version>
>            <executions>
>               <execution>
>                  <id>fetch-wsdls-and-schemas</id>
>                  <phase>generate-sources</phase>
>                  <goals>
>                     <goal>unpack-dependencies</goal>
>                  </goals>
>                  <configuration>
>
> <outputDirectory>${project.build.directory}/wsdls-and-schemas</outputDirect
> ory>
>                     <includeGroupIds>mygroupid</includeGroupIds>
>                     <includeArtifacIds>sms-wsdlfiles</includeArtifacIds>
>                     <excludeTransitive>true</excludeTransitive>
>                  </configuration>
>               </execution>
>            </executions>
>         </plugin>
>
> Also I had to give teh dependency as the project dependency ( not inside
> the
> plugin )
> --sony
>
> On Fri, Nov 6, 2009 at 4:19 PM, Jörg Schaible <joerg.schaible@...>
> wrote:
>
> > EJ Ciramella wrote:
> >
> > > Here's a perfect example of this _not_ working.  Anyone willing to try
> > > this out as well?
> >
> > [snip]
> >
> > I did not try it, but junit is typically of scope "test" and that's not
> the
> > default for the "unpack-dependencies" goal.
> >
> > - Jörg
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@...
> > For additional commands, e-mail: users-help@...
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

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


RE: maven-dependency-plugin:unpack-dependencies doesn't always work

by EJ Ciramella-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Nope - there are no markers created.  Period.
Good thinking though!

Any other suggestions what may be wrong with this artifact?  It opens just fine in winzip.

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


Re: maven-dependency-plugin:unpack-dependencies doesn't always work

by BRIAN FOX-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I would expect an error, I can only suggest attaching a debugger to
the plugin and see what's going on.

On Mon, Nov 9, 2009 at 9:06 AM, EJ Ciramella <eciramella@...> wrote:

> Nope - there are no markers created.  Period.
> Good thinking though!
>
> Any other suggestions what may be wrong with this artifact?  It opens just fine in winzip.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

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


Re: maven-dependency-plugin:unpack-dependencies doesn't always work

by Sony Antony :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

yes it doesn't work of used more than once.
I came across it yesterday. I had two execution blocks, unpacking two
diff jars at two diff phases. only one of them was unpacked and there
was no error.
I ended working around it by chanding the second goal to copy. I then
unjar ed it using antrun.
--sony

On 11/9/09, Brian Fox <brianf@...> wrote:

> I would expect an error, I can only suggest attaching a debugger to
> the plugin and see what's going on.
>
> On Mon, Nov 9, 2009 at 9:06 AM, EJ Ciramella <eciramella@...>
> wrote:
>> Nope - there are no markers created.  Period.
>> Good thinking though!
>>
>> Any other suggestions what may be wrong with this artifact?  It opens just
>> fine in winzip.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

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


Re: maven-dependency-plugin:unpack-dependencies doesn't always work

by BRIAN FOX-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just set overWrite=true

On Mon, Nov 9, 2009 at 4:12 PM, Sony Antony <sony.antony@...> wrote:

> yes it doesn't work of used more than once.
> I came across it yesterday. I had two execution blocks, unpacking two
> diff jars at two diff phases. only one of them was unpacked and there
> was no error.
> I ended working around it by chanding the second goal to copy. I then
> unjar ed it using antrun.
> --sony
>
> On 11/9/09, Brian Fox <brianf@...> wrote:
>> I would expect an error, I can only suggest attaching a debugger to
>> the plugin and see what's going on.
>>
>> On Mon, Nov 9, 2009 at 9:06 AM, EJ Ciramella <eciramella@...>
>> wrote:
>>> Nope - there are no markers created.  Period.
>>> Good thinking though!
>>>
>>> Any other suggestions what may be wrong with this artifact?  It opens just
>>> fine in winzip.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@...
>>> For additional commands, e-mail: users-help@...
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

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