You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rafael Vanderlei <ra...@gmail.com> on 2011/04/07 15:27:14 UTC

How to generate clients for my project

Hi.

I have a multi module project and I need to generate two clients (could be
more) for my application. But the clients need to include classes that are
in different modules, so I'm kind of not having much idea on how to do this.

My project structure is like this

- root
--- module a (jar)
--- module b (jar)
--- module c (ejb)
--- module d (ejb)
--- module e (war)
--- module f (war)

As I said, the clients I need to generate must include a different subset of
classes that are in module a, module b and module d. Also I need to deploy
these clients to the company's repository (I'm using Nexus) so the consumers
can declare it as a dependency.

What do you recommend for this need?

Thanks and regards,
Rafael.

Re: How to generate clients for my project

Posted by Ron Wheeler <rw...@artifact-software.com>.
The more details that you provide about what you are trying to build, 
the more  likely it is that you will find someone who has the "right" 
answer.
It is 99.9% certain, that more than one person has built what you are 
trying to do.

If you ask very specific questions, you will tend to get very accurate 
answers that are correct responses to your question but wrong for what 
you ultimately want to achieve.
More context => better advice.

If you also mention your IDE and the version of Maven that you are 
using, you might get better results.




On 07/04/2011 9:46 AM, Rafael Vanderlei wrote:
> Hi, Ron. Thanks for response.
>
> How would I configure such a project using Maven? Keeping in mind I 
> already have all the code in the modules I mentioned before and I just 
> need a way to put everything together in a jar and then deploy to Nexus.
>
> Regards,
> Rafael.
>
> On Thu, Apr 7, 2011 at 10:36 AM, Ron Wheeler 
> <rwheeler@artifact-software.com 
> <ma...@artifact-software.com>> wrote:
>
>     This looks like a classic web services configuration.
>
>     The web services project produces a jar that all the clients need,
>     it gets deployed as an artifact and the clients depend on that
>     artifact.
>
>     Is that what you are trying to do?
>
>     Ron
>
>
>     On 07/04/2011 9:27 AM, Rafael Vanderlei wrote:
>
>         Hi.
>
>         I have a multi module project and I need to generate two
>         clients (could be
>         more) for my application. But the clients need to include
>         classes that are
>         in different modules, so I'm kind of not having much idea on
>         how to do this.
>
>         My project structure is like this
>
>         - root
>         --- module a (jar)
>         --- module b (jar)
>         --- module c (ejb)
>         --- module d (ejb)
>         --- module e (war)
>         --- module f (war)
>
>         As I said, the clients I need to generate must include a
>         different subset of
>         classes that are in module a, module b and module d. Also I
>         need to deploy
>         these clients to the company's repository (I'm using Nexus) so
>         the consumers
>         can declare it as a dependency.
>
>         What do you recommend for this need?
>
>         Thanks and regards,
>         Rafael.
>
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>     <ma...@maven.apache.org>
>     For additional commands, e-mail: users-help@maven.apache.org
>     <ma...@maven.apache.org>
>
>


Re: How to generate clients for my project

Posted by Anders Hammar <an...@hammar.net>.
It looks like you've already set you're mind on the end result, but I'd like
to warn you about duplicating classes in several artifacts. Sooner or later
this will get you into trouble.
I suggest you move these classes to a separate module and declare a
dependency to it from your "server artifacts". i.e. keep the API separate
from the impl logic. If you also have some client specific classes you would
create a separate artifact for that, which would then have a dependency to
the API artifact.

This is just rough guidelines. As Ron says, give us more details and we can
give you more specific solutions.

/Anders

On Thu, Apr 7, 2011 at 15:46, Rafael Vanderlei <ra...@gmail.com>wrote:

