You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Peter Palmreuther <pi...@gmail.com> on 2012/09/12 08:11:29 UTC

Dependency hel(l|p)

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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Dependency hel(l|p)

Posted by Peter Palmreuther <pi...@gmail.com>.
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
<al...@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+maven@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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Dependency hel(l|p)

Posted by Aliaksei Lahachou <al...@gmail.com>.
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+maven@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-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Dependency hel(l|p)

Posted by Peter Palmreuther <pi...@gmail.com>.
Hello,

I'm sorry for any confusion, but behind the given download link
there's on the right side a block with date, file size and comment.
Below this block there's a download button. And to it works.

It would for sure have been easier to attach the archive, especially
as it's only a few K in size. But I assumed this list might block
attachments. So the next easy solution to me was to upload it
somewhere always accessible.

I can only assure I never was nor am trying to trick you to install malware.

Regards,
Peter

On Wed, Sep 12, 2012 at 8:41 AM, Anders Hammar <an...@hammar.net> wrote:
> It might just be me being an Internet idiot, but I tried downloading
> and just got downloads for some download manager or other junk. Please
> make it easy for us to help! I'm not even sure this is for real or if
> you're someone trying to trick us to install some malware.
>
> Just wasted time which I could have spent helping you,
> /Anders
>
> On Wed, Sep 12, 2012 at 8:11 AM, Peter Palmreuther
> <pi...@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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Dependency hel(l|p)

Posted by Anders Hammar <an...@hammar.net>.
It might just be me being an Internet idiot, but I tried downloading
and just got downloads for some download manager or other junk. Please
make it easy for us to help! I'm not even sure this is for real or if
you're someone trying to trick us to install some malware.

Just wasted time which I could have spent helping you,
/Anders

On Wed, Sep 12, 2012 at 8:11 AM, Peter Palmreuther
<pi...@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-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