Re: Maven cyclic dependency when compling tests only - how to resolve easily?

2012-06-08 Thread Ken E
That might work.

Where do I put the second pom.xml for the tests then?

The directory structure is like this:

/main-project/pom.xml (contains all modules: moduleA -> moduleX)
/main-project/moduleA/pom.xml
/main-project/moduleA/src
/main-project/moduleA/test/src


So I put another pom.xml in /main-project/moduleA/test?

Ken


On Sat, Jun 9, 2012 at 1:16 AM, Manfred Moser  wrote:

> Pull the test code out into a separate module that makes everything
> available you need in there.. and run the test there.
>
> manfred
> http://simpligility.com
>
> On Fri, June 8, 2012 9:32 pm, Ken E wrote:
> > I am working on modernizing an older project to be used with Maven. The
> > project is very large and has around 30 modules in it.
> >
> > As far as the main source code is concerned, I managed to get all of it
> to
> > compile and establish the dependencies correctly. It actually works and
> it
> > can be run through Maven's tomcat plugin.
> >
> > The problem is with compiling the tests.
> >
> > Unfortunately, this company did not apply the same dependency
> restrictions
> > for their test code as they did with their main source code.
> >
> > For example, C depends on B, and B depends on A in the main source code.
> > However, A depends on C to run its tests. Obviously, Maven is going to
> > complain and say there is a cyclic dependency.
> >
> > Besides out-right fixing the code (which is sadly not going to happen on
> > this project - it's tens of millions of lines), is there any way to tell
> > Maven, "Please compile ALL of the main source code first, then compile
> ALL
> > of the test code afterward" ? Or is there any other solution around this
> > problem?
> >
> > Many Thanks,
> > Ken
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Maven cyclic dependency when compling tests only - how to resolve easily?

2012-06-08 Thread Manfred Moser
Pull the test code out into a separate module that makes everything
available you need in there.. and run the test there.

manfred
http://simpligility.com

On Fri, June 8, 2012 9:32 pm, Ken E wrote:
> I am working on modernizing an older project to be used with Maven. The
> project is very large and has around 30 modules in it.
>
> As far as the main source code is concerned, I managed to get all of it to
> compile and establish the dependencies correctly. It actually works and it
> can be run through Maven's tomcat plugin.
>
> The problem is with compiling the tests.
>
> Unfortunately, this company did not apply the same dependency restrictions
> for their test code as they did with their main source code.
>
> For example, C depends on B, and B depends on A in the main source code.
> However, A depends on C to run its tests. Obviously, Maven is going to
> complain and say there is a cyclic dependency.
>
> Besides out-right fixing the code (which is sadly not going to happen on
> this project - it's tens of millions of lines), is there any way to tell
> Maven, "Please compile ALL of the main source code first, then compile ALL
> of the test code afterward" ? Or is there any other solution around this
> problem?
>
> Many Thanks,
> Ken
>


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



Maven cyclic dependency when compling tests only - how to resolve easily?

2012-06-08 Thread Ken E
I am working on modernizing an older project to be used with Maven. The
project is very large and has around 30 modules in it.

As far as the main source code is concerned, I managed to get all of it to
compile and establish the dependencies correctly. It actually works and it
can be run through Maven's tomcat plugin.

The problem is with compiling the tests.

Unfortunately, this company did not apply the same dependency restrictions
for their test code as they did with their main source code.

For example, C depends on B, and B depends on A in the main source code.
However, A depends on C to run its tests. Obviously, Maven is going to
complain and say there is a cyclic dependency.

Besides out-right fixing the code (which is sadly not going to happen on
this project - it's tens of millions of lines), is there any way to tell
Maven, "Please compile ALL of the main source code first, then compile ALL
of the test code afterward" ? Or is there any other solution around this
problem?

Many Thanks,
Ken


Re: plugin for JPA entity generation?

2012-06-08 Thread Dan Tran
give it a try since it may create a pure JPA2 entities ( no hibernate )

After that you can use with eclipse link

-D



On Fri, Jun 8, 2012 at 3:33 PM, J.V.  wrote:
> I can try this, but we are using EclipseLink and not hibernate, so
> preferably would like an independent tool.
>
> thanks
>
> J.V.
>
>
> On 6/8/2012 2:23 PM, Dan Tran wrote:
>>
>> hibernate3-maven-plugin?
>>
>> -D
>>
>> On Fri, Jun 8, 2012 at 1:18 PM, J.V.  wrote:
>>>
>>> Is anyone aware of a Maven or Ant or Gradle plugin that has a way to
>>> configure to accept a connection to a database and generate JPA entities
>>> from the DB?
>>>
>>> The solution would map the database types correctly (and would work
>>> across
>>> all DB's including Oracle, MySQL, PostgreSQL&  SQL Server), and also
>>>
>>> configure the relationships inside each entity correctly (many to one/one
>>> to
>>> many/many to many).
>>>
>>> thanks
>>>
>>>
>>> J.V.
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>> For additional commands, e-mail: users-h...@maven.apache.org
>>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>

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



Re: plugin for JPA entity generation?

2012-06-08 Thread James Carman
Never mind then  :)
On Jun 8, 2012 7:32 PM, "J.V."  wrote:

> We have three databases and 300+ tables.
>
> J.V.
>
> On 6/8/2012 4:57 PM, James Carman wrote:
>
>> How many tables are you going to reverse engineer?  If it's not very
>> many, I'd say you'd be better off just modeling your data yourself and
>> mapping it using the annotations or the XML.
>>
>> On Fri, Jun 8, 2012 at 6:34 PM, J.V.  wrote:
>>
>>> I may look at omondo, we are using IntelliJ with EclipseLink for the JPA
>>> provider.
>>>
>>> J.V.
>>>
>>>
>>> On 6/8/2012 2:26 PM, Belhadj abdessalem wrote:
>>>
 Eclipse can do this easly for you otherwise we have omondo for
 generation
 entity bean
 Le 8 juin 2012 22:18, "J.V."a écrit :

  Is anyone aware of a Maven or Ant or Gradle plugin that has a way to
> configure to accept a connection to a database and generate JPA
> entities
> from the DB?
>
> The solution would map the database types correctly (and would work
> across
> all DB's including Oracle, MySQL, PostgreSQL&SQL Server), and also
>
> configure the relationships inside each entity correctly (many to
> one/one
> to many/many to many).
>
> thanks
>
>
> J.V.
>
> --**
> --**-
> To unsubscribe, e-mail:
> users-unsubscribe@maven.**apac**he.org <
> users-unsubscribe@**maven.apache.org
> >
> For additional commands, e-mail: users-h...@maven.apache.org
>
>
>  --**--**
>>> -
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@maven.**apache.org
>>>
>>> For additional commands, e-mail: users-h...@maven.apache.org
>>>
>>>  --**--**
>> -
>> To unsubscribe, e-mail: 
>> users-unsubscribe@maven.**apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@maven.**apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: plugin for JPA entity generation?

2012-06-08 Thread J.V.

We have three databases and 300+ tables.

J.V.

On 6/8/2012 4:57 PM, James Carman wrote:

How many tables are you going to reverse engineer?  If it's not very
many, I'd say you'd be better off just modeling your data yourself and
mapping it using the annotations or the XML.

On Fri, Jun 8, 2012 at 6:34 PM, J.V.  wrote:

I may look at omondo, we are using IntelliJ with EclipseLink for the JPA
provider.

J.V.


On 6/8/2012 2:26 PM, Belhadj abdessalem wrote:

Eclipse can do this easly for you otherwise we have omondo for generation
entity bean
Le 8 juin 2012 22:18, "J.V."a écrit :


Is anyone aware of a Maven or Ant or Gradle plugin that has a way to
configure to accept a connection to a database and generate JPA entities
from the DB?

The solution would map the database types correctly (and would work
across
all DB's including Oracle, MySQL, PostgreSQL&SQL Server), and also

configure the relationships inside each entity correctly (many to one/one
to many/many to many).

thanks


J.V.

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



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org

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


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




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



Re: plugin for JPA entity generation?

2012-06-08 Thread James Carman
How many tables are you going to reverse engineer?  If it's not very
many, I'd say you'd be better off just modeling your data yourself and
mapping it using the annotations or the XML.

On Fri, Jun 8, 2012 at 6:34 PM, J.V.  wrote:
> I may look at omondo, we are using IntelliJ with EclipseLink for the JPA
> provider.
>
> J.V.
>
>
> On 6/8/2012 2:26 PM, Belhadj abdessalem wrote:
>>
>> Eclipse can do this easly for you otherwise we have omondo for generation
>> entity bean
>> Le 8 juin 2012 22:18, "J.V."  a écrit :
>>
>>> Is anyone aware of a Maven or Ant or Gradle plugin that has a way to
>>> configure to accept a connection to a database and generate JPA entities
>>> from the DB?
>>>
>>> The solution would map the database types correctly (and would work
>>> across
>>> all DB's including Oracle, MySQL, PostgreSQL&  SQL Server), and also
>>>
>>> configure the relationships inside each entity correctly (many to one/one
>>> to many/many to many).
>>>
>>> thanks
>>>
>>>
>>> J.V.
>>>
>>> --**--**-
>>> To unsubscribe, e-mail:
>>> users-unsubscribe@maven.**apache.org
>>> For additional commands, e-mail: users-h...@maven.apache.org
>>>
>>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>
> For additional commands, e-mail: users-h...@maven.apache.org
>

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



Re: plugin for JPA entity generation?

2012-06-08 Thread J.V.
I may look at omondo, we are using IntelliJ with EclipseLink for the JPA 
provider.


J.V.

On 6/8/2012 2:26 PM, Belhadj abdessalem wrote:

Eclipse can do this easly for you otherwise we have omondo for generation
entity bean
Le 8 juin 2012 22:18, "J.V."  a écrit :


Is anyone aware of a Maven or Ant or Gradle plugin that has a way to
configure to accept a connection to a database and generate JPA entities
from the DB?

The solution would map the database types correctly (and would work across
all DB's including Oracle, MySQL, PostgreSQL&  SQL Server), and also
configure the relationships inside each entity correctly (many to one/one
to many/many to many).

thanks


J.V.

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




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



Re: plugin for JPA entity generation?

2012-06-08 Thread J.V.
I can try this, but we are using EclipseLink and not hibernate, so 
preferably would like an independent tool.


thanks

J.V.

On 6/8/2012 2:23 PM, Dan Tran wrote:

hibernate3-maven-plugin?

-D

On Fri, Jun 8, 2012 at 1:18 PM, J.V.  wrote:

Is anyone aware of a Maven or Ant or Gradle plugin that has a way to
configure to accept a connection to a database and generate JPA entities
from the DB?

The solution would map the database types correctly (and would work across
all DB's including Oracle, MySQL, PostgreSQL&  SQL Server), and also
configure the relationships inside each entity correctly (many to one/one to
many/many to many).

thanks


J.V.

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


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




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



Hooking before and after a phase

2012-06-08 Thread Pascal Rapicault
Hi, 

I have a situation where I need to execute a mojo just before the execution of 
the mojo bound to the phase. Is there a way to achieve this without binding my 
mojo to the previous phase but to the phase that I'm interested in?

For example, the "eclipse-plugin" packaging type has the following phases:
- […]
- process-test-resources
- package (which itself executes 2 mojos)
- […]

I would like to execute a mojo just before the first mojo of the package phase 
is executed, or even better in between the execution of the two mojos executed 
by the package phase.

I could hook my mojo to the process-test-resources but I feel that this is 
incorrect since the execution of my mojo should only happen if the package 
phase does, otherwise it may screw up following builds.

Thanks.

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



Re: plugin for JPA entity generation?

2012-06-08 Thread Belhadj abdessalem
Eclipse can do this easly for you otherwise we have omondo for generation
entity bean
Le 8 juin 2012 22:18, "J.V."  a écrit :

> Is anyone aware of a Maven or Ant or Gradle plugin that has a way to
> configure to accept a connection to a database and generate JPA entities
> from the DB?
>
> The solution would map the database types correctly (and would work across
> all DB's including Oracle, MySQL, PostgreSQL & SQL Server), and also
> configure the relationships inside each entity correctly (many to one/one
> to many/many to many).
>
> thanks
>
>
> J.V.
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@maven.**apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: plugin for JPA entity generation?

2012-06-08 Thread Dan Tran
hibernate3-maven-plugin?

-D

On Fri, Jun 8, 2012 at 1:18 PM, J.V.  wrote:
> Is anyone aware of a Maven or Ant or Gradle plugin that has a way to
> configure to accept a connection to a database and generate JPA entities
> from the DB?
>
> The solution would map the database types correctly (and would work across
> all DB's including Oracle, MySQL, PostgreSQL & SQL Server), and also
> configure the relationships inside each entity correctly (many to one/one to
> many/many to many).
>
> thanks
>
>
> J.V.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>

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



plugin for JPA entity generation?

2012-06-08 Thread J.V.
Is anyone aware of a Maven or Ant or Gradle plugin that has a way to 
configure to accept a connection to a database and generate JPA entities 
from the DB?


The solution would map the database types correctly (and would work 
across all DB's including Oracle, MySQL, PostgreSQL & SQL Server), and 
also configure the relationships inside each entity correctly (many to 
one/one to many/many to many).


thanks


J.V.

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



Re: newbie example for maven

2012-06-08 Thread Yaprak Ayazoglu
Thank you for the reply.

Sent from my iPhone

On 7 Jun 2012, at 20:39, Martin Gainty  wrote:

> 
> anders was right..setting M2_HOME to the maven deploy folder solved the 
> problem cwd $M2_HOME/bootls *.jar
> plexus-classworlds-2.4.jar Cordialement..
> Martin 
> __ 
> 
> 
>> Date: Thu, 7 Jun 2012 11:16:47 +0200
>> Subject: Re: newbie example for maven
>> From: mhm.s...@gmail.com
>> To: users@maven.apache.org
>> 
>> It seems a Maven configuration problem, if you are working with Windows,
>> can you make : c> maven -version pour ensure thant maven is well installed
>> 
>> 2012/6/7 abhijith tn 
>> 
>>> Ensure you set the bin of Maven installation in classpath. Just google,
>>> setting classpath of maven.
>>> 
>>> I think this should resolve the problem.
>>> 
>>> On Thu, Jun 7, 2012 at 10:27 AM, Anders Hammar  wrote:
>>> 
 Have you defined the M2_HOME env variable?
 
 /Anders
 
 On Thu, Jun 7, 2012 at 9:56 AM, Yaprak Ayazoglu
  wrote:
> Hi,
> 
> I'm trying to understand whether maven works or not.
> 
> Depending on the lines below maven seems not working at all. How can I
 fix
> this
> problem? Can you help?
> 
> ya@yaprak:~$ mvn
> Error: Could not find or load main class
 org.codehaus.classworlds.Launcher
> 
> 
> --
> Yaprak
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
 
>>> 
>> 
>> 
>> 
>> -- 
>> 
>> 
>> Cordialement
>> 
>> Mohamed
> 

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



How to use PluginContext() method of AbstractMojo or ContextEnabled for custom Mojos?

2012-06-08 Thread Tonté Pouncil
Hello, 

I am trying to get two custom Mojos that I have created to communicate with 
each other.  Mojo1 creates an object that I want to be available when Mojo2 
executes.  How do I do this?

I've been trying to use 
org.apache.maven.plugin.AbstractMojo#set/getPluginContext() method and 
org.apache.mavin.plugin.ContextEnabled.  But so far the context is null.

Thank you.

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