> Hi, Ron. Thanks for response.
>
> How would I configure such a project using Maven? Keeping in mind I already
> have all the code in the modules I mentioned before and I just need a way
> to
> put everything together in a jar and then deploy to Nexus.
>
> Regards,
> Rafael.
>
> On Thu, Apr 7, 2011 at 10:36 AM, Ron Wheeler <
> rwheeler@artifact-software.com
> > wrote:
>
> > This looks like a classic web services configuration.
> >
> > The web services project produces a jar that all the clients need, it
> gets
> > deployed as an artifact and the clients depend on that artifact.
> >
> > Is that what you are trying to do?
> >
> > Ron
> >
> >
> > On 07/04/2011 9:27 AM, Rafael Vanderlei wrote:
> >
> >> Hi.
> >>
> >> I have a multi module project and I need to generate two clients (could
> be
> >> more) for my application. But the clients need to include classes that
> are
> >> in different modules, so I'm kind of not having much idea on how to do
> >> this.
> >>
> >> My project structure is like this
> >>
> >> - root
> >> --- module a (jar)
> >> --- module b (jar)
> >> --- module c (ejb)
> >> --- module d (ejb)
> >> --- module e (war)
> >> --- module f (war)
> >>
> >> As I said, the clients I need to generate must include a different
> subset
> >> of
> >> classes that are in module a, module b and module d. Also I need to
> deploy
> >> these clients to the company's repository (I'm using Nexus) so the
> >> consumers
> >> can declare it as a dependency.
> >>
> >> What do you recommend for this need?
> >>
> >> Thanks and regards,
> >> Rafael.
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: How to generate clients for my project

Posted by Anders Hammar <an...@hammar.net>.
"include" in the maven world is to declare a dependency. Don't duplicate
classes!

/Anders

On Thu, Apr 7, 2011 at 16:24, Rafael Vanderlei <ra...@gmail.com>wrote:

> Oh, sorry, they´re not web services... my project provides ejbs to other
> projects, so they are clients for ejb services.
>
> I know maven-ejb-plugin has an opton to generate ejb client but I believe I
> can´t use it because I also need to include classes that are in other
> modules than ejb. And still there is the need of deploy it to Nexus, which
> I
> strongly believe cannot be solved by maven ejb plugin.
>
> I´m still failing on the search
>
> On Thu, Apr 7, 2011 at 11:10 AM, Ron Wheeler <
> rwheeler@artifact-software.com
> > wrote:
>
> >  Is it web services?
> >
> >
> > On 07/04/2011 9:46 AM, Rafael Vanderlei wrote:
> >
> > Hi, Ron. Thanks for response.
> >
> > How would I configure such a project using Maven? Keeping in mind I
> already
> > have all the code in the modules I mentioned before and I just need a way
> to
> > put everything together in a jar and then deploy to Nexus.
> >
> > Regards,
> > Rafael.
> >
> > On Thu, Apr 7, 2011 at 10:36 AM, Ron Wheeler <
> > rwheeler@artifact-software.com> wrote:
> >
> >> This looks like a classic web services configuration.
> >>
> >> The web services project produces a jar that all the clients need, it
> gets
> >> deployed as an artifact and the clients depend on that artifact.
> >>
> >> Is that what you are trying to do?
> >>
> >> Ron
> >>
> >>
> >> On 07/04/2011 9:27 AM, Rafael Vanderlei wrote:
> >>
> >>> Hi.
> >>>
> >>> I have a multi module project and I need to generate two clients (could
> >>> be
> >>> more) for my application. But the clients need to include classes that
> >>> are
> >>> in different modules, so I'm kind of not having much idea on how to do
> >>> this.
> >>>
> >>> My project structure is like this
> >>>
> >>> - root
> >>> --- module a (jar)
> >>> --- module b (jar)
> >>> --- module c (ejb)
> >>> --- module d (ejb)
> >>> --- module e (war)
> >>> --- module f (war)
> >>>
> >>> As I said, the clients I need to generate must include a different
> subset
> >>> of
> >>> classes that are in module a, module b and module d. Also I need to
> >>> deploy
> >>> these clients to the company's repository (I'm using Nexus) so the
> >>> consumers
> >>> can declare it as a dependency.
> >>>
> >>> What do you recommend for this need?
> >>>
> >>> Thanks and regards,
> >>> Rafael.
> >>>
> >>>
> >>
> >>  ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
> >
>

Re: How to generate clients for my project

Posted by Rafael Vanderlei <ra...@gmail.com>.
I know the more information one provide the more accurate the answer he
gets, but I thought I was clear when I put the type of the artifact (EJB)
between parenthesis aside the modules on my project structure.

Sorry for any mess.

Regards,
Rafael.

On Thu, Apr 7, 2011 at 11:24 AM, Rafael Vanderlei <rafaelvanderlei@gmail.com
> wrote:

