You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by CemKoc <ce...@gmail.com> on 2009/04/08 12:06:29 UTC

Ear plugin & EJB module

Hi all,

We have a project consisting an ear, a web module and a ejb module. 

Project POM
|
|----EJB POM
|
|----WAR POM
|
|----EAR POM 


We are calling "mvn clean package" statement for 'Project POM'. I noticed that EAR plugin try to fetch modules from different folders.

For, War project it is trying to get WAR POM project. (This is expected behaviour.)
However for, EJB project it is trying to get from Local Repository. And because of that I have to replace my command like that "mvn clean install". 

Is this true? That is to say; Is it expected behaviour? To me, calling package lifecycle should be enough to generate an ear. 

Thanks

 
 
-- 
View this message in context: http://n2.nabble.com/Ear-plugin---EJB-module-tp2604318p2604318.html
Sent from the maven users mailing list archive at Nabble.com.


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


Re: Ear plugin & EJB module

Posted by CemKoc <ce...@gmail.com>.
Thanks for clear explanation.

I have updated my maven to 2.1.0 a few minutes ago. (I was using 2.0.9)

Now,

I have tried it again, and result is same. It tries to fetch from local repository.

I will submit a bug in JIRA tonight.

Thank you




It depends. Maven is supposed to provide that based of your environment. If
you're running a reactor project, it will fetch the build from the target
directory of the module. If you're relying on an external dependency, it
will first resolve it and provide a link to your local repository.


>
> 2 - In this scenario, without installing to a local repository and ejb
> project we can not produce an ear file. Is it normal?


No it's not. But I vaguely remember that there were some limitations with
some module types. If you can reproduce with the latest 2.0.x Maven release,
file a bug please.

Thanks,
Stéphane




-- 
View this message in context: http://n2.nabble.com/Ear-plugin---EJB-module-tp2604318p2604842.html
Sent from the maven users mailing list archive at Nabble.com.


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


Re: Ear plugin & EJB module

Posted by Stephane Nicoll <st...@gmail.com>.
On Wed, Apr 8, 2009 at 1:28 PM, CemKoc
<ce...@gmail.com>
> wrote:

>
> Hi Stephane,
>
> I have some questions for you.
>
> 1 - Why are the default locations of war and ejb projects.


It depends. Maven is supposed to provide that based of your environment. If
you're running a reactor project, it will fetch the build from the target
directory of the module. If you're relying on an external dependency, it
will first resolve it and provide a link to your local repository.


>
> 2 - In this scenario, without installing to a local repository and ejb
> project we can not produce an ear file. Is it normal?


No it's not. But I vaguely remember that there were some limitations with
some module types. If you can reproduce with the latest 2.0.x Maven release,
file a bug please.

Thanks,
Stéphane


>  --
> View this message in context:
> http://n2.nabble.com/Ear-plugin---EJB-module-tp2604318p2604674.html
> Sent from the maven users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Large Systems Suck: This rule is 100% transitive. If you build one, you
suck" -- S.Yegge

Re: Ear plugin & EJB module

Posted by CemKoc <ce...@gmail.com>.
I mean 

1 - What are the default locations of war and ejb projects.

Sorry for typo 

Thanks 


Hi Stephane, 

I have some questions for you.

1 - Why are the default locations of war and ejb projects.

2 - In this scenario, without installing to a local repository and ejb project we can not produce an ear file. Is it normal? 

Thanks 


The ear plugin just uses the standard maven API. It relies on the Artifact
interface that should return the location of the file (target of the module,
local repository, etc).

I don't see much trouble here but if you can confirm this scenario with EJB
modules only, just file an issue with a projet that reproduce the problem.

HTH,
Stéphane





-- 
View this message in context: http://n2.nabble.com/Ear-plugin---EJB-module-tp2604318p2604679.html
Sent from the maven users mailing list archive at Nabble.com.


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


Re: Ear plugin & EJB module

Posted by CemKoc <ce...@gmail.com>.
Hi Stephane, 

I have some questions for you.

1 - Why are the default locations of war and ejb projects.

2 - In this scenario, without installing to a local repository and ejb project we can not produce an ear file. Is it normal? 

Thanks 


The ear plugin just uses the standard maven API. It relies on the Artifact
interface that should return the location of the file (target of the module,
local repository, etc).

I don't see much trouble here but if you can confirm this scenario with EJB
modules only, just file an issue with a projet that reproduce the problem.

HTH,
Stéphane



-- 
View this message in context: http://n2.nabble.com/Ear-plugin---EJB-module-tp2604318p2604674.html
Sent from the maven users mailing list archive at Nabble.com.


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


Re: Ear plugin & EJB module

Posted by Stephane Nicoll <st...@gmail.com>.
The ear plugin just uses the standard maven API. It relies on the Artifact
interface that should return the location of the file (target of the module,
local repository, etc).

I don't see much trouble here but if you can confirm this scenario with EJB
modules only, just file an issue with a projet that reproduce the problem.

HTH,
Stéphane

On Wed, Apr 8, 2009 at 12:33 PM, CemKoc
<ce...@gmail.com>
> wrote:

>
> I have checked source of ear plugin in limited time, I noticed in EarMojo
> class:
>
> public void execute()
>
>
> final File sourceFile = module.getArtifact().getFile();
> final File destinationFile = buildDestinationFile( getWorkDirectory(),
> module.getUri() );
> ...
> ...
> ...
> unpack( sourceFile, destinationFile );
>
> -----------------------------
>
> What is getFile() method returning? It seems that our configuration is a
> little bid buggy.
>
> Thanks
> --
> View this message in context:
> http://n2.nabble.com/Ear-plugin---EJB-module-tp2604318p2604407.html
> Sent from the maven users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Large Systems Suck: This rule is 100% transitive. If you build one, you
suck" -- S.Yegge

Re: Ear plugin & EJB module

Posted by CemKoc <ce...@gmail.com>.
I have checked source of ear plugin in limited time, I noticed in EarMojo class:

public void execute()
        

final File sourceFile = module.getArtifact().getFile();
final File destinationFile = buildDestinationFile( getWorkDirectory(), module.getUri() );
...
...
...         
unpack( sourceFile, destinationFile );

-----------------------------
         
What is getFile() method returning? It seems that our configuration is a little bid buggy.

Thanks
-- 
View this message in context: http://n2.nabble.com/Ear-plugin---EJB-module-tp2604318p2604407.html
Sent from the maven users mailing list archive at Nabble.com.


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