Hi,

thanks for your response.

In fact I just tried 'mvn compile dependency:tree' and it works. Strange.

But than: is there something wrong with my project dependencies or
with 'maven-dependency-plugin' and 'maven-source-plugin' if their
goals 'tree' (or 'list) and 'aggregate' only work when executed in
combination with phase 'compile' or 'package'?

I stumbled upon this problem when I tried to set up a
'source:aggregate' being executed in my master project on every
'install'. The goal was to be able to 'mvn install' and end up with
aggregated sources for the reactor project being available.

If as a workaround instead of 'mvn install' I can do 'mvn package
install' and have 'source:aggregate' executed automatically I'm fine
for now. But I assume this is not primarily "the maven way". Nor do I
see the point in doing 'mvn compile dependency:tree' if only I want to
see all the dependencies (or generate some graphics from it's output).

So any other comments or hints about what's going (wr)on(g)?

Best regards,

Peter

On Wed, Sep 12, 2012 at 3:47 PM, Aliaksei Lahachou
<aliaksei.lahac...@gmail.com> wrote:
> Hi,
>
> I've seen this problem. It seems that Maven knows about artifacts from
> dependencies only if they were built in the same run. So for example 'mvn
> package cargo:deploy' works, because all artifacts were packaged in the
> same run, but 'mvn cargo:deploy' doesn't work until artifacts are
> installed, even if you ran 'mvn package' before.
>
>
> Regards,
> htfv (Aliaksei Lahachou)
>
>
> On Wed, Sep 12, 2012 at 8:11 AM, Peter Palmreuther <
> pit.palme+ma...@gmail.com> wrote:
>
>> Hi,
>>
>> I hope somebody on this list can help me with - or knows a location to
>> find help for - a dependency problem.
>>
>> I have a bunch of projects:
>>
>> +master
>>   + plain
>>     - java-lib
>>     - bind-one
>>     - bind-two
>>   + jee
>>     - ejb
>>     - ear
>>
>> '+' are 'pom', i.e. reactor-, projects, '-' are 'jar', 'ejb' and 'ear'
>> projects.
>> 'ejb' depends on all 'plain' projects (provided), so does 'ear' (runtime).
>> 'bind-two' depends on 'java-lib' (currently provided, tried compile,
>> but makes no difference).
>>
>> I'm able to 'mvn package' and 'mvn install' without any hassle.
>> But 'mvn dependency:tree' or 'mvn source:aggregate' fails, unless I
>> had successfully run 'mvn install' for the current version before.
>>
>> What's wrong here? Are my dependencies creepy, or is there something
>> going wrong in dependency and source plugin?
>>
>> For those interested in inspecting this (and pointing me towards my
>> probably obvious mistake by banging my head onto it) I've created a
>> minimal example I'm capable to reproduce this behavior with:
>>
>> http://www.file-upload.net/download-4778941/maven_dep_example.zip.html
>>
>> Thanks in advance,
>> and best regards,
>>
>> Peter

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

Reply via email to