> Oh, sorry, they´re not web services... my project provides ejbs to other
> projects, so they are clients for ejb services.
>
> I know maven-ejb-plugin has an opton to generate ejb client but I believe I
> can´t use it because I also need to include classes that are in other
> modules than ejb. And still there is the need of deploy it to Nexus, which I
> strongly believe cannot be solved by maven ejb plugin.
>
> I´m still failing on the search
>
>
> On Thu, Apr 7, 2011 at 11:10 AM, Ron Wheeler <
> rwheeler@artifact-software.com> wrote:
>
>>  Is it web services?
>>
>>
>> On 07/04/2011 9:46 AM, Rafael Vanderlei wrote:
>>
>> Hi, Ron. Thanks for response.
>>
>> How would I configure such a project using Maven? Keeping in mind I
>> already have all the code in the modules I mentioned before and I just need
>> a way to put everything together in a jar and then deploy to Nexus.
>>
>> Regards,
>> Rafael.
>>
>> On Thu, Apr 7, 2011 at 10:36 AM, Ron Wheeler <
>> rwheeler@artifact-software.com> wrote:
>>
>>> This looks like a classic web services configuration.
>>>
>>> The web services project produces a jar that all the clients need, it
>>> gets deployed as an artifact and the clients depend on that artifact.
>>>
>>> Is that what you are trying to do?
>>>
>>> Ron
>>>
>>>
>>> On 07/04/2011 9:27 AM, Rafael Vanderlei wrote:
>>>
>>>> Hi.
>>>>
>>>> I have a multi module project and I need to generate two clients (could
>>>> be
>>>> more) for my application. But the clients need to include classes that
>>>> are
>>>> in different modules, so I'm kind of not having much idea on how to do
>>>> this.
>>>>
>>>> My project structure is like this
>>>>
>>>> - root
>>>> --- module a (jar)
>>>> --- module b (jar)
>>>> --- module c (ejb)
>>>> --- module d (ejb)
>>>> --- module e (war)
>>>> --- module f (war)
>>>>
>>>> As I said, the clients I need to generate must include a different
>>>> subset of
>>>> classes that are in module a, module b and module d. Also I need to
>>>> deploy
>>>> these clients to the company's repository (I'm using Nexus) so the
>>>> consumers
>>>> can declare it as a dependency.
>>>>
>>>> What do you recommend for this need?
>>>>
>>>> Thanks and regards,
>>>> Rafael.
>>>>
>>>>
>>>
>>>  ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>
>

Re: How to generate clients for my project

Posted by Rafael Vanderlei <ra...@gmail.com>.
Oh, sorry, they´re not web services... my project provides ejbs to other
projects, so they are clients for ejb services.

I know maven-ejb-plugin has an opton to generate ejb client but I believe I
can´t use it because I also need to include classes that are in other
modules than ejb. And still there is the need of deploy it to Nexus, which I
strongly believe cannot be solved by maven ejb plugin.

I´m still failing on the search

On Thu, Apr 7, 2011 at 11:10 AM, Ron Wheeler <rwheeler@artifact-software.com
> wrote:

>  Is it web services?
>
>
> On 07/04/2011 9:46 AM, Rafael Vanderlei wrote:
>
> Hi, Ron. Thanks for response.
>
> How would I configure such a project using Maven? Keeping in mind I already
> have all the code in the modules I mentioned before and I just need a way to
> put everything together in a jar and then deploy to Nexus.
>
> Regards,
> Rafael.
>
> On Thu, Apr 7, 2011 at 10:36 AM, Ron Wheeler <
> rwheeler@artifact-software.com> wrote:
>
>> This looks like a classic web services configuration.
>>
>> The web services project produces a jar that all the clients need, it gets
>> deployed as an artifact and the clients depend on that artifact.
>>
>> Is that what you are trying to do?
>>
>> Ron
>>
>>
>> On 07/04/2011 9:27 AM, Rafael Vanderlei wrote:
>>
>>> Hi.
>>>
>>> I have a multi module project and I need to generate two clients (could
>>> be
>>> more) for my application. But the clients need to include classes that
>>> are
>>> in different modules, so I'm kind of not having much idea on how to do
>>> this.
>>>
>>> My project structure is like this
>>>
>>> - root
>>> --- module a (jar)
>>> --- module b (jar)
>>> --- module c (ejb)
>>> --- module d (ejb)
>>> --- module e (war)
>>> --- module f (war)
>>>
>>> As I said, the clients I need to generate must include a different subset
>>> of
>>> classes that are in module a, module b and module d. Also I need to
>>> deploy
>>> these clients to the company's repository (I'm using Nexus) so the
>>> consumers
>>> can declare it as a dependency.
>>>
>>> What do you recommend for this need?
>>>
>>> Thanks and regards,
>>> Rafael.
>>>
>>>
>>
>>  ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>

Re: How to generate clients for my project

Posted by Ron Wheeler <rw...@artifact-software.com>.
Is it web services?

On 07/04/2011 9:46 AM, Rafael Vanderlei wrote:
> Hi, Ron. Thanks for response.
>
> How would I configure such a project using Maven? Keeping in mind I 
> already have all the code in the modules I mentioned before and I just 
> need a way to put everything together in a jar and then deploy to Nexus.
>
> Regards,
> Rafael.
>
> On Thu, Apr 7, 2011 at 10:36 AM, Ron Wheeler 
> <rwheeler@artifact-software.com 
> <ma...@artifact-software.com>> wrote:
>
>     This looks like a classic web services configuration.
>
>     The web services project produces a jar that all the clients need,
>     it gets deployed as an artifact and the clients depend on that
>     artifact.
>
>     Is that what you are trying to do?
>
>     Ron
>
>
>     On 07/04/2011 9:27 AM, Rafael Vanderlei wrote:
>
>         Hi.
>
>         I have a multi module project and I need to generate two
>         clients (could be
>         more) for my application. But the clients need to include
>         classes that are
>         in different modules, so I'm kind of not having much idea on
>         how to do this.
>
>         My project structure is like this
>
>         - root
>         --- module a (jar)
>         --- module b (jar)
>         --- module c (ejb)
>         --- module d (ejb)
>         --- module e (war)
>         --- module f (war)
>
>         As I said, the clients I need to generate must include a
>         different subset of
>         classes that are in module a, module b and module d. Also I
>         need to deploy
>         these clients to the company's repository (I'm using Nexus) so
>         the consumers
>         can declare it as a dependency.
>
>         What do you recommend for this need?
>
>         Thanks and regards,
>         Rafael.
>
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>     <ma...@maven.apache.org>
>     For additional commands, e-mail: users-help@maven.apache.org
>     <ma...@maven.apache.org>
>
>


Re: How to generate clients for my project

Posted by Rafael Vanderlei <ra...@gmail.com>.
Hi, Ron. Thanks for response.

How would I configure such a project using Maven? Keeping in mind I already
have all the code in the modules I mentioned before and I just need a way to
put everything together in a jar and then deploy to Nexus.

Regards,
Rafael.

On Thu, Apr 7, 2011 at 10:36 AM, Ron Wheeler <rwheeler@artifact-software.com
> wrote:

> This looks like a classic web services configuration.
>
> The web services project produces a jar that all the clients need, it gets
> deployed as an artifact and the clients depend on that artifact.
>
> Is that what you are trying to do?
>
> Ron
>
>
> On 07/04/2011 9:27 AM, Rafael Vanderlei wrote:
>
>> Hi.
>>
>> I have a multi module project and I need to generate two clients (could be
>> more) for my application. But the clients need to include classes that are
>> in different modules, so I'm kind of not having much idea on how to do
>> this.
>>
>> My project structure is like this
>>
>> - root
>> --- module a (jar)
>> --- module b (jar)
>> --- module c (ejb)
>> --- module d (ejb)
>> --- module e (war)
>> --- module f (war)
>>
>> As I said, the clients I need to generate must include a different subset
>> of
>> classes that are in module a, module b and module d. Also I need to deploy
>> these clients to the company's repository (I'm using Nexus) so the
>> consumers
>> can declare it as a dependency.
>>
>> What do you recommend for this need?
>>
>> Thanks and regards,
>> Rafael.
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: How to generate clients for my project

Posted by Ron Wheeler <rw...@artifact-software.com>.
This looks like a classic web services configuration.

The web services project produces a jar that all the clients need, it 
gets deployed as an artifact and the clients depend on that artifact.

Is that what you are trying to do?

Ron

On 07/04/2011 9:27 AM, Rafael Vanderlei wrote:
> Hi.
>
> I have a multi module project and I need to generate two clients (could be
> more) for my application. But the clients need to include classes that are
> in different modules, so I'm kind of not having much idea on how to do this.
>
> My project structure is like this
>
> - root
> --- module a (jar)
> --- module b (jar)
> --- module c (ejb)
> --- module d (ejb)
> --- module e (war)
> --- module f (war)
>
> As I said, the clients I need to generate must include a different subset of
> classes that are in module a, module b and module d. Also I need to deploy
> these clients to the company's repository (I'm using Nexus) so the consumers
> can declare it as a dependency.
>
> What do you recommend for this need?
>
> Thanks and regards,
> Rafael.
>


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