How to package final complex multi language distribution with Maven?

2007-09-18 Thread GAMBELLI Raffaele
Hi all,

we are trying to understand if we can take advantage of maven to totally 
replace our mega ANT script which produces the release of our multi language 
and multi module project.

Our project is a mix of Java and C++ code and it is a very complex system 
composed by sub systems running on different machines. 
Our final release(which is done for example each six months), is a directory 
containing other directory of jar, dll, sql script, installer of other external 
applications and other kind of resources. Some of those directory will be put 
to a machine, some other to another machine etc...

At this time, all the necessary steps to create that release are accomplished 
through an ANT script very very big, it does many many different things in one 
shot, that is, I execute the setup.xml, and after some time I obtain my maxy 
installable folder which I pass to the sysadmin who take care to copy each 
folder in the right place.

Finally, the release of my project is not only deploy a jar containing one 
hundred sub-modules jars, but it is a big assembly of many projects (some Java 
and some C++ and in early future .NET).

I took a look at the assembly plugin 
(http://maven.apache.org/plugins/maven-assembly-plugin/) but I need a tool not 
bound to a project (bound to a single pom.xml) like assembly plugin. 

In your experience, is it possibile replace that ANT script with maven?

In your projects, how do you perform the creation of the installable items?

Thanks, I hope to have benn quite understandable!

Regards,
Raffaele









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



Public remote repository

2007-09-14 Thread GAMBELLI Raffaele
Hi all,

a very simple question,

in many tutorial I read that the default public remote repository is 
http://mirrors.ibiblio.org/pub/mirrors/maven2/
But if I run in my pom, mvn help:effective-pom I see in the repository tag this 
url: http://repo1.maven.org/maven2/

I believe that those ulr, those repository are a bit different, but which sould 
be the default public remote repository? 

Thanks in advance,
Raffaele

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



RE: NoClassDeFoundError running unit test

2007-09-12 Thread GAMBELLI Raffaele
The class in project A is in src/java (I'm not using the default maven tree, 
but I have override those properties in my pom don't worry)

I tried with either test scope either compile scope in the dependency from 
project B to project A. The default scope is compile, is that true?

I've also tried mvn install but the error remains and it is practically the 
same as mvn test, that is project B cannot see a class of project A.

Thanks.
Raffaele

-Original Message-
From: Jim Sellers [mailto:[EMAIL PROTECTED]
Sent: martedì 11 settembre 2007 17.27
To: Maven Users List
Subject: Re: NoClassDeFoundError running unit test


Project B uses a class from Project A in a unit test.

Where is this class in Project A?  Is it in src/main/java or src/test/java?
If it's in src/test/java you'll have to create a test jar:
http://maven.apache.org/guides/mini/guide-attached-tests.html

What is the scope of the dependency from Project B to Project A?

Have you tried mvn install on Project A first?

With maven, code in src/test can only see the code in src/main, but not
the other way around.  With eclipse your code in src/main/java can see
src/test/java.

HTH
Jim


On 9/11/07, GAMBELLI Raffaele [EMAIL PROTECTED] wrote:

 I'm using Maven 2.0.7
 I have two project, let's call them A and B.
 A has only external dependencies.
 B has external dependencies, but is also dependent on project A.

 Project B uses a class from Project A in a unit test.

 Running either mvn test or mvn package  from the project B level
 results in a
 java.lang.NoClassDefFoundError (it can't found the class defined in
 project A) during the unit test of project B.

 But, if I run directly unit test of project B from Eclipse, the unit test
 completes successfully. Why?

 Thanks in advance, regards.
 Raffaele



 -
 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: NoClassDeFoundError running unit test

2007-09-12 Thread GAMBELLI Raffaele
My dependent class is a test class, that is, in my unit test I do a new of a 
class located in project A, it is a class which contains only static methods, 
and so, my unit tests in project B want to use those static methods to test the 
classes in project B. I believe is quite normal what I'm doing...

In eclipse, I've compiled the pom of both the project by hand, then I've also 
isntalled the m2plugin per eclipse, but I wrote the dependencies without using 
other tools.
However I haven't ever used mvn eclipse:eclipse

Any other hints?

However my projects are only very simple projects created only with the aim of 
learning and using MAVEN because in my company we would like to employ maven. 
But as you can see I immediately found a big block in my evaluetion.

Thanks to all, any other hints?
Raffaele

-Original Message-
From: Iker Almandoz [mailto:[EMAIL PROTECTED]
Sent: martedì 11 settembre 2007 17.52
To: 'Maven Users List'
Subject: RE: NoClassDeFoundError running unit test


Is your dependent class a 'test' class in project A or a 'main' class in
project A ?

In eclipse, are you importing project A or you have used 'mvn
eclipse:eclipse' to generate your dependencies?

Eclipse does not distinguish between test classpath and compile classpath so
that could be part of the issue...




-Original Message-
From: GAMBELLI Raffaele [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 11, 2007 7:26 AM
To: users@maven.apache.org
Subject: NoClassDeFoundError running unit test

I'm using Maven 2.0.7 
I have two project, let's call them A and B.
A has only external dependencies.
B has external dependencies, but is also dependent on project A.

Project B uses a class from Project A in a unit test. 

Running either mvn test or mvn package  from the project B level results
in a 
java.lang.NoClassDefFoundError (it can't found the class defined in project
A) during the unit test of project B. 

But, if I run directly unit test of project B from Eclipse, the unit test
completes successfully. Why?

Thanks in advance, regards.
Raffaele



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



NoClassDeFoundError running unit test

2007-09-11 Thread GAMBELLI Raffaele
I'm using Maven 2.0.7 
I have two project, let's call them A and B.
A has only external dependencies.
B has external dependencies, but is also dependent on project A.

Project B uses a class from Project A in a unit test. 

Running either mvn test or mvn package  from the project B level results in 
a 
java.lang.NoClassDefFoundError (it can't found the class defined in project A) 
during the unit test of project B. 

But, if I run directly unit test of project B from Eclipse, the unit test 
completes successfully. Why?

Thanks in advance, regards.
Raffaele



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