Re: List of all dependencies as text on console?

2007-07-20 Thread Patrick Forhan

I don't mean to co-opt this thread for my own purpose, but I have a
similar question:  How do I get a list of depenencies in a maven
plugin?  Is there better documentation on this?  I tried to read the
assembly and dependency plugin source, but things are not very clear.

I've tried something like the following in my Mojo... everything comes
back as a basically empty instance.

   /**
* One dependency.
*
* @parameter expression=${project.dependency}
*/
   private Dependency   dependency;

   /**
* Dependency array?.
*
* @parameter expression=${project.dependency}
*/
   private Dependency[] dependencies;

   /**
* Dep mgr.
*
* @parameter expression=${project.dependencyManagement}
*/
   private DependencyManagement dependencyMgmt;

   /**
* resources?.
*
* @parameter expression=${project.resources}
*/
   private ListResource res;


--
Defy mediocrity.

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



Re: List of all dependencies as text on console?

2007-07-20 Thread Dmitry
hey, there is a book for maven usage , try to find the link on 
maven.apache.org

thanks
Dmitry
www.ejinz.com

- Original Message - 
From: Patrick Forhan [EMAIL PROTECTED]

To: Maven Users List users@maven.apache.org
Sent: Friday, July 20, 2007 2:10 PM
Subject: Re: List of all dependencies as text on console?



I don't mean to co-opt this thread for my own purpose, but I have a
similar question:  How do I get a list of depenencies in a maven
plugin?  Is there better documentation on this?  I tried to read the
assembly and dependency plugin source, but things are not very clear.

I've tried something like the following in my Mojo... everything comes
back as a basically empty instance.

   /**
* One dependency.
*
* @parameter expression=${project.dependency}
*/
   private Dependency   dependency;

   /**
* Dependency array?.
*
* @parameter expression=${project.dependency}
*/
   private Dependency[] dependencies;

   /**
* Dep mgr.
*
* @parameter expression=${project.dependencyManagement}
*/
   private DependencyManagement dependencyMgmt;

   /**
* resources?.
*
* @parameter expression=${project.resources}
*/
   private ListResource res;


--
Defy mediocrity.

-
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]



Re: List of all dependencies as text on console?

2007-07-20 Thread Michael Meyer

Hi
if I remember rightly it should be something like this:

/**
 * @requiresDependencyResolution test
 */
public class CopyDependenciesMojo extends AbstractMojo {

/**
 * @parameter expression=${project.artifacts}
 * @required
 */
private Set artifacts;
}

The @requiresDependencyResolution is the important part.
Hope this helps.
Cheers, michael

Patrick Forhan schrieb:

I don't mean to co-opt this thread for my own purpose, but I have a
similar question:  How do I get a list of depenencies in a maven
plugin?  Is there better documentation on this?  I tried to read the
assembly and dependency plugin source, but things are not very clear.

I've tried something like the following in my Mojo... everything comes
back as a basically empty instance.

   /**
* One dependency.
*
* @parameter expression=${project.dependency}
*/
   private Dependency   dependency;

   /**
* Dependency array?.
*
* @parameter expression=${project.dependency}
*/
   private Dependency[] dependencies;

   /**
* Dep mgr.
*
* @parameter expression=${project.dependencyManagement}
*/
   private DependencyManagement dependencyMgmt;

   /**
* resources?.
*
* @parameter expression=${project.resources}
*/
   private ListResource res;





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



Re: List of all dependencies as text on console?

2007-07-20 Thread Patrick Forhan

Cool!  That gets me one big step closer.  Thanks!

Pat.

On 7/20/07, Michael Meyer [EMAIL PROTECTED] wrote:

Hi
if I remember rightly it should be something like this:

/**
  * @requiresDependencyResolution test
  */
public class CopyDependenciesMojo extends AbstractMojo {

 /**
  * @parameter expression=${project.artifacts}
  * @required
  */
 private Set artifacts;
}

The @requiresDependencyResolution is the important part.
Hope this helps.
Cheers, michael

Patrick Forhan schrieb:
 I don't mean to co-opt this thread for my own purpose, but I have a
 similar question:  How do I get a list of depenencies in a maven
 plugin?  Is there better documentation on this?  I tried to read the
 assembly and dependency plugin source, but things are not very clear.

 I've tried something like the following in my Mojo... everything comes
 back as a basically empty instance.

/**
 * One dependency.
 *
 * @parameter expression=${project.dependency}
 */
private Dependency   dependency;

/**
 * Dependency array?.
 *
 * @parameter expression=${project.dependency}
 */
private Dependency[] dependencies;

/**
 * Dep mgr.
 *
 * @parameter expression=${project.dependencyManagement}
 */
private DependencyManagement dependencyMgmt;

/**
 * resources?.
 *
 * @parameter expression=${project.resources}
 */
private ListResource res;




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





--
Defy mediocrity.

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



List of all dependencies as text on console?

2007-07-20 Thread Gisbert Amm

Hi list,

I found that I can generate a report listing all the project's 
dependencies with mvn project-info-reports:dependencies 
(http://maven.apache.org/plugins/maven-project-info-reports-plugin/plugin-info.html)


Is there a possibility to have this dependency list wirtten to the 
console instead of generating a HTML file?


-Gisbert

--
Gisbert Amm
Softwareentwickler Infrastruktur
Telefon: (0721) 91374 - 4224
Telefax: (0721) 91374 - 2740
E-Mail: [EMAIL PROTECTED]
Internet: www.1und1.de

11 Internet AG
Elgendorfer Strasse 57
56410 Montabaur

Amtsgericht Montabaur HRB 6484

Vorstand: Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger 
(Vorsitzender), Matthias Greve, Henning Ahlert, Norbert Lang, Achim 
Weiss, Robert Hoffmann,

Aufsichtsratsvorsitzender: Michael Scheeren

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



Re: List of all dependencies as text on console?

2007-07-20 Thread Michael Meyer

Hi
you can try: mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-5-SNAPSHOT:tree


Cheers, michael

http://maven.apache.org/plugins/maven-dependency-plugin/tree-mojo.html

Gisbert Amm wrote:

Hi list,

I found that I can generate a report listing all the project's 
dependencies with mvn project-info-reports:dependencies 
(http://maven.apache.org/plugins/maven-project-info-reports-plugin/plugin-info.html) 



Is there a possibility to have this dependency list wirtten to the 
console instead of generating a HTML file?


-Gisbert



--
Michael Meyer | [EMAIL PROTECTED]
phone +41-44-247 79 12 | fax +41-44-247 70 75
Netcetera AG | 8040 Zürich | Switzerland | http://netcetera.ch


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



Re: List of all dependencies as text on console?

2007-07-20 Thread Gisbert Amm

Thanks. However, it doesn't work. Am I doing something wrong?

[INFO] Failed to resolve artifact.

GroupId: org.apache.maven.plugins
ArtifactId: maven-dependency-plugin
Version: 2.0-alpha-5-SNAPSHOT

Reason: Unable to download the artifact from any repository

  org.apache.maven.plugins:maven-dependency-plugin:pom:2.0-alpha-5-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)

-Gisbert

Michael Meyer wrote:

Hi
you can try: mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-5-SNAPSHOT:tree


Cheers, michael

http://maven.apache.org/plugins/maven-dependency-plugin/tree-mojo.html

Gisbert Amm wrote:


Hi list,

I found that I can generate a report listing all the project's 
dependencies with mvn project-info-reports:dependencies 
(http://maven.apache.org/plugins/maven-project-info-reports-plugin/plugin-info.html) 



Is there a possibility to have this dependency list wirtten to the 
console instead of generating a HTML file?


-Gisbert





--
Gisbert Amm
Softwareentwickler Infrastruktur
Telefon: (0721) 91374 - 4224
Telefax: (0721) 91374 - 2740
E-Mail: [EMAIL PROTECTED]
Internet: www.1und1.de

11 Internet AG
Elgendorfer Strasse 57
56410 Montabaur

Amtsgericht Montabaur HRB 6484

Vorstand: Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger 
(Vorsitzender), Matthias Greve, Henning Ahlert, Norbert Lang, Achim 
Weiss, Robert Hoffmann,

Aufsichtsratsvorsitzender: Michael Scheeren

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



Re: List of all dependencies as text on console?

2007-07-20 Thread Michael Meyer

Hi,
try adding the following repository to your pom: 
http://people.apache.org/maven-snapshot-repository/


I just checked. It's not on repo1.maven.org

Cheers, michael

Gisbert Amm wrote:

Thanks. However, it doesn't work. Am I doing something wrong?

[INFO] Failed to resolve artifact.

GroupId: org.apache.maven.plugins
ArtifactId: maven-dependency-plugin
Version: 2.0-alpha-5-SNAPSHOT

Reason: Unable to download the artifact from any repository

  org.apache.maven.plugins:maven-dependency-plugin:pom:2.0-alpha-5-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)

-Gisbert

Michael Meyer wrote:

Hi
you can try: mvn 
org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-5-SNAPSHOT:tree 



Cheers, michael

http://maven.apache.org/plugins/maven-dependency-plugin/tree-mojo.html

Gisbert Amm wrote:


Hi list,

I found that I can generate a report listing all the project's 
dependencies with mvn project-info-reports:dependencies 
(http://maven.apache.org/plugins/maven-project-info-reports-plugin/plugin-info.html) 



Is there a possibility to have this dependency list wirtten to the 
console instead of generating a HTML file?


-Gisbert







--
Michael Meyer | [EMAIL PROTECTED]
phone +41-44-247 79 12 | fax +41-44-247 70 75
Netcetera AG | 8040 Zürich | Switzerland | http://netcetera.ch


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



Re: List of all dependencies as text on console?

2007-07-20 Thread Mark Hobson

On 20/07/07, Michael Meyer [EMAIL PROTECTED] wrote:

Hi,
try adding the following repository to your pom:
http://people.apache.org/maven-snapshot-repository/

I just checked. It's not on repo1.maven.org


Yep, 2.0-alpha-5 is not released yet, but should be shortly.  In the
meantime, you can use dependency:resolve to output the list of
dependencies for a project.  See:

http://maven.apache.org/plugins/maven-dependency-plugin/resolve-mojo.html

Mark

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



Re: List of all dependencies as text on console?

2007-07-20 Thread Gisbert Amm

Great, thank you!!!

-Gisbert

Mark Hobson wrote:

On 20/07/07, Michael Meyer [EMAIL PROTECTED] wrote:


Hi,
try adding the following repository to your pom:
http://people.apache.org/maven-snapshot-repository/

I just checked. It's not on repo1.maven.org



Yep, 2.0-alpha-5 is not released yet, but should be shortly.  In the
meantime, you can use dependency:resolve to output the list of
dependencies for a project.  See:

http://maven.apache.org/plugins/maven-dependency-plugin/resolve-mojo.html

Mark

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



--
Gisbert Amm
Softwareentwickler Infrastruktur
Telefon: (0721) 91374 - 4224
Telefax: (0721) 91374 - 2740
E-Mail: [EMAIL PROTECTED]
Internet: www.1und1.de

11 Internet AG
Elgendorfer Strasse 57
56410 Montabaur

Amtsgericht Montabaur HRB 6484

Vorstand: Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger 
(Vorsitzender), Matthias Greve, Henning Ahlert, Norbert Lang, Achim 
Weiss, Robert Hoffmann,

Aufsichtsratsvorsitzender: Michael Scheeren

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



Re: List of all dependencies as text on console?

2007-07-20 Thread Wayne Fay

If you don't mind a bit of an ugly text tree, you can also just use
mvn -X... which will provide, among other things, an ugly text tree
of your dependencies and their relationships. ;-)

But the tree provided by m-d-p is much nicer.

Wayne

On 7/20/07, Gisbert Amm [EMAIL PROTECTED] wrote:

Great, thank you!!!

-Gisbert

Mark Hobson wrote:
 On 20/07/07, Michael Meyer [EMAIL PROTECTED] wrote:

 Hi,
 try adding the following repository to your pom:
 http://people.apache.org/maven-snapshot-repository/

 I just checked. It's not on repo1.maven.org


 Yep, 2.0-alpha-5 is not released yet, but should be shortly.  In the
 meantime, you can use dependency:resolve to output the list of
 dependencies for a project.  See:

 http://maven.apache.org/plugins/maven-dependency-plugin/resolve-mojo.html

 Mark

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


--
Gisbert Amm
Softwareentwickler Infrastruktur
Telefon: (0721) 91374 - 4224
Telefax: (0721) 91374 - 2740
E-Mail: [EMAIL PROTECTED]
Internet: www.1und1.de

11 Internet AG
Elgendorfer Strasse 57
56410 Montabaur

Amtsgericht Montabaur HRB 6484

Vorstand: Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger
(Vorsitzender), Matthias Greve, Henning Ahlert, Norbert Lang, Achim
Weiss, Robert Hoffmann,
Aufsichtsratsvorsitzender: Michael Scheeren

-
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]



Re: List of all dependencies as text on console?

2007-07-20 Thread Gisbert Amm
That's very true and there are tools like grep, sed, awk and the like to 
make ugly text beautiful ,)


However, for the moment I won't re-implement the tree view of the 
maven-dependency-plugin as a shell script and rather use the plugin 
itself to get it ;)


Thanks!
-Gisbert

Wayne Fay wrote:

If you don't mind a bit of an ugly text tree, you can also just use
mvn -X... which will provide, among other things, an ugly text tree
of your dependencies and their relationships. ;-)

But the tree provided by m-d-p is much nicer.

Wayne

On 7/20/07, Gisbert Amm [EMAIL PROTECTED] wrote:


Great, thank you!!!

-Gisbert

Mark Hobson wrote:
 On 20/07/07, Michael Meyer [EMAIL PROTECTED] wrote:

 Hi,
 try adding the following repository to your pom:
 http://people.apache.org/maven-snapshot-repository/

 I just checked. It's not on repo1.maven.org


 Yep, 2.0-alpha-5 is not released yet, but should be shortly.  In the
 meantime, you can use dependency:resolve to output the list of
 dependencies for a project.  See:

 
http://maven.apache.org/plugins/maven-dependency-plugin/resolve-mojo.html


 Mark

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


--
Gisbert Amm
Softwareentwickler Infrastruktur
Telefon: (0721) 91374 - 4224
Telefax: (0721) 91374 - 2740
E-Mail: [EMAIL PROTECTED]
Internet: www.1und1.de

11 Internet AG
Elgendorfer Strasse 57
56410 Montabaur

Amtsgericht Montabaur HRB 6484

Vorstand: Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger
(Vorsitzender), Matthias Greve, Henning Ahlert, Norbert Lang, Achim
Weiss, Robert Hoffmann,
Aufsichtsratsvorsitzender: Michael Scheeren

-
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]



--
Gisbert Amm
Softwareentwickler Infrastruktur
Telefon: (0721) 91374 - 4224
Telefax: (0721) 91374 - 2740
E-Mail: [EMAIL PROTECTED]
Internet: www.1und1.de

11 Internet AG
Elgendorfer Strasse 57
56410 Montabaur

Amtsgericht Montabaur HRB 6484

Vorstand: Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger 
(Vorsitzender), Matthias Greve, Henning Ahlert, Norbert Lang, Achim 
Weiss, Robert Hoffmann,

Aufsichtsratsvorsitzender: Michael Scheeren

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