It is this goal in the dependency plugin, but in general when working with multimodule builds, you should just do install. Other plugins can have the same problems.

Sent from my iPhone

On Sep 12, 2008, at 10:10 PM, "Build Guy" <[EMAIL PROTECTED]> wrote:

well, the whole point is that... If module A's jar is a dependency thats
needed for compilation of Module B.
I don't need to use the install goal. Module B finds the Module A jar
when building from the parent.

How ever. If I further want to do something with Module A's jar in
Module B. Like extract it using dependency unpack.
I can't, unless I 1st run install goal from Module A. But this means the release plugin won't properly work from the parent pom unless I release
Module A and B individually.

Here's what my project looks like:
-parent pom
  | - Module A (produces Jar)
  | - Module B (includes jar)

I'm wondering if this is just a limitation of the dependency plugin.. :-/

I've been struggling with this for quite some time.
Thought? thanks!

Taras

Dan Tran wrote:
> did you use install goal ?
>
> -D
>
> On Fri, Sep 12, 2008 at 6:54 PM, Build Guy <[EMAIL PROTECTED]> wrote:
>
>> Can some one please shine some light on the following scenario..
>>
>> I have parent pom and 2 modules.
>> Module A produces a jar file
>> Module B has Module A's jar as dependency, but it uses the dependency plugin
>> to unpack it.
>>
>> If I run mvn package from the parent. Module B's dependency plugin is always >> trying to take the jar from the repository, not from Module A's target
>> So my build fails with [INFO] Unable to find artifact.
>>
>> I always have to run mvn install on Module A before using Module B. Quite
>> tedious..
>> And I do have the jar listed in Module B as a dependency and then again in
>> he plugin like so:
>>
>> <dependency>
>>  <groupId>foo.bar</groupId>
>>  <artifactId>myjar</artifactId>
>>  <version>1.0.0-SNAPSHOT</version>
>>  <type>jar</type>
>>  <scope>compile</scope>
>> </dependency>
>>
>> <plugin>
>>  <groupId>org.apache.maven.plugins</groupId>
>>  <artifactId>maven-dependency-plugin</artifactId>
>>  <version>2.0</version>
>>  <executions>
>>      <execution>
>>          <id>getjar</id>
>>          <phase>generate-sources</phase>
>>          <goals>
>>              <goal>unpack</goal>
>>          </goals>
>>          <configuration>
>>              <artifactItems>
>>                  <artifactItem>
>>                          <groupId>foo.bar</groupId>
>>                          <artifactId>myjar</artifactId>
>>                          <type>jar</type>
>>                      <overWrite>true</overWrite>
>>                      <outputDirectory>
>>                          target/tmp
>>                      </outputDirectory>
>>                  </artifactItem>
>>              </artifactItems>
>>              <overWriteReleases>true</overWriteReleases>
>>              <overWriteSnapshots>true</overWriteSnapshots>
>>          </configuration>
>>      </execution>
>>  </executions>
>> </plugin>
>>
>> Any thoughts?
>> Thanks!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to