You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by og0815 <ol...@gg-net.de> on 2013/04/01 20:56:19 UTC

Re: maven tomee plugin and remote deploy

Hi,

I played around a little bit but ended up reading the source.

As far as I understand (please correct me if I'm wrong), the
org.apache.openejb.assembler.DeployerEjb is the used business
implementation, which tries to find the resource to deploy in the following
way (in org.apache.openejb.loader.ProvisioningUtil.realLocation) :

1. If rawLocation starts with HTTP try loading from local cache or build an
URL and load using proxys
2. If 1. fails, try loading the org.apache.openejb.resolver.Resolver and use
its resolve method
3. The Resolver seams to handle resources of the type mvn:groupid:artifactid
but only on the same machine.
4. If everything failed, try the rawLocation as local file.

So the only way, I see so far, to remote deploy to tomee is by setting up an
http server on the development machine, making this http server globally
available, putting my ejbs/wars/ears in the http path, and supply the url to
my other machine which is running tomee ?

What makes me wonder, is the fact, that the openejb-standalone
implementation already has some functionality to allow a remote deploy with
out a globally available http url. 
Is there some reason that this hasn't made it into the DeployerEjb yet ?
Could you point me to the implementation in openejb. If I get some free time
I would like to look it up and possible implement it myself into the
DeployerEjb.

And as always, thx for the great product and keep up the good work,
Olli





--
View this message in context: http://openejb.979440.n4.nabble.com/maven-tomee-plugin-and-remote-deploy-tp4661806p4661882.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: maven tomee plugin and remote deploy

Posted by Romain Manni-Bucau <rm...@gmail.com>.
about jenkins: https://wiki.jenkins-ci.org/display/JENKINS/Deploy+Plugin

saw some puppet usage too, very dependent on project/enterprise
goals/environment

some deployment from maven is fine too

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/4/2 James Green <ja...@gmail.com>

> By "jenkins hook" are you referring to it polling the version control repo
> for changes? If so we have that :)
>
> If not there's something I clearly need to read.
>
> I have arquillian being used for integration tests against server at the
> mo. Quite what is common usage isn't clearly documented yet.
>
>
>
> On 2 April 2013 10:56, Romain Manni-Bucau <rm...@gmail.com> wrote:
>
> > well, depends a lot on the enterprise and its workflow. About tests
> > arquillian can already do a lot (multiple containers, multiple
> archives...)
> >
> > About deployment, deploying from jenkins through mvn seems quite common
> > today but using just a jenkins hook to do so is maybe easier and more
> > "portable" (accross servers).
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > *Blog: **http://rmannibucau.wordpress.com/*<
> > http://rmannibucau.wordpress.com/>
> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > *Github: https://github.com/rmannibucau*
> >
> >
> >
> > 2013/4/2 James Green <ja...@gmail.com>
> >
> > > This leads nicely into something I'm about to approach. We have a few
> > maven
> > > based projects. I'd like to avoid having to manually deploy the build
> > > artifacts onto the respective QA VMs and perform the QA'ing of the
> > > components together.
> > >
> > > Sounds nicer to build a maven project that depends on each artifact and
> > has
> > > tests that run across the deployed instances. proj-1.qa.mydomain and
> > > proj-2.qa.mydomain for instance.
> > >
> > > So I was considering building just such a project but using maven to
> > > remotely deploy each artifact into each TomEE instance then run the
> > tests.
> > > Before I try, is this considered "normal" practice or there are better
> > > ways?
> > >
> > > By moving in this direction I'm rather hoping to automate with Jenkins!
> > >
> > >
> > >
> > > On 2 April 2013 10:24, Romain Manni-Bucau <rm...@gmail.com>
> wrote:
> > >
> > > > FYI https://issues.apache.org/jira/browse/TOMEE-880
> > > >
> > > > *Romain Manni-Bucau*
> > > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > > *Blog: **http://rmannibucau.wordpress.com/*<
> > > > http://rmannibucau.wordpress.com/>
> > > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > > *Github: https://github.com/rmannibucau*
> > > >
> > > >
> > > >
> > > > 2013/4/2 Romain Manni-Bucau <rm...@gmail.com>
> > > >
> > > > > i was looking to it since i already have the code
> > > > >
> > > > > about aether that's the lib we use to get mvn dependencies.
> > > > >
> > > > > Here is the pattern used:
> > > > >
> > > > >
> > > > > mvn:[repository_url!]groupId/artifactId[/[version]/[type]]
> > > > >
> > > > >
> > > > > *Romain Manni-Bucau*
> > > > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > > > *Blog: **http://rmannibucau.wordpress.com/*<
> > > > http://rmannibucau.wordpress.com/>
> > > > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > > > *Github: https://github.com/rmannibucau*
> > > > >
> > > > >
> > > > >
> > > > > 2013/4/2 og0815 <ol...@gg-net.de>
> > > > >
> > > > >> Hi,
> > > > >>
> > > > >> > Mvn works with remote repo too and custom repo can be in the url
> > > (see
> > > > >> > aether).
> > > > >>
> > > > >> What's aether ?
> > > > >>
> > > > >> > DeployerEjb doesnt handle remote deployment passing url (remote
> > > > >> deployment
> > > > >> > is used in tomee for cluster deployment).
> > > > >>
> > > > >> > Could be done but not the original goal of deploy goal.
> > > > >> Ok, i might look into this and supply a patch.
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >> --
> > > > >> View this message in context:
> > > > >>
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/maven-tomee-plugin-and-remote-deploy-tp4661806p4661886.html
> > > > >> Sent from the OpenEJB User mailing list archive at Nabble.com.
> > > > >>
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: maven tomee plugin and remote deploy

Posted by James Green <ja...@gmail.com>.
By "jenkins hook" are you referring to it polling the version control repo
for changes? If so we have that :)

If not there's something I clearly need to read.

I have arquillian being used for integration tests against server at the
mo. Quite what is common usage isn't clearly documented yet.



On 2 April 2013 10:56, Romain Manni-Bucau <rm...@gmail.com> wrote:

> well, depends a lot on the enterprise and its workflow. About tests
> arquillian can already do a lot (multiple containers, multiple archives...)
>
> About deployment, deploying from jenkins through mvn seems quite common
> today but using just a jenkins hook to do so is maybe easier and more
> "portable" (accross servers).
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/4/2 James Green <ja...@gmail.com>
>
> > This leads nicely into something I'm about to approach. We have a few
> maven
> > based projects. I'd like to avoid having to manually deploy the build
> > artifacts onto the respective QA VMs and perform the QA'ing of the
> > components together.
> >
> > Sounds nicer to build a maven project that depends on each artifact and
> has
> > tests that run across the deployed instances. proj-1.qa.mydomain and
> > proj-2.qa.mydomain for instance.
> >
> > So I was considering building just such a project but using maven to
> > remotely deploy each artifact into each TomEE instance then run the
> tests.
> > Before I try, is this considered "normal" practice or there are better
> > ways?
> >
> > By moving in this direction I'm rather hoping to automate with Jenkins!
> >
> >
> >
> > On 2 April 2013 10:24, Romain Manni-Bucau <rm...@gmail.com> wrote:
> >
> > > FYI https://issues.apache.org/jira/browse/TOMEE-880
> > >
> > > *Romain Manni-Bucau*
> > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > *Blog: **http://rmannibucau.wordpress.com/*<
> > > http://rmannibucau.wordpress.com/>
> > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > *Github: https://github.com/rmannibucau*
> > >
> > >
> > >
> > > 2013/4/2 Romain Manni-Bucau <rm...@gmail.com>
> > >
> > > > i was looking to it since i already have the code
> > > >
> > > > about aether that's the lib we use to get mvn dependencies.
> > > >
> > > > Here is the pattern used:
> > > >
> > > >
> > > > mvn:[repository_url!]groupId/artifactId[/[version]/[type]]
> > > >
> > > >
> > > > *Romain Manni-Bucau*
> > > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > > *Blog: **http://rmannibucau.wordpress.com/*<
> > > http://rmannibucau.wordpress.com/>
> > > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > > *Github: https://github.com/rmannibucau*
> > > >
> > > >
> > > >
> > > > 2013/4/2 og0815 <ol...@gg-net.de>
> > > >
> > > >> Hi,
> > > >>
> > > >> > Mvn works with remote repo too and custom repo can be in the url
> > (see
> > > >> > aether).
> > > >>
> > > >> What's aether ?
> > > >>
> > > >> > DeployerEjb doesnt handle remote deployment passing url (remote
> > > >> deployment
> > > >> > is used in tomee for cluster deployment).
> > > >>
> > > >> > Could be done but not the original goal of deploy goal.
> > > >> Ok, i might look into this and supply a patch.
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> View this message in context:
> > > >>
> > >
> >
> http://openejb.979440.n4.nabble.com/maven-tomee-plugin-and-remote-deploy-tp4661806p4661886.html
> > > >> Sent from the OpenEJB User mailing list archive at Nabble.com.
> > > >>
> > > >
> > > >
> > >
> >
>

Re: maven tomee plugin and remote deploy

Posted by Romain Manni-Bucau <rm...@gmail.com>.
well, depends a lot on the enterprise and its workflow. About tests
arquillian can already do a lot (multiple containers, multiple archives...)

About deployment, deploying from jenkins through mvn seems quite common
today but using just a jenkins hook to do so is maybe easier and more
"portable" (accross servers).

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/4/2 James Green <ja...@gmail.com>

> This leads nicely into something I'm about to approach. We have a few maven
> based projects. I'd like to avoid having to manually deploy the build
> artifacts onto the respective QA VMs and perform the QA'ing of the
> components together.
>
> Sounds nicer to build a maven project that depends on each artifact and has
> tests that run across the deployed instances. proj-1.qa.mydomain and
> proj-2.qa.mydomain for instance.
>
> So I was considering building just such a project but using maven to
> remotely deploy each artifact into each TomEE instance then run the tests.
> Before I try, is this considered "normal" practice or there are better
> ways?
>
> By moving in this direction I'm rather hoping to automate with Jenkins!
>
>
>
> On 2 April 2013 10:24, Romain Manni-Bucau <rm...@gmail.com> wrote:
>
> > FYI https://issues.apache.org/jira/browse/TOMEE-880
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > *Blog: **http://rmannibucau.wordpress.com/*<
> > http://rmannibucau.wordpress.com/>
> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > *Github: https://github.com/rmannibucau*
> >
> >
> >
> > 2013/4/2 Romain Manni-Bucau <rm...@gmail.com>
> >
> > > i was looking to it since i already have the code
> > >
> > > about aether that's the lib we use to get mvn dependencies.
> > >
> > > Here is the pattern used:
> > >
> > >
> > > mvn:[repository_url!]groupId/artifactId[/[version]/[type]]
> > >
> > >
> > > *Romain Manni-Bucau*
> > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > *Blog: **http://rmannibucau.wordpress.com/*<
> > http://rmannibucau.wordpress.com/>
> > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > *Github: https://github.com/rmannibucau*
> > >
> > >
> > >
> > > 2013/4/2 og0815 <ol...@gg-net.de>
> > >
> > >> Hi,
> > >>
> > >> > Mvn works with remote repo too and custom repo can be in the url
> (see
> > >> > aether).
> > >>
> > >> What's aether ?
> > >>
> > >> > DeployerEjb doesnt handle remote deployment passing url (remote
> > >> deployment
> > >> > is used in tomee for cluster deployment).
> > >>
> > >> > Could be done but not the original goal of deploy goal.
> > >> Ok, i might look into this and supply a patch.
> > >>
> > >>
> > >>
> > >>
> > >> --
> > >> View this message in context:
> > >>
> >
> http://openejb.979440.n4.nabble.com/maven-tomee-plugin-and-remote-deploy-tp4661806p4661886.html
> > >> Sent from the OpenEJB User mailing list archive at Nabble.com.
> > >>
> > >
> > >
> >
>

Re: maven tomee plugin and remote deploy

Posted by James Green <ja...@gmail.com>.
This leads nicely into something I'm about to approach. We have a few maven
based projects. I'd like to avoid having to manually deploy the build
artifacts onto the respective QA VMs and perform the QA'ing of the
components together.

Sounds nicer to build a maven project that depends on each artifact and has
tests that run across the deployed instances. proj-1.qa.mydomain and
proj-2.qa.mydomain for instance.

So I was considering building just such a project but using maven to
remotely deploy each artifact into each TomEE instance then run the tests.
Before I try, is this considered "normal" practice or there are better ways?

By moving in this direction I'm rather hoping to automate with Jenkins!



On 2 April 2013 10:24, Romain Manni-Bucau <rm...@gmail.com> wrote:

> FYI https://issues.apache.org/jira/browse/TOMEE-880
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/4/2 Romain Manni-Bucau <rm...@gmail.com>
>
> > i was looking to it since i already have the code
> >
> > about aether that's the lib we use to get mvn dependencies.
> >
> > Here is the pattern used:
> >
> >
> > mvn:[repository_url!]groupId/artifactId[/[version]/[type]]
> >
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > *Github: https://github.com/rmannibucau*
> >
> >
> >
> > 2013/4/2 og0815 <ol...@gg-net.de>
> >
> >> Hi,
> >>
> >> > Mvn works with remote repo too and custom repo can be in the url (see
> >> > aether).
> >>
> >> What's aether ?
> >>
> >> > DeployerEjb doesnt handle remote deployment passing url (remote
> >> deployment
> >> > is used in tomee for cluster deployment).
> >>
> >> > Could be done but not the original goal of deploy goal.
> >> Ok, i might look into this and supply a patch.
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://openejb.979440.n4.nabble.com/maven-tomee-plugin-and-remote-deploy-tp4661806p4661886.html
> >> Sent from the OpenEJB User mailing list archive at Nabble.com.
> >>
> >
> >
>

Re: maven tomee plugin and remote deploy

Posted by Romain Manni-Bucau <rm...@gmail.com>.
FYI https://issues.apache.org/jira/browse/TOMEE-880

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/4/2 Romain Manni-Bucau <rm...@gmail.com>

> i was looking to it since i already have the code
>
> about aether that's the lib we use to get mvn dependencies.
>
> Here is the pattern used:
>
>
> mvn:[repository_url!]groupId/artifactId[/[version]/[type]]
>
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/4/2 og0815 <ol...@gg-net.de>
>
>> Hi,
>>
>> > Mvn works with remote repo too and custom repo can be in the url (see
>> > aether).
>>
>> What's aether ?
>>
>> > DeployerEjb doesnt handle remote deployment passing url (remote
>> deployment
>> > is used in tomee for cluster deployment).
>>
>> > Could be done but not the original goal of deploy goal.
>> Ok, i might look into this and supply a patch.
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://openejb.979440.n4.nabble.com/maven-tomee-plugin-and-remote-deploy-tp4661806p4661886.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
>
>

Re: maven tomee plugin and remote deploy

Posted by Romain Manni-Bucau <rm...@gmail.com>.
i was looking to it since i already have the code

about aether that's the lib we use to get mvn dependencies.

Here is the pattern used:


mvn:[repository_url!]groupId/artifactId[/[version]/[type]]


*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/4/2 og0815 <ol...@gg-net.de>

> Hi,
>
> > Mvn works with remote repo too and custom repo can be in the url (see
> > aether).
>
> What's aether ?
>
> > DeployerEjb doesnt handle remote deployment passing url (remote
> deployment
> > is used in tomee for cluster deployment).
>
> > Could be done but not the original goal of deploy goal.
> Ok, i might look into this and supply a patch.
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/maven-tomee-plugin-and-remote-deploy-tp4661806p4661886.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: maven tomee plugin and remote deploy

Posted by og0815 <ol...@gg-net.de>.
Hi,

> Mvn works with remote repo too and custom repo can be in the url (see
> aether).

What's aether ?

> DeployerEjb doesnt handle remote deployment passing url (remote deployment
> is used in tomee for cluster deployment).

> Could be done but not the original goal of deploy goal. 
Ok, i might look into this and supply a patch.




--
View this message in context: http://openejb.979440.n4.nabble.com/maven-tomee-plugin-and-remote-deploy-tp4661806p4661886.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: maven tomee plugin and remote deploy

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Mvn works with remote repo too and custom repo can be in the url (see
aether).

DeployerEjb doesnt handle remote deployment passing url (remote deployment
is used in tomee for cluster deployment).

Could be done but not the original goal of deploy goal.
Le 1 avr. 2013 20:56, "og0815" <ol...@gg-net.de> a écrit :

> Hi,
>
> I played around a little bit but ended up reading the source.
>
> As far as I understand (please correct me if I'm wrong), the
> org.apache.openejb.assembler.DeployerEjb is the used business
> implementation, which tries to find the resource to deploy in the following
> way (in org.apache.openejb.loader.ProvisioningUtil.realLocation) :
>
> 1. If rawLocation starts with HTTP try loading from local cache or build an
> URL and load using proxys
> 2. If 1. fails, try loading the org.apache.openejb.resolver.Resolver and
> use
> its resolve method
> 3. The Resolver seams to handle resources of the type
> mvn:groupid:artifactid
> but only on the same machine.
> 4. If everything failed, try the rawLocation as local file.
>
> So the only way, I see so far, to remote deploy to tomee is by setting up
> an
> http server on the development machine, making this http server globally
> available, putting my ejbs/wars/ears in the http path, and supply the url
> to
> my other machine which is running tomee ?
>
> What makes me wonder, is the fact, that the openejb-standalone
> implementation already has some functionality to allow a remote deploy with
> out a globally available http url.
> Is there some reason that this hasn't made it into the DeployerEjb yet ?
> Could you point me to the implementation in openejb. If I get some free
> time
> I would like to look it up and possible implement it myself into the
> DeployerEjb.
>
> And as always, thx for the great product and keep up the good work,
> Olli
>
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/maven-tomee-plugin-and-remote-deploy-tp4661806p4661882.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>