You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Pin Ngee Koh <ko...@gmail.com> on 2006/08/16 00:04:52 UTC

Jar Dependency Graphical View

Is there a good tool to generate dependency graph and
view it graphically?

I am sure this question has been asked. Pardon me.
If there is a good way to search through the archive, do let me know.
Thanks

Pin Koh

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


Re: Jar Dependency Graphical View

Posted by Nick Veys <ps...@gmail.com>.
On 8/15/06, Pin Ngee Koh <ko...@gmail.com> wrote:
> Is there a good tool to generate dependency graph and
> view it graphically?

The Dependencies report gives you a tree view of all dependencies of a
project, it's not an image but it is a dep graph.

> I am sure this question has been asked. Pardon me.
> If there is a good way to search through the archive, do let me know.
> Thanks

http://www.nabble.com/Maven---Users-f178.html

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


Re: running unit tests for pom packaged project

Posted by Barrie Treloar <ba...@gmail.com>.
On 8/17/06, Nick Veys <ps...@gmail.com> wrote:
> On 8/16/06, Denis McCarthy <dm...@annadaletech.com> wrote:
> >
> > Hi,
> > One of my projects depends on a second project. As a result, I've
> > defined the first project as being packaged as a pom, with an associated
> > dependency in the second package. However, when I run 'mvn test' on the
> > pom packaged project no tests are run (which I think is normal for
> > pom-packaged projects with no modules). What should I do to run tests
> > for a pom packaged project - do I really require a module? Indeed, am I
> > approaching maven intra-project dependency management skew-ways?
> > TIA
> > Denis
>
> What about the project depends on the previous project?  If it's just
> a code dependency then you shouldn't use it as a parent POM.  If there
> are common project attributes to the two projects, then make a
> separate parent-pom with those attributes, and have both extend it.

As Nick says these should both be packaged as jars with one module
depending on the other module.

A module is just a convenient way to run a single maven command across
conceptually related projects. To achive this you must follow the
maven standard project structure of
root
- pom.xml
- module1
  - pom.xml
- module2
  - pom.xml

Where the root pom defines the modules.

However defining a module does not introduce any dependencies between
the projects.
Thus you must define the dependencies for each project (a module is
just a project too).

Remember maven does not depend upon source, it depends upon installed
artifacts in the repository.  So if module2 depends upon module1, you
must run mvn install in the module1 directory before you can run mvn
install in the module2 directory. Alternatively, as a convenience, if
you have set up your project as modules you can run mvn install at the
root directory and maven will build your projects in the order as
defined in the module list, saving you the need to run the install
command twice.

Hope that helps.

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


Re: running unit tests for pom packaged project

Posted by Nick Veys <ps...@gmail.com>.
On 8/16/06, Denis McCarthy <dm...@annadaletech.com> wrote:
>
> Hi,
> One of my projects depends on a second project. As a result, I've
> defined the first project as being packaged as a pom, with an associated
> dependency in the second package. However, when I run 'mvn test' on the
> pom packaged project no tests are run (which I think is normal for
> pom-packaged projects with no modules). What should I do to run tests
> for a pom packaged project - do I really require a module? Indeed, am I
> approaching maven intra-project dependency management skew-ways?
> TIA
> Denis

What about the project depends on the previous project?  If it's just
a code dependency then you shouldn't use it as a parent POM.  If there
are common project attributes to the two projects, then make a
separate parent-pom with those attributes, and have both extend it.

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


Re: running unit tests for pom packaged project

Posted by Denis McCarthy <dm...@annadaletech.com>.
Thanks for the help all who replied. I've just finished putting the 
modules in question under a single folder with a parent pom and I can 
see that it will work much better than my previous structure. I've got 
three seperate eclipse projects, one for each module. I don't have the 
parent folder defined as a project. Is this correct, or is there any 
advantage to having the parent folder defined as a project?
Thanks again
Denis

Barrie Treloar wrote:
>> these applications are separate projects in eclipse. I'm worried that if
>> I combine them into a maven-ized single project with modules, I will no
>> longer be able to deploy them as individual web applications within
>> eclipse (using eclipse web tools project web server - tomcat in this
>> instance).
>>
>> AFAIK eclipse WTP expects only a single web app within a project - has
>> anyone encountered this scenario before, and if so, have they found a
>> feasible solution that allows eclipse WTP and maven (with multiple web
>> apps as modules) to coexist?
> 
> There isn't a problem using Eclipse 3.1, I use it.
> It's slightly annoying, but you just have to check out at the module
> directory rather than the project root directory.
> 
> With Eclipse 3.2 you can have projects that reside within another
> projects directory space.
> I believe they are called hierarchical projects.
> See http://www.nabble.com/forum/ViewPost.jtp?post=5849132&framed=y
> 
> ---------------------------------------------------------------------
> 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


Re: running unit tests for pom packaged project

Posted by Barrie Treloar <ba...@gmail.com>.
> these applications are separate projects in eclipse. I'm worried that if
> I combine them into a maven-ized single project with modules, I will no
> longer be able to deploy them as individual web applications within
> eclipse (using eclipse web tools project web server - tomcat in this
> instance).
>
> AFAIK eclipse WTP expects only a single web app within a project - has
> anyone encountered this scenario before, and if so, have they found a
> feasible solution that allows eclipse WTP and maven (with multiple web
> apps as modules) to coexist?

There isn't a problem using Eclipse 3.1, I use it.
It's slightly annoying, but you just have to check out at the module
directory rather than the project root directory.

With Eclipse 3.2 you can have projects that reside within another
projects directory space.
I believe they are called hierarchical projects.
See http://www.nabble.com/forum/ViewPost.jtp?post=5849132&framed=y

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


Re: running unit tests for pom packaged project

Posted by Denis McCarthy <dm...@annadaletech.com>.
Thanks for that information guys - I understand how things should be set 
up now. Unfortunately, I have a slight problem regarding a clash between 
mavens modules and eclipse (I realise eclipse's inner workings are 
slightly off topic, but I'm sure many on this list know more about it 
than I do).

My project actually consists of three modules, one basic business rules 
module, and two web applications that utilize the business rules (I said 
it had two initially just to focus on the problem at hand). Currently 
these applications are separate projects in eclipse. I'm worried that if 
I combine them into a maven-ized single project with modules, I will no 
longer be able to deploy them as individual web applications within 
eclipse (using eclipse web tools project web server - tomcat in this 
instance).

AFAIK eclipse WTP expects only a single web app within a project - has 
anyone encountered this scenario before, and if so, have they found a 
feasible solution that allows eclipse WTP and maven (with multiple web 
apps as modules) to coexist?

Thanks again for your help
Denis

Stefan Magnus Landrø wrote:
>> Are you basically 
>> saying that a parent project needs to have modules to allow unit tests 
>> to be run?
> 
> Yes, and actually modules are just a way of simplyfying a complex build.
> 
> Stefan

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


Re: Re: running unit tests for pom packaged project

Posted by Stefan Magnus Landrø <st...@gjensidige.no>.
> Are you basically 
> saying that a parent project needs to have modules to allow unit tests 
> to be run?

Yes, and actually modules are just a way of simplyfying a complex build.

Stefan

Re: running unit tests for pom packaged project

Posted by Denis McCarthy <dm...@annadaletech.com>.
Sorry, I don't understand Stefan. The parent project is not defined 
strictly as a dependency, it is defined as both a parent and a 
dependency (I had to define it as a dependency as I was getting 
classpath errors running unit tests for the child project when it was 
only defined as a parent). I would have thought that the fact that it is 
defined as a parent would allow me some way to run the unit tests for 
the parent - as the parent is a pom packaged project, I can't run the 
tests using mvn test from the home directory of the parent project (I 
get a 'No goals needed for project - skipping' error). Are you basically 
saying that a parent project needs to have modules to allow unit tests 
to be run?
Thanks
Denis

Stefan Magnus Landrø wrote:
> Hi there,
> 
> As far as I know, you have to use modules to achieve this.
> 
> Just as an example - do you really want to run apache axis tests when you 
> include axis as a dependency?
> 
> Stefan
> 
> Denis McCarthy <dm...@annadaletech.com> skrev 16.08.2006 16:52:59:
> 
>> Hi,
>> One of my projects depends on a second project. As a result, I've 
>> defined the first project as being packaged as a pom, with an associated 
> 
>> dependency in the second package. However, when I run 'mvn test' on the 
>> pom packaged project no tests are run (which I think is normal for 
>> pom-packaged projects with no modules). What should I do to run tests 
>> for a pom packaged project - do I really require a module? Indeed, am I 
>> approaching maven intra-project dependency management skew-ways?
>> TIA
>> Denis
>>
>> ---------------------------------------------------------------------
>> 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


Re: running unit tests for pom packaged project

Posted by Stefan Magnus Landrø <st...@gjensidige.no>.
Hi there,

As far as I know, you have to use modules to achieve this.

Just as an example - do you really want to run apache axis tests when you 
include axis as a dependency?

Stefan

Denis McCarthy <dm...@annadaletech.com> skrev 16.08.2006 16:52:59:

> 
> Hi,
> One of my projects depends on a second project. As a result, I've 
> defined the first project as being packaged as a pom, with an associated 

> dependency in the second package. However, when I run 'mvn test' on the 
> pom packaged project no tests are run (which I think is normal for 
> pom-packaged projects with no modules). What should I do to run tests 
> for a pom packaged project - do I really require a module? Indeed, am I 
> approaching maven intra-project dependency management skew-ways?
> TIA
> Denis
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

running unit tests for pom packaged project

Posted by Denis McCarthy <dm...@annadaletech.com>.
Hi,
One of my projects depends on a second project. As a result, I've 
defined the first project as being packaged as a pom, with an associated 
dependency in the second package. However, when I run 'mvn test' on the 
pom packaged project no tests are run (which I think is normal for 
pom-packaged projects with no modules). What should I do to run tests 
for a pom packaged project - do I really require a module? Indeed, am I 
approaching maven intra-project dependency management skew-ways?
TIA
Denis

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


RE: Jar Dependency Graphical View

Posted by Maruf Aytekin <ma...@aspone.co.uk>.
Yes, DependencyFinder is very good. I have used it

Maruf


-----Original Message-----
From: Pin Ngee Koh [mailto:kohpinngee@gmail.com] 
Sent: Wednesday, August 16, 2006 1:05 AM
To: users@maven.apache.org
Subject: Jar Dependency Graphical View

Is there a good tool to generate dependency graph and
view it graphically?

I am sure this question has been asked. Pardon me.
If there is a good way to search through the archive, do let me know.
Thanks

Pin Koh

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