You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Yann Blazart <ya...@bycode.fr> on 2015/08/10 19:08:46 UTC

mvn tomee:exec and vars in server.xml

Hello, currently I'm trying to make packing to deliver TomEE and Apps in
production as One Jar to run with tomee:exec.
The only way I found to permit to the production team to configure
resources is to make them write a tomee.xml and provide its path by using
the -DadditionalSystemProperties=-Dopenejb.conf.file=...

Well done, but to configure the http listening port, I followed a blog post
from Romain.

in the blog article 50 shades of tomee, Romain has written that we could
use tomee:exec to generate the big jar and pass some vars to the next java
command, to launch tomee, to override some values. In his example he say
that he can override the http.port in server.xml. Great !

But in fact, while I'm providing a server.xml with the ${http.port} in the
connector for the tomcat, the tomee:exec fail because of an
NumberFormatException.

The plugin tomee try to get the value from  the provided server.xml, with
pain of course in this case.

Is it possible to fix it ? I can't clearly see the impacts on the other
goals of the mojo if I change the code.

Does anybody have an idea ?

Thanks a lot.

Re: mvn tomee:exec and vars in server.xml

Posted by Romain Manni-Bucau <rm...@gmail.com>.
That is intended. If you want to use ${http.port} then you have to set the
system properties ie systemVariables or args. I would even say not
supporting maven system properties is important and one of the goal of this
plugin which keep isolation from the build.

Did systemVariables didnt work for you?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-08-12 7:36 GMT-07:00 Yann Blazart <ya...@bycode.fr>:

> Hello. Just few words to say that I have reopened TOMEE-1626.
>
> Correction put in the code make tomee:exec work, but tomee:run fail.
>
> I've putted a new patch on the ticket, as my previous patch has not been
> took as it was, it could be interessant to take just few minutes to check
> the new one.
>
> I'm using tomee:run and tomee:exec IRL, so I know that my corrections work.
>
> Regards.
> Le 11 août 2015 16:34, "Romain Manni-Bucau" <rm...@gmail.com> a
> écrit :
>
> > Sure but very few (1) rely on the type integer.
> > Le 11 août 2015 07:32, "Yann Blazart" <ya...@bycode.fr> a écrit :
> >
> > > Yop perhaps.
> > >
> > > But all the code of the Mojo is build to use these fields
> (tomeeHttpPort
> > > for example).
> > > I writed my code while trying to let all other things working.
> > > Le 11 août 2015 16:17, "Romain Manni-Bucau" <rm...@gmail.com> a
> > > écrit :
> > >
> > > > if you pass system variable run should get them automatically, that
> > said
> > > > the gain for run is ver poor since you already have the http port
> maven
> > > > property to switch it.
> > > >
> > > >
> > > > Romain Manni-Bucau
> > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > <http://rmannibucau.wordpress.com> | Github <
> > > > https://github.com/rmannibucau> |
> > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > <http://www.tomitribe.com>
> > > >
> > > > 2015-08-11 7:13 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> > > >
> > > > > Yep, but with tomee:run ?
> > > > >
> > > > > I think this code was here for this goal, typically to get back the
> > > > > communications ports in the Mojo.
> > > > > For example, in  AbstractCommandMojo, and run goal in
> > > AbstractTomEEMojo.
> > > > >
> > > > > My patch is working in theses cases.
> > > > > Le 11 août 2015 16:09, "Romain Manni-Bucau" <rmannibucau@gmail.com
> >
> > a
> > > > > écrit :
> > > > >
> > > > > > Think we will just use strings for ports, using placeholders is
> not
> > > > > needed
> > > > > > at build time since you can already force the ports on mvn
> command
> > > > line.
> > > > > > But using placeholder filled at run time does :).
> > > > > >
> > > > > >
> > > > > > Romain Manni-Bucau
> > > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > https://github.com/rmannibucau> |
> > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > > > <http://www.tomitribe.com>
> > > > > >
> > > > > > 2015-08-11 6:51 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> > > > > >
> > > > > > > Check my patch :  TOMEE-1626.
> > > > > > >
> > > > > > > With it, it will be cool with tomee:run for dev and tomee:exec
> > for
> > > > > > > delivering.
> > > > > > > Le 11 août 2015 15:49, "Romain Manni-Bucau" <
> > rmannibucau@gmail.com
> > > >
> > > > a
> > > > > > > écrit :
> > > > > > >
> > > > > > > > Ah yeah, ports should be strings.
> > > > > > > > Le 11 août 2015 06:37, "Yann Blazart" <
> yann.blazart@bycode.fr>
> > a
> > > > > > écrit :
> > > > > > > >
> > > > > > > > > well romain,  I think I wasn't enought clear about what I
> did
> > > > mean.
> > > > > > > > >
> > > > > > > > > Ok, the problem come from AbstractTomEEMojo,  in the
> > > > > > > > > alignConfigOnServerXmlCurrentConfig.
> > > > > > > > >
> > > > > > > > > The goal of this method, call in exec(), is to get values
> > from
> > > > the
> > > > > > > > > generated server.xml to get it back in fields of the mojo.
> I
> > > > think
> > > > > > this
> > > > > > > > is
> > > > > > > > > certainly for RunMojo, but the Integer.parseInt of
> > ${http.port}
> > > > of
> > > > > > > course
> > > > > > > > > failed ! :)
> > > > > > > > >
> > > > > > > > > Well, I worked on it, I'm about to post a patch on ASF
> JIRA,
> > I
> > > > you
> > > > > > > would
> > > > > > > > > like to check it as soon as possible ;)
> > > > > > > > > No but used only in java mode. In script - catalina.sh|bat
> > you
> > > > can
> > > > > > ude
> > > > > > > > env
> > > > > > > > > var CATALINA_OPTS or setenv.sh|bat
> > > > > > > > > Le 11 août 2015 00:53, "Yann Blazart" <
> > yann.blazart@bycode.fr>
> > > a
> > > > > > > écrit :
> > > > > > > > >
> > > > > > > > > > hmmm.  this option seems to have disapperead in tomee 7
> > > > > > > > > > Le 10 août 2015 19:21, "Romain Manni-Bucau" <
> > > > > rmannibucau@gmail.com
> > > > > > >
> > > > > > > a
> > > > > > > > > > écrit :
> > > > > > > > > >
> > > > > > > > > > > use keepServerXmlAsthis I think during build phase
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Romain Manni-Bucau
> > > > > > > > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > > > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > > > > > > https://github.com/rmannibucau> |
> > > > > > > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> |
> > > > > Tomitriber
> > > > > > > > > > > <http://www.tomitribe.com>
> > > > > > > > > > >
> > > > > > > > > > > 2015-08-10 10:19 GMT-07:00 Yann Blazart <
> > > > > yann.blazart@bycode.fr
> > > > > > >:
> > > > > > > > > > >
> > > > > > > > > > > > it does'nt work.  it's before.  i can't provide
> > > server.xml
> > > > > with
> > > > > > > > vars.
> > > > > > > > > > > > tomee:exec fail.
> > > > > > > > > > > > Le 10 août 2015 19:11, "Romain Manni-Bucau" <
> > > > > > > rmannibucau@gmail.com
> > > > > > > > >
> > > > > > > > > a
> > > > > > > > > > > > écrit :
> > > > > > > > > > > >
> > > > > > > > > > > > > Hi Yann,
> > > > > > > > > > > > >
> > > > > > > > > > > > > you should be able to use
> > > > > > > > > > > "-DadditionalSystemProperties=-Dhttp.port=1080
> > > > > > > > > > > > > -Dhttps.port=1443"
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > Romain Manni-Bucau
> > > > > > > > > > > > > @rmannibucau <https://twitter.com/rmannibucau> |
> > Blog
> > > > > > > > > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > > > > > > > > https://github.com/rmannibucau> |
> > > > > > > > > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau>
> |
> > > > > > > Tomitriber
> > > > > > > > > > > > > <http://www.tomitribe.com>
> > > > > > > > > > > > >
> > > > > > > > > > > > > 2015-08-10 10:08 GMT-07:00 Yann Blazart <
> > > > > > > yann.blazart@bycode.fr
> > > > > > > > >:
> > > > > > > > > > > > >
> > > > > > > > > > > > > > Hello, currently I'm trying to make packing to
> > > deliver
> > > > > > TomEE
> > > > > > > > and
> > > > > > > > > > Apps
> > > > > > > > > > > > in
> > > > > > > > > > > > > > production as One Jar to run with tomee:exec.
> > > > > > > > > > > > > > The only way I found to permit to the production
> > team
> > > > to
> > > > > > > > > configure
> > > > > > > > > > > > > > resources is to make them write a tomee.xml and
> > > provide
> > > > > its
> > > > > > > > path
> > > > > > > > > by
> > > > > > > > > > > > using
> > > > > > > > > > > > > > the
> > > > -DadditionalSystemProperties=-Dopenejb.conf.file=...
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Well done, but to configure the http listening
> > port,
> > > I
> > > > > > > > followed a
> > > > > > > > > > > blog
> > > > > > > > > > > > > post
> > > > > > > > > > > > > > from Romain.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > in the blog article 50 shades of tomee, Romain
> has
> > > > > written
> > > > > > > that
> > > > > > > > > we
> > > > > > > > > > > > could
> > > > > > > > > > > > > > use tomee:exec to generate the big jar and pass
> > some
> > > > vars
> > > > > > to
> > > > > > > > the
> > > > > > > > > > next
> > > > > > > > > > > > > java
> > > > > > > > > > > > > > command, to launch tomee, to override some
> values.
> > In
> > > > his
> > > > > > > > example
> > > > > > > > > > he
> > > > > > > > > > > > say
> > > > > > > > > > > > > > that he can override the http.port in server.xml.
> > > > Great !
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > But in fact, while I'm providing a server.xml
> with
> > > the
> > > > > > > > > ${http.port}
> > > > > > > > > > > in
> > > > > > > > > > > > > the
> > > > > > > > > > > > > > connector for the tomcat, the tomee:exec fail
> > because
> > > > of
> > > > > an
> > > > > > > > > > > > > > NumberFormatException.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > The plugin tomee try to get the value from  the
> > > > provided
> > > > > > > > > > server.xml,
> > > > > > > > > > > > with
> > > > > > > > > > > > > > pain of course in this case.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Is it possible to fix it ? I can't clearly see
> the
> > > > > impacts
> > > > > > on
> > > > > > > > the
> > > > > > > > > > > other
> > > > > > > > > > > > > > goals of the mojo if I change the code.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Does anybody have an idea ?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Thanks a lot.
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: mvn tomee:exec and vars in server.xml

Posted by Yann Blazart <ya...@bycode.fr>.
Hello. Just few words to say that I have reopened TOMEE-1626.

Correction put in the code make tomee:exec work, but tomee:run fail.

I've putted a new patch on the ticket, as my previous patch has not been
took as it was, it could be interessant to take just few minutes to check
the new one.

I'm using tomee:run and tomee:exec IRL, so I know that my corrections work.

Regards.
Le 11 août 2015 16:34, "Romain Manni-Bucau" <rm...@gmail.com> a
écrit :

> Sure but very few (1) rely on the type integer.
> Le 11 août 2015 07:32, "Yann Blazart" <ya...@bycode.fr> a écrit :
>
> > Yop perhaps.
> >
> > But all the code of the Mojo is build to use these fields (tomeeHttpPort
> > for example).
> > I writed my code while trying to let all other things working.
> > Le 11 août 2015 16:17, "Romain Manni-Bucau" <rm...@gmail.com> a
> > écrit :
> >
> > > if you pass system variable run should get them automatically, that
> said
> > > the gain for run is ver poor since you already have the http port maven
> > > property to switch it.
> > >
> > >
> > > Romain Manni-Bucau
> > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > <http://rmannibucau.wordpress.com> | Github <
> > > https://github.com/rmannibucau> |
> > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > <http://www.tomitribe.com>
> > >
> > > 2015-08-11 7:13 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> > >
> > > > Yep, but with tomee:run ?
> > > >
> > > > I think this code was here for this goal, typically to get back the
> > > > communications ports in the Mojo.
> > > > For example, in  AbstractCommandMojo, and run goal in
> > AbstractTomEEMojo.
> > > >
> > > > My patch is working in theses cases.
> > > > Le 11 août 2015 16:09, "Romain Manni-Bucau" <rm...@gmail.com>
> a
> > > > écrit :
> > > >
> > > > > Think we will just use strings for ports, using placeholders is not
> > > > needed
> > > > > at build time since you can already force the ports on mvn command
> > > line.
> > > > > But using placeholder filled at run time does :).
> > > > >
> > > > >
> > > > > Romain Manni-Bucau
> > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > https://github.com/rmannibucau> |
> > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > > <http://www.tomitribe.com>
> > > > >
> > > > > 2015-08-11 6:51 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> > > > >
> > > > > > Check my patch :  TOMEE-1626.
> > > > > >
> > > > > > With it, it will be cool with tomee:run for dev and tomee:exec
> for
> > > > > > delivering.
> > > > > > Le 11 août 2015 15:49, "Romain Manni-Bucau" <
> rmannibucau@gmail.com
> > >
> > > a
> > > > > > écrit :
> > > > > >
> > > > > > > Ah yeah, ports should be strings.
> > > > > > > Le 11 août 2015 06:37, "Yann Blazart" <ya...@bycode.fr>
> a
> > > > > écrit :
> > > > > > >
> > > > > > > > well romain,  I think I wasn't enought clear about what I did
> > > mean.
> > > > > > > >
> > > > > > > > Ok, the problem come from AbstractTomEEMojo,  in the
> > > > > > > > alignConfigOnServerXmlCurrentConfig.
> > > > > > > >
> > > > > > > > The goal of this method, call in exec(), is to get values
> from
> > > the
> > > > > > > > generated server.xml to get it back in fields of the mojo. I
> > > think
> > > > > this
> > > > > > > is
> > > > > > > > certainly for RunMojo, but the Integer.parseInt of
> ${http.port}
> > > of
> > > > > > course
> > > > > > > > failed ! :)
> > > > > > > >
> > > > > > > > Well, I worked on it, I'm about to post a patch on ASF JIRA,
> I
> > > you
> > > > > > would
> > > > > > > > like to check it as soon as possible ;)
> > > > > > > > No but used only in java mode. In script - catalina.sh|bat
> you
> > > can
> > > > > ude
> > > > > > > env
> > > > > > > > var CATALINA_OPTS or setenv.sh|bat
> > > > > > > > Le 11 août 2015 00:53, "Yann Blazart" <
> yann.blazart@bycode.fr>
> > a
> > > > > > écrit :
> > > > > > > >
> > > > > > > > > hmmm.  this option seems to have disapperead in tomee 7
> > > > > > > > > Le 10 août 2015 19:21, "Romain Manni-Bucau" <
> > > > rmannibucau@gmail.com
> > > > > >
> > > > > > a
> > > > > > > > > écrit :
> > > > > > > > >
> > > > > > > > > > use keepServerXmlAsthis I think during build phase
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Romain Manni-Bucau
> > > > > > > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > > > > > https://github.com/rmannibucau> |
> > > > > > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> |
> > > > Tomitriber
> > > > > > > > > > <http://www.tomitribe.com>
> > > > > > > > > >
> > > > > > > > > > 2015-08-10 10:19 GMT-07:00 Yann Blazart <
> > > > yann.blazart@bycode.fr
> > > > > >:
> > > > > > > > > >
> > > > > > > > > > > it does'nt work.  it's before.  i can't provide
> > server.xml
> > > > with
> > > > > > > vars.
> > > > > > > > > > > tomee:exec fail.
> > > > > > > > > > > Le 10 août 2015 19:11, "Romain Manni-Bucau" <
> > > > > > rmannibucau@gmail.com
> > > > > > > >
> > > > > > > > a
> > > > > > > > > > > écrit :
> > > > > > > > > > >
> > > > > > > > > > > > Hi Yann,
> > > > > > > > > > > >
> > > > > > > > > > > > you should be able to use
> > > > > > > > > > "-DadditionalSystemProperties=-Dhttp.port=1080
> > > > > > > > > > > > -Dhttps.port=1443"
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > Romain Manni-Bucau
> > > > > > > > > > > > @rmannibucau <https://twitter.com/rmannibucau> |
> Blog
> > > > > > > > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > > > > > > > https://github.com/rmannibucau> |
> > > > > > > > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> |
> > > > > > Tomitriber
> > > > > > > > > > > > <http://www.tomitribe.com>
> > > > > > > > > > > >
> > > > > > > > > > > > 2015-08-10 10:08 GMT-07:00 Yann Blazart <
> > > > > > yann.blazart@bycode.fr
> > > > > > > >:
> > > > > > > > > > > >
> > > > > > > > > > > > > Hello, currently I'm trying to make packing to
> > deliver
> > > > > TomEE
> > > > > > > and
> > > > > > > > > Apps
> > > > > > > > > > > in
> > > > > > > > > > > > > production as One Jar to run with tomee:exec.
> > > > > > > > > > > > > The only way I found to permit to the production
> team
> > > to
> > > > > > > > configure
> > > > > > > > > > > > > resources is to make them write a tomee.xml and
> > provide
> > > > its
> > > > > > > path
> > > > > > > > by
> > > > > > > > > > > using
> > > > > > > > > > > > > the
> > > -DadditionalSystemProperties=-Dopenejb.conf.file=...
> > > > > > > > > > > > >
> > > > > > > > > > > > > Well done, but to configure the http listening
> port,
> > I
> > > > > > > followed a
> > > > > > > > > > blog
> > > > > > > > > > > > post
> > > > > > > > > > > > > from Romain.
> > > > > > > > > > > > >
> > > > > > > > > > > > > in the blog article 50 shades of tomee, Romain has
> > > > written
> > > > > > that
> > > > > > > > we
> > > > > > > > > > > could
> > > > > > > > > > > > > use tomee:exec to generate the big jar and pass
> some
> > > vars
> > > > > to
> > > > > > > the
> > > > > > > > > next
> > > > > > > > > > > > java
> > > > > > > > > > > > > command, to launch tomee, to override some values.
> In
> > > his
> > > > > > > example
> > > > > > > > > he
> > > > > > > > > > > say
> > > > > > > > > > > > > that he can override the http.port in server.xml.
> > > Great !
> > > > > > > > > > > > >
> > > > > > > > > > > > > But in fact, while I'm providing a server.xml with
> > the
> > > > > > > > ${http.port}
> > > > > > > > > > in
> > > > > > > > > > > > the
> > > > > > > > > > > > > connector for the tomcat, the tomee:exec fail
> because
> > > of
> > > > an
> > > > > > > > > > > > > NumberFormatException.
> > > > > > > > > > > > >
> > > > > > > > > > > > > The plugin tomee try to get the value from  the
> > > provided
> > > > > > > > > server.xml,
> > > > > > > > > > > with
> > > > > > > > > > > > > pain of course in this case.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Is it possible to fix it ? I can't clearly see the
> > > > impacts
> > > > > on
> > > > > > > the
> > > > > > > > > > other
> > > > > > > > > > > > > goals of the mojo if I change the code.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Does anybody have an idea ?
> > > > > > > > > > > > >
> > > > > > > > > > > > > Thanks a lot.
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: mvn tomee:exec and vars in server.xml

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Sure but very few (1) rely on the type integer.
Le 11 août 2015 07:32, "Yann Blazart" <ya...@bycode.fr> a écrit :

> Yop perhaps.
>
> But all the code of the Mojo is build to use these fields (tomeeHttpPort
> for example).
> I writed my code while trying to let all other things working.
> Le 11 août 2015 16:17, "Romain Manni-Bucau" <rm...@gmail.com> a
> écrit :
>
> > if you pass system variable run should get them automatically, that said
> > the gain for run is ver poor since you already have the http port maven
> > property to switch it.
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > <http://www.tomitribe.com>
> >
> > 2015-08-11 7:13 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> >
> > > Yep, but with tomee:run ?
> > >
> > > I think this code was here for this goal, typically to get back the
> > > communications ports in the Mojo.
> > > For example, in  AbstractCommandMojo, and run goal in
> AbstractTomEEMojo.
> > >
> > > My patch is working in theses cases.
> > > Le 11 août 2015 16:09, "Romain Manni-Bucau" <rm...@gmail.com> a
> > > écrit :
> > >
> > > > Think we will just use strings for ports, using placeholders is not
> > > needed
> > > > at build time since you can already force the ports on mvn command
> > line.
> > > > But using placeholder filled at run time does :).
> > > >
> > > >
> > > > Romain Manni-Bucau
> > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > <http://rmannibucau.wordpress.com> | Github <
> > > > https://github.com/rmannibucau> |
> > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > <http://www.tomitribe.com>
> > > >
> > > > 2015-08-11 6:51 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> > > >
> > > > > Check my patch :  TOMEE-1626.
> > > > >
> > > > > With it, it will be cool with tomee:run for dev and tomee:exec for
> > > > > delivering.
> > > > > Le 11 août 2015 15:49, "Romain Manni-Bucau" <rmannibucau@gmail.com
> >
> > a
> > > > > écrit :
> > > > >
> > > > > > Ah yeah, ports should be strings.
> > > > > > Le 11 août 2015 06:37, "Yann Blazart" <ya...@bycode.fr> a
> > > > écrit :
> > > > > >
> > > > > > > well romain,  I think I wasn't enought clear about what I did
> > mean.
> > > > > > >
> > > > > > > Ok, the problem come from AbstractTomEEMojo,  in the
> > > > > > > alignConfigOnServerXmlCurrentConfig.
> > > > > > >
> > > > > > > The goal of this method, call in exec(), is to get values from
> > the
> > > > > > > generated server.xml to get it back in fields of the mojo. I
> > think
> > > > this
> > > > > > is
> > > > > > > certainly for RunMojo, but the Integer.parseInt of ${http.port}
> > of
> > > > > course
> > > > > > > failed ! :)
> > > > > > >
> > > > > > > Well, I worked on it, I'm about to post a patch on ASF JIRA, I
> > you
> > > > > would
> > > > > > > like to check it as soon as possible ;)
> > > > > > > No but used only in java mode. In script - catalina.sh|bat you
> > can
> > > > ude
> > > > > > env
> > > > > > > var CATALINA_OPTS or setenv.sh|bat
> > > > > > > Le 11 août 2015 00:53, "Yann Blazart" <ya...@bycode.fr>
> a
> > > > > écrit :
> > > > > > >
> > > > > > > > hmmm.  this option seems to have disapperead in tomee 7
> > > > > > > > Le 10 août 2015 19:21, "Romain Manni-Bucau" <
> > > rmannibucau@gmail.com
> > > > >
> > > > > a
> > > > > > > > écrit :
> > > > > > > >
> > > > > > > > > use keepServerXmlAsthis I think during build phase
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Romain Manni-Bucau
> > > > > > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > > > > https://github.com/rmannibucau> |
> > > > > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> |
> > > Tomitriber
> > > > > > > > > <http://www.tomitribe.com>
> > > > > > > > >
> > > > > > > > > 2015-08-10 10:19 GMT-07:00 Yann Blazart <
> > > yann.blazart@bycode.fr
> > > > >:
> > > > > > > > >
> > > > > > > > > > it does'nt work.  it's before.  i can't provide
> server.xml
> > > with
> > > > > > vars.
> > > > > > > > > > tomee:exec fail.
> > > > > > > > > > Le 10 août 2015 19:11, "Romain Manni-Bucau" <
> > > > > rmannibucau@gmail.com
> > > > > > >
> > > > > > > a
> > > > > > > > > > écrit :
> > > > > > > > > >
> > > > > > > > > > > Hi Yann,
> > > > > > > > > > >
> > > > > > > > > > > you should be able to use
> > > > > > > > > "-DadditionalSystemProperties=-Dhttp.port=1080
> > > > > > > > > > > -Dhttps.port=1443"
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Romain Manni-Bucau
> > > > > > > > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > > > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > > > > > > https://github.com/rmannibucau> |
> > > > > > > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> |
> > > > > Tomitriber
> > > > > > > > > > > <http://www.tomitribe.com>
> > > > > > > > > > >
> > > > > > > > > > > 2015-08-10 10:08 GMT-07:00 Yann Blazart <
> > > > > yann.blazart@bycode.fr
> > > > > > >:
> > > > > > > > > > >
> > > > > > > > > > > > Hello, currently I'm trying to make packing to
> deliver
> > > > TomEE
> > > > > > and
> > > > > > > > Apps
> > > > > > > > > > in
> > > > > > > > > > > > production as One Jar to run with tomee:exec.
> > > > > > > > > > > > The only way I found to permit to the production team
> > to
> > > > > > > configure
> > > > > > > > > > > > resources is to make them write a tomee.xml and
> provide
> > > its
> > > > > > path
> > > > > > > by
> > > > > > > > > > using
> > > > > > > > > > > > the
> > -DadditionalSystemProperties=-Dopenejb.conf.file=...
> > > > > > > > > > > >
> > > > > > > > > > > > Well done, but to configure the http listening port,
> I
> > > > > > followed a
> > > > > > > > > blog
> > > > > > > > > > > post
> > > > > > > > > > > > from Romain.
> > > > > > > > > > > >
> > > > > > > > > > > > in the blog article 50 shades of tomee, Romain has
> > > written
> > > > > that
> > > > > > > we
> > > > > > > > > > could
> > > > > > > > > > > > use tomee:exec to generate the big jar and pass some
> > vars
> > > > to
> > > > > > the
> > > > > > > > next
> > > > > > > > > > > java
> > > > > > > > > > > > command, to launch tomee, to override some values. In
> > his
> > > > > > example
> > > > > > > > he
> > > > > > > > > > say
> > > > > > > > > > > > that he can override the http.port in server.xml.
> > Great !
> > > > > > > > > > > >
> > > > > > > > > > > > But in fact, while I'm providing a server.xml with
> the
> > > > > > > ${http.port}
> > > > > > > > > in
> > > > > > > > > > > the
> > > > > > > > > > > > connector for the tomcat, the tomee:exec fail because
> > of
> > > an
> > > > > > > > > > > > NumberFormatException.
> > > > > > > > > > > >
> > > > > > > > > > > > The plugin tomee try to get the value from  the
> > provided
> > > > > > > > server.xml,
> > > > > > > > > > with
> > > > > > > > > > > > pain of course in this case.
> > > > > > > > > > > >
> > > > > > > > > > > > Is it possible to fix it ? I can't clearly see the
> > > impacts
> > > > on
> > > > > > the
> > > > > > > > > other
> > > > > > > > > > > > goals of the mojo if I change the code.
> > > > > > > > > > > >
> > > > > > > > > > > > Does anybody have an idea ?
> > > > > > > > > > > >
> > > > > > > > > > > > Thanks a lot.
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: mvn tomee:exec and vars in server.xml

Posted by Yann Blazart <ya...@bycode.fr>.
Yop perhaps.

But all the code of the Mojo is build to use these fields (tomeeHttpPort
for example).
I writed my code while trying to let all other things working.
Le 11 août 2015 16:17, "Romain Manni-Bucau" <rm...@gmail.com> a
écrit :

> if you pass system variable run should get them automatically, that said
> the gain for run is ver poor since you already have the http port maven
> property to switch it.
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2015-08-11 7:13 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
>
> > Yep, but with tomee:run ?
> >
> > I think this code was here for this goal, typically to get back the
> > communications ports in the Mojo.
> > For example, in  AbstractCommandMojo, and run goal in AbstractTomEEMojo.
> >
> > My patch is working in theses cases.
> > Le 11 août 2015 16:09, "Romain Manni-Bucau" <rm...@gmail.com> a
> > écrit :
> >
> > > Think we will just use strings for ports, using placeholders is not
> > needed
> > > at build time since you can already force the ports on mvn command
> line.
> > > But using placeholder filled at run time does :).
> > >
> > >
> > > Romain Manni-Bucau
> > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > <http://rmannibucau.wordpress.com> | Github <
> > > https://github.com/rmannibucau> |
> > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > <http://www.tomitribe.com>
> > >
> > > 2015-08-11 6:51 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> > >
> > > > Check my patch :  TOMEE-1626.
> > > >
> > > > With it, it will be cool with tomee:run for dev and tomee:exec for
> > > > delivering.
> > > > Le 11 août 2015 15:49, "Romain Manni-Bucau" <rm...@gmail.com>
> a
> > > > écrit :
> > > >
> > > > > Ah yeah, ports should be strings.
> > > > > Le 11 août 2015 06:37, "Yann Blazart" <ya...@bycode.fr> a
> > > écrit :
> > > > >
> > > > > > well romain,  I think I wasn't enought clear about what I did
> mean.
> > > > > >
> > > > > > Ok, the problem come from AbstractTomEEMojo,  in the
> > > > > > alignConfigOnServerXmlCurrentConfig.
> > > > > >
> > > > > > The goal of this method, call in exec(), is to get values from
> the
> > > > > > generated server.xml to get it back in fields of the mojo. I
> think
> > > this
> > > > > is
> > > > > > certainly for RunMojo, but the Integer.parseInt of ${http.port}
> of
> > > > course
> > > > > > failed ! :)
> > > > > >
> > > > > > Well, I worked on it, I'm about to post a patch on ASF JIRA, I
> you
> > > > would
> > > > > > like to check it as soon as possible ;)
> > > > > > No but used only in java mode. In script - catalina.sh|bat you
> can
> > > ude
> > > > > env
> > > > > > var CATALINA_OPTS or setenv.sh|bat
> > > > > > Le 11 août 2015 00:53, "Yann Blazart" <ya...@bycode.fr> a
> > > > écrit :
> > > > > >
> > > > > > > hmmm.  this option seems to have disapperead in tomee 7
> > > > > > > Le 10 août 2015 19:21, "Romain Manni-Bucau" <
> > rmannibucau@gmail.com
> > > >
> > > > a
> > > > > > > écrit :
> > > > > > >
> > > > > > > > use keepServerXmlAsthis I think during build phase
> > > > > > > >
> > > > > > > >
> > > > > > > > Romain Manni-Bucau
> > > > > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > > > https://github.com/rmannibucau> |
> > > > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> |
> > Tomitriber
> > > > > > > > <http://www.tomitribe.com>
> > > > > > > >
> > > > > > > > 2015-08-10 10:19 GMT-07:00 Yann Blazart <
> > yann.blazart@bycode.fr
> > > >:
> > > > > > > >
> > > > > > > > > it does'nt work.  it's before.  i can't provide server.xml
> > with
> > > > > vars.
> > > > > > > > > tomee:exec fail.
> > > > > > > > > Le 10 août 2015 19:11, "Romain Manni-Bucau" <
> > > > rmannibucau@gmail.com
> > > > > >
> > > > > > a
> > > > > > > > > écrit :
> > > > > > > > >
> > > > > > > > > > Hi Yann,
> > > > > > > > > >
> > > > > > > > > > you should be able to use
> > > > > > > > "-DadditionalSystemProperties=-Dhttp.port=1080
> > > > > > > > > > -Dhttps.port=1443"
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Romain Manni-Bucau
> > > > > > > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > > > > > https://github.com/rmannibucau> |
> > > > > > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> |
> > > > Tomitriber
> > > > > > > > > > <http://www.tomitribe.com>
> > > > > > > > > >
> > > > > > > > > > 2015-08-10 10:08 GMT-07:00 Yann Blazart <
> > > > yann.blazart@bycode.fr
> > > > > >:
> > > > > > > > > >
> > > > > > > > > > > Hello, currently I'm trying to make packing to deliver
> > > TomEE
> > > > > and
> > > > > > > Apps
> > > > > > > > > in
> > > > > > > > > > > production as One Jar to run with tomee:exec.
> > > > > > > > > > > The only way I found to permit to the production team
> to
> > > > > > configure
> > > > > > > > > > > resources is to make them write a tomee.xml and provide
> > its
> > > > > path
> > > > > > by
> > > > > > > > > using
> > > > > > > > > > > the
> -DadditionalSystemProperties=-Dopenejb.conf.file=...
> > > > > > > > > > >
> > > > > > > > > > > Well done, but to configure the http listening port, I
> > > > > followed a
> > > > > > > > blog
> > > > > > > > > > post
> > > > > > > > > > > from Romain.
> > > > > > > > > > >
> > > > > > > > > > > in the blog article 50 shades of tomee, Romain has
> > written
> > > > that
> > > > > > we
> > > > > > > > > could
> > > > > > > > > > > use tomee:exec to generate the big jar and pass some
> vars
> > > to
> > > > > the
> > > > > > > next
> > > > > > > > > > java
> > > > > > > > > > > command, to launch tomee, to override some values. In
> his
> > > > > example
> > > > > > > he
> > > > > > > > > say
> > > > > > > > > > > that he can override the http.port in server.xml.
> Great !
> > > > > > > > > > >
> > > > > > > > > > > But in fact, while I'm providing a server.xml with the
> > > > > > ${http.port}
> > > > > > > > in
> > > > > > > > > > the
> > > > > > > > > > > connector for the tomcat, the tomee:exec fail because
> of
> > an
> > > > > > > > > > > NumberFormatException.
> > > > > > > > > > >
> > > > > > > > > > > The plugin tomee try to get the value from  the
> provided
> > > > > > > server.xml,
> > > > > > > > > with
> > > > > > > > > > > pain of course in this case.
> > > > > > > > > > >
> > > > > > > > > > > Is it possible to fix it ? I can't clearly see the
> > impacts
> > > on
> > > > > the
> > > > > > > > other
> > > > > > > > > > > goals of the mojo if I change the code.
> > > > > > > > > > >
> > > > > > > > > > > Does anybody have an idea ?
> > > > > > > > > > >
> > > > > > > > > > > Thanks a lot.
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: mvn tomee:exec and vars in server.xml

Posted by Romain Manni-Bucau <rm...@gmail.com>.
if you pass system variable run should get them automatically, that said
the gain for run is ver poor since you already have the http port maven
property to switch it.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-08-11 7:13 GMT-07:00 Yann Blazart <ya...@bycode.fr>:

> Yep, but with tomee:run ?
>
> I think this code was here for this goal, typically to get back the
> communications ports in the Mojo.
> For example, in  AbstractCommandMojo, and run goal in AbstractTomEEMojo.
>
> My patch is working in theses cases.
> Le 11 août 2015 16:09, "Romain Manni-Bucau" <rm...@gmail.com> a
> écrit :
>
> > Think we will just use strings for ports, using placeholders is not
> needed
> > at build time since you can already force the ports on mvn command line.
> > But using placeholder filled at run time does :).
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > <http://www.tomitribe.com>
> >
> > 2015-08-11 6:51 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> >
> > > Check my patch :  TOMEE-1626.
> > >
> > > With it, it will be cool with tomee:run for dev and tomee:exec for
> > > delivering.
> > > Le 11 août 2015 15:49, "Romain Manni-Bucau" <rm...@gmail.com> a
> > > écrit :
> > >
> > > > Ah yeah, ports should be strings.
> > > > Le 11 août 2015 06:37, "Yann Blazart" <ya...@bycode.fr> a
> > écrit :
> > > >
> > > > > well romain,  I think I wasn't enought clear about what I did mean.
> > > > >
> > > > > Ok, the problem come from AbstractTomEEMojo,  in the
> > > > > alignConfigOnServerXmlCurrentConfig.
> > > > >
> > > > > The goal of this method, call in exec(), is to get values from the
> > > > > generated server.xml to get it back in fields of the mojo. I think
> > this
> > > > is
> > > > > certainly for RunMojo, but the Integer.parseInt of ${http.port} of
> > > course
> > > > > failed ! :)
> > > > >
> > > > > Well, I worked on it, I'm about to post a patch on ASF JIRA, I you
> > > would
> > > > > like to check it as soon as possible ;)
> > > > > No but used only in java mode. In script - catalina.sh|bat you can
> > ude
> > > > env
> > > > > var CATALINA_OPTS or setenv.sh|bat
> > > > > Le 11 août 2015 00:53, "Yann Blazart" <ya...@bycode.fr> a
> > > écrit :
> > > > >
> > > > > > hmmm.  this option seems to have disapperead in tomee 7
> > > > > > Le 10 août 2015 19:21, "Romain Manni-Bucau" <
> rmannibucau@gmail.com
> > >
> > > a
> > > > > > écrit :
> > > > > >
> > > > > > > use keepServerXmlAsthis I think during build phase
> > > > > > >
> > > > > > >
> > > > > > > Romain Manni-Bucau
> > > > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > > https://github.com/rmannibucau> |
> > > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> |
> Tomitriber
> > > > > > > <http://www.tomitribe.com>
> > > > > > >
> > > > > > > 2015-08-10 10:19 GMT-07:00 Yann Blazart <
> yann.blazart@bycode.fr
> > >:
> > > > > > >
> > > > > > > > it does'nt work.  it's before.  i can't provide server.xml
> with
> > > > vars.
> > > > > > > > tomee:exec fail.
> > > > > > > > Le 10 août 2015 19:11, "Romain Manni-Bucau" <
> > > rmannibucau@gmail.com
> > > > >
> > > > > a
> > > > > > > > écrit :
> > > > > > > >
> > > > > > > > > Hi Yann,
> > > > > > > > >
> > > > > > > > > you should be able to use
> > > > > > > "-DadditionalSystemProperties=-Dhttp.port=1080
> > > > > > > > > -Dhttps.port=1443"
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Romain Manni-Bucau
> > > > > > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > > > > https://github.com/rmannibucau> |
> > > > > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> |
> > > Tomitriber
> > > > > > > > > <http://www.tomitribe.com>
> > > > > > > > >
> > > > > > > > > 2015-08-10 10:08 GMT-07:00 Yann Blazart <
> > > yann.blazart@bycode.fr
> > > > >:
> > > > > > > > >
> > > > > > > > > > Hello, currently I'm trying to make packing to deliver
> > TomEE
> > > > and
> > > > > > Apps
> > > > > > > > in
> > > > > > > > > > production as One Jar to run with tomee:exec.
> > > > > > > > > > The only way I found to permit to the production team to
> > > > > configure
> > > > > > > > > > resources is to make them write a tomee.xml and provide
> its
> > > > path
> > > > > by
> > > > > > > > using
> > > > > > > > > > the -DadditionalSystemProperties=-Dopenejb.conf.file=...
> > > > > > > > > >
> > > > > > > > > > Well done, but to configure the http listening port, I
> > > > followed a
> > > > > > > blog
> > > > > > > > > post
> > > > > > > > > > from Romain.
> > > > > > > > > >
> > > > > > > > > > in the blog article 50 shades of tomee, Romain has
> written
> > > that
> > > > > we
> > > > > > > > could
> > > > > > > > > > use tomee:exec to generate the big jar and pass some vars
> > to
> > > > the
> > > > > > next
> > > > > > > > > java
> > > > > > > > > > command, to launch tomee, to override some values. In his
> > > > example
> > > > > > he
> > > > > > > > say
> > > > > > > > > > that he can override the http.port in server.xml. Great !
> > > > > > > > > >
> > > > > > > > > > But in fact, while I'm providing a server.xml with the
> > > > > ${http.port}
> > > > > > > in
> > > > > > > > > the
> > > > > > > > > > connector for the tomcat, the tomee:exec fail because of
> an
> > > > > > > > > > NumberFormatException.
> > > > > > > > > >
> > > > > > > > > > The plugin tomee try to get the value from  the provided
> > > > > > server.xml,
> > > > > > > > with
> > > > > > > > > > pain of course in this case.
> > > > > > > > > >
> > > > > > > > > > Is it possible to fix it ? I can't clearly see the
> impacts
> > on
> > > > the
> > > > > > > other
> > > > > > > > > > goals of the mojo if I change the code.
> > > > > > > > > >
> > > > > > > > > > Does anybody have an idea ?
> > > > > > > > > >
> > > > > > > > > > Thanks a lot.
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: mvn tomee:exec and vars in server.xml

Posted by Yann Blazart <ya...@bycode.fr>.
Yep, but with tomee:run ?

I think this code was here for this goal, typically to get back the
communications ports in the Mojo.
For example, in  AbstractCommandMojo, and run goal in AbstractTomEEMojo.

My patch is working in theses cases.
Le 11 août 2015 16:09, "Romain Manni-Bucau" <rm...@gmail.com> a
écrit :

> Think we will just use strings for ports, using placeholders is not needed
> at build time since you can already force the ports on mvn command line.
> But using placeholder filled at run time does :).
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2015-08-11 6:51 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
>
> > Check my patch :  TOMEE-1626.
> >
> > With it, it will be cool with tomee:run for dev and tomee:exec for
> > delivering.
> > Le 11 août 2015 15:49, "Romain Manni-Bucau" <rm...@gmail.com> a
> > écrit :
> >
> > > Ah yeah, ports should be strings.
> > > Le 11 août 2015 06:37, "Yann Blazart" <ya...@bycode.fr> a
> écrit :
> > >
> > > > well romain,  I think I wasn't enought clear about what I did mean.
> > > >
> > > > Ok, the problem come from AbstractTomEEMojo,  in the
> > > > alignConfigOnServerXmlCurrentConfig.
> > > >
> > > > The goal of this method, call in exec(), is to get values from the
> > > > generated server.xml to get it back in fields of the mojo. I think
> this
> > > is
> > > > certainly for RunMojo, but the Integer.parseInt of ${http.port} of
> > course
> > > > failed ! :)
> > > >
> > > > Well, I worked on it, I'm about to post a patch on ASF JIRA, I you
> > would
> > > > like to check it as soon as possible ;)
> > > > No but used only in java mode. In script - catalina.sh|bat you can
> ude
> > > env
> > > > var CATALINA_OPTS or setenv.sh|bat
> > > > Le 11 août 2015 00:53, "Yann Blazart" <ya...@bycode.fr> a
> > écrit :
> > > >
> > > > > hmmm.  this option seems to have disapperead in tomee 7
> > > > > Le 10 août 2015 19:21, "Romain Manni-Bucau" <rmannibucau@gmail.com
> >
> > a
> > > > > écrit :
> > > > >
> > > > > > use keepServerXmlAsthis I think during build phase
> > > > > >
> > > > > >
> > > > > > Romain Manni-Bucau
> > > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > https://github.com/rmannibucau> |
> > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > > > <http://www.tomitribe.com>
> > > > > >
> > > > > > 2015-08-10 10:19 GMT-07:00 Yann Blazart <yann.blazart@bycode.fr
> >:
> > > > > >
> > > > > > > it does'nt work.  it's before.  i can't provide server.xml with
> > > vars.
> > > > > > > tomee:exec fail.
> > > > > > > Le 10 août 2015 19:11, "Romain Manni-Bucau" <
> > rmannibucau@gmail.com
> > > >
> > > > a
> > > > > > > écrit :
> > > > > > >
> > > > > > > > Hi Yann,
> > > > > > > >
> > > > > > > > you should be able to use
> > > > > > "-DadditionalSystemProperties=-Dhttp.port=1080
> > > > > > > > -Dhttps.port=1443"
> > > > > > > >
> > > > > > > >
> > > > > > > > Romain Manni-Bucau
> > > > > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > > > https://github.com/rmannibucau> |
> > > > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> |
> > Tomitriber
> > > > > > > > <http://www.tomitribe.com>
> > > > > > > >
> > > > > > > > 2015-08-10 10:08 GMT-07:00 Yann Blazart <
> > yann.blazart@bycode.fr
> > > >:
> > > > > > > >
> > > > > > > > > Hello, currently I'm trying to make packing to deliver
> TomEE
> > > and
> > > > > Apps
> > > > > > > in
> > > > > > > > > production as One Jar to run with tomee:exec.
> > > > > > > > > The only way I found to permit to the production team to
> > > > configure
> > > > > > > > > resources is to make them write a tomee.xml and provide its
> > > path
> > > > by
> > > > > > > using
> > > > > > > > > the -DadditionalSystemProperties=-Dopenejb.conf.file=...
> > > > > > > > >
> > > > > > > > > Well done, but to configure the http listening port, I
> > > followed a
> > > > > > blog
> > > > > > > > post
> > > > > > > > > from Romain.
> > > > > > > > >
> > > > > > > > > in the blog article 50 shades of tomee, Romain has written
> > that
> > > > we
> > > > > > > could
> > > > > > > > > use tomee:exec to generate the big jar and pass some vars
> to
> > > the
> > > > > next
> > > > > > > > java
> > > > > > > > > command, to launch tomee, to override some values. In his
> > > example
> > > > > he
> > > > > > > say
> > > > > > > > > that he can override the http.port in server.xml. Great !
> > > > > > > > >
> > > > > > > > > But in fact, while I'm providing a server.xml with the
> > > > ${http.port}
> > > > > > in
> > > > > > > > the
> > > > > > > > > connector for the tomcat, the tomee:exec fail because of an
> > > > > > > > > NumberFormatException.
> > > > > > > > >
> > > > > > > > > The plugin tomee try to get the value from  the provided
> > > > > server.xml,
> > > > > > > with
> > > > > > > > > pain of course in this case.
> > > > > > > > >
> > > > > > > > > Is it possible to fix it ? I can't clearly see the impacts
> on
> > > the
> > > > > > other
> > > > > > > > > goals of the mojo if I change the code.
> > > > > > > > >
> > > > > > > > > Does anybody have an idea ?
> > > > > > > > >
> > > > > > > > > Thanks a lot.
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: mvn tomee:exec and vars in server.xml

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Think we will just use strings for ports, using placeholders is not needed
at build time since you can already force the ports on mvn command line.
But using placeholder filled at run time does :).


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-08-11 6:51 GMT-07:00 Yann Blazart <ya...@bycode.fr>:

> Check my patch :  TOMEE-1626.
>
> With it, it will be cool with tomee:run for dev and tomee:exec for
> delivering.
> Le 11 août 2015 15:49, "Romain Manni-Bucau" <rm...@gmail.com> a
> écrit :
>
> > Ah yeah, ports should be strings.
> > Le 11 août 2015 06:37, "Yann Blazart" <ya...@bycode.fr> a écrit :
> >
> > > well romain,  I think I wasn't enought clear about what I did mean.
> > >
> > > Ok, the problem come from AbstractTomEEMojo,  in the
> > > alignConfigOnServerXmlCurrentConfig.
> > >
> > > The goal of this method, call in exec(), is to get values from the
> > > generated server.xml to get it back in fields of the mojo. I think this
> > is
> > > certainly for RunMojo, but the Integer.parseInt of ${http.port} of
> course
> > > failed ! :)
> > >
> > > Well, I worked on it, I'm about to post a patch on ASF JIRA, I you
> would
> > > like to check it as soon as possible ;)
> > > No but used only in java mode. In script - catalina.sh|bat you can ude
> > env
> > > var CATALINA_OPTS or setenv.sh|bat
> > > Le 11 août 2015 00:53, "Yann Blazart" <ya...@bycode.fr> a
> écrit :
> > >
> > > > hmmm.  this option seems to have disapperead in tomee 7
> > > > Le 10 août 2015 19:21, "Romain Manni-Bucau" <rm...@gmail.com>
> a
> > > > écrit :
> > > >
> > > > > use keepServerXmlAsthis I think during build phase
> > > > >
> > > > >
> > > > > Romain Manni-Bucau
> > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > https://github.com/rmannibucau> |
> > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > > <http://www.tomitribe.com>
> > > > >
> > > > > 2015-08-10 10:19 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> > > > >
> > > > > > it does'nt work.  it's before.  i can't provide server.xml with
> > vars.
> > > > > > tomee:exec fail.
> > > > > > Le 10 août 2015 19:11, "Romain Manni-Bucau" <
> rmannibucau@gmail.com
> > >
> > > a
> > > > > > écrit :
> > > > > >
> > > > > > > Hi Yann,
> > > > > > >
> > > > > > > you should be able to use
> > > > > "-DadditionalSystemProperties=-Dhttp.port=1080
> > > > > > > -Dhttps.port=1443"
> > > > > > >
> > > > > > >
> > > > > > > Romain Manni-Bucau
> > > > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > > https://github.com/rmannibucau> |
> > > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> |
> Tomitriber
> > > > > > > <http://www.tomitribe.com>
> > > > > > >
> > > > > > > 2015-08-10 10:08 GMT-07:00 Yann Blazart <
> yann.blazart@bycode.fr
> > >:
> > > > > > >
> > > > > > > > Hello, currently I'm trying to make packing to deliver TomEE
> > and
> > > > Apps
> > > > > > in
> > > > > > > > production as One Jar to run with tomee:exec.
> > > > > > > > The only way I found to permit to the production team to
> > > configure
> > > > > > > > resources is to make them write a tomee.xml and provide its
> > path
> > > by
> > > > > > using
> > > > > > > > the -DadditionalSystemProperties=-Dopenejb.conf.file=...
> > > > > > > >
> > > > > > > > Well done, but to configure the http listening port, I
> > followed a
> > > > > blog
> > > > > > > post
> > > > > > > > from Romain.
> > > > > > > >
> > > > > > > > in the blog article 50 shades of tomee, Romain has written
> that
> > > we
> > > > > > could
> > > > > > > > use tomee:exec to generate the big jar and pass some vars to
> > the
> > > > next
> > > > > > > java
> > > > > > > > command, to launch tomee, to override some values. In his
> > example
> > > > he
> > > > > > say
> > > > > > > > that he can override the http.port in server.xml. Great !
> > > > > > > >
> > > > > > > > But in fact, while I'm providing a server.xml with the
> > > ${http.port}
> > > > > in
> > > > > > > the
> > > > > > > > connector for the tomcat, the tomee:exec fail because of an
> > > > > > > > NumberFormatException.
> > > > > > > >
> > > > > > > > The plugin tomee try to get the value from  the provided
> > > > server.xml,
> > > > > > with
> > > > > > > > pain of course in this case.
> > > > > > > >
> > > > > > > > Is it possible to fix it ? I can't clearly see the impacts on
> > the
> > > > > other
> > > > > > > > goals of the mojo if I change the code.
> > > > > > > >
> > > > > > > > Does anybody have an idea ?
> > > > > > > >
> > > > > > > > Thanks a lot.
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: mvn tomee:exec and vars in server.xml

Posted by Yann Blazart <ya...@bycode.fr>.
Check my patch :  TOMEE-1626.

With it, it will be cool with tomee:run for dev and tomee:exec for
delivering.
Le 11 août 2015 15:49, "Romain Manni-Bucau" <rm...@gmail.com> a
écrit :

> Ah yeah, ports should be strings.
> Le 11 août 2015 06:37, "Yann Blazart" <ya...@bycode.fr> a écrit :
>
> > well romain,  I think I wasn't enought clear about what I did mean.
> >
> > Ok, the problem come from AbstractTomEEMojo,  in the
> > alignConfigOnServerXmlCurrentConfig.
> >
> > The goal of this method, call in exec(), is to get values from the
> > generated server.xml to get it back in fields of the mojo. I think this
> is
> > certainly for RunMojo, but the Integer.parseInt of ${http.port} of course
> > failed ! :)
> >
> > Well, I worked on it, I'm about to post a patch on ASF JIRA, I you would
> > like to check it as soon as possible ;)
> > No but used only in java mode. In script - catalina.sh|bat you can ude
> env
> > var CATALINA_OPTS or setenv.sh|bat
> > Le 11 août 2015 00:53, "Yann Blazart" <ya...@bycode.fr> a écrit :
> >
> > > hmmm.  this option seems to have disapperead in tomee 7
> > > Le 10 août 2015 19:21, "Romain Manni-Bucau" <rm...@gmail.com> a
> > > écrit :
> > >
> > > > use keepServerXmlAsthis I think during build phase
> > > >
> > > >
> > > > Romain Manni-Bucau
> > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > <http://rmannibucau.wordpress.com> | Github <
> > > > https://github.com/rmannibucau> |
> > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > <http://www.tomitribe.com>
> > > >
> > > > 2015-08-10 10:19 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> > > >
> > > > > it does'nt work.  it's before.  i can't provide server.xml with
> vars.
> > > > > tomee:exec fail.
> > > > > Le 10 août 2015 19:11, "Romain Manni-Bucau" <rmannibucau@gmail.com
> >
> > a
> > > > > écrit :
> > > > >
> > > > > > Hi Yann,
> > > > > >
> > > > > > you should be able to use
> > > > "-DadditionalSystemProperties=-Dhttp.port=1080
> > > > > > -Dhttps.port=1443"
> > > > > >
> > > > > >
> > > > > > Romain Manni-Bucau
> > > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > https://github.com/rmannibucau> |
> > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > > > <http://www.tomitribe.com>
> > > > > >
> > > > > > 2015-08-10 10:08 GMT-07:00 Yann Blazart <yann.blazart@bycode.fr
> >:
> > > > > >
> > > > > > > Hello, currently I'm trying to make packing to deliver TomEE
> and
> > > Apps
> > > > > in
> > > > > > > production as One Jar to run with tomee:exec.
> > > > > > > The only way I found to permit to the production team to
> > configure
> > > > > > > resources is to make them write a tomee.xml and provide its
> path
> > by
> > > > > using
> > > > > > > the -DadditionalSystemProperties=-Dopenejb.conf.file=...
> > > > > > >
> > > > > > > Well done, but to configure the http listening port, I
> followed a
> > > > blog
> > > > > > post
> > > > > > > from Romain.
> > > > > > >
> > > > > > > in the blog article 50 shades of tomee, Romain has written that
> > we
> > > > > could
> > > > > > > use tomee:exec to generate the big jar and pass some vars to
> the
> > > next
> > > > > > java
> > > > > > > command, to launch tomee, to override some values. In his
> example
> > > he
> > > > > say
> > > > > > > that he can override the http.port in server.xml. Great !
> > > > > > >
> > > > > > > But in fact, while I'm providing a server.xml with the
> > ${http.port}
> > > > in
> > > > > > the
> > > > > > > connector for the tomcat, the tomee:exec fail because of an
> > > > > > > NumberFormatException.
> > > > > > >
> > > > > > > The plugin tomee try to get the value from  the provided
> > > server.xml,
> > > > > with
> > > > > > > pain of course in this case.
> > > > > > >
> > > > > > > Is it possible to fix it ? I can't clearly see the impacts on
> the
> > > > other
> > > > > > > goals of the mojo if I change the code.
> > > > > > >
> > > > > > > Does anybody have an idea ?
> > > > > > >
> > > > > > > Thanks a lot.
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: mvn tomee:exec and vars in server.xml

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Ah yeah, ports should be strings.
Le 11 août 2015 06:37, "Yann Blazart" <ya...@bycode.fr> a écrit :

> well romain,  I think I wasn't enought clear about what I did mean.
>
> Ok, the problem come from AbstractTomEEMojo,  in the
> alignConfigOnServerXmlCurrentConfig.
>
> The goal of this method, call in exec(), is to get values from the
> generated server.xml to get it back in fields of the mojo. I think this is
> certainly for RunMojo, but the Integer.parseInt of ${http.port} of course
> failed ! :)
>
> Well, I worked on it, I'm about to post a patch on ASF JIRA, I you would
> like to check it as soon as possible ;)
> No but used only in java mode. In script - catalina.sh|bat you can ude env
> var CATALINA_OPTS or setenv.sh|bat
> Le 11 août 2015 00:53, "Yann Blazart" <ya...@bycode.fr> a écrit :
>
> > hmmm.  this option seems to have disapperead in tomee 7
> > Le 10 août 2015 19:21, "Romain Manni-Bucau" <rm...@gmail.com> a
> > écrit :
> >
> > > use keepServerXmlAsthis I think during build phase
> > >
> > >
> > > Romain Manni-Bucau
> > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > <http://rmannibucau.wordpress.com> | Github <
> > > https://github.com/rmannibucau> |
> > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > <http://www.tomitribe.com>
> > >
> > > 2015-08-10 10:19 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> > >
> > > > it does'nt work.  it's before.  i can't provide server.xml with vars.
> > > > tomee:exec fail.
> > > > Le 10 août 2015 19:11, "Romain Manni-Bucau" <rm...@gmail.com>
> a
> > > > écrit :
> > > >
> > > > > Hi Yann,
> > > > >
> > > > > you should be able to use
> > > "-DadditionalSystemProperties=-Dhttp.port=1080
> > > > > -Dhttps.port=1443"
> > > > >
> > > > >
> > > > > Romain Manni-Bucau
> > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > https://github.com/rmannibucau> |
> > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > > <http://www.tomitribe.com>
> > > > >
> > > > > 2015-08-10 10:08 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> > > > >
> > > > > > Hello, currently I'm trying to make packing to deliver TomEE and
> > Apps
> > > > in
> > > > > > production as One Jar to run with tomee:exec.
> > > > > > The only way I found to permit to the production team to
> configure
> > > > > > resources is to make them write a tomee.xml and provide its path
> by
> > > > using
> > > > > > the -DadditionalSystemProperties=-Dopenejb.conf.file=...
> > > > > >
> > > > > > Well done, but to configure the http listening port, I followed a
> > > blog
> > > > > post
> > > > > > from Romain.
> > > > > >
> > > > > > in the blog article 50 shades of tomee, Romain has written that
> we
> > > > could
> > > > > > use tomee:exec to generate the big jar and pass some vars to the
> > next
> > > > > java
> > > > > > command, to launch tomee, to override some values. In his example
> > he
> > > > say
> > > > > > that he can override the http.port in server.xml. Great !
> > > > > >
> > > > > > But in fact, while I'm providing a server.xml with the
> ${http.port}
> > > in
> > > > > the
> > > > > > connector for the tomcat, the tomee:exec fail because of an
> > > > > > NumberFormatException.
> > > > > >
> > > > > > The plugin tomee try to get the value from  the provided
> > server.xml,
> > > > with
> > > > > > pain of course in this case.
> > > > > >
> > > > > > Is it possible to fix it ? I can't clearly see the impacts on the
> > > other
> > > > > > goals of the mojo if I change the code.
> > > > > >
> > > > > > Does anybody have an idea ?
> > > > > >
> > > > > > Thanks a lot.
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: mvn tomee:exec and vars in server.xml

Posted by Yann Blazart <ya...@bycode.fr>.
well romain,  I think I wasn't enought clear about what I did mean.

Ok, the problem come from AbstractTomEEMojo,  in the
alignConfigOnServerXmlCurrentConfig.

The goal of this method, call in exec(), is to get values from the
generated server.xml to get it back in fields of the mojo. I think this is
certainly for RunMojo, but the Integer.parseInt of ${http.port} of course
failed ! :)

Well, I worked on it, I'm about to post a patch on ASF JIRA, I you would
like to check it as soon as possible ;)
No but used only in java mode. In script - catalina.sh|bat you can ude env
var CATALINA_OPTS or setenv.sh|bat
Le 11 août 2015 00:53, "Yann Blazart" <ya...@bycode.fr> a écrit :

> hmmm.  this option seems to have disapperead in tomee 7
> Le 10 août 2015 19:21, "Romain Manni-Bucau" <rm...@gmail.com> a
> écrit :
>
> > use keepServerXmlAsthis I think during build phase
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > <http://www.tomitribe.com>
> >
> > 2015-08-10 10:19 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> >
> > > it does'nt work.  it's before.  i can't provide server.xml with vars.
> > > tomee:exec fail.
> > > Le 10 août 2015 19:11, "Romain Manni-Bucau" <rm...@gmail.com> a
> > > écrit :
> > >
> > > > Hi Yann,
> > > >
> > > > you should be able to use
> > "-DadditionalSystemProperties=-Dhttp.port=1080
> > > > -Dhttps.port=1443"
> > > >
> > > >
> > > > Romain Manni-Bucau
> > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > <http://rmannibucau.wordpress.com> | Github <
> > > > https://github.com/rmannibucau> |
> > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > <http://www.tomitribe.com>
> > > >
> > > > 2015-08-10 10:08 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> > > >
> > > > > Hello, currently I'm trying to make packing to deliver TomEE and
> Apps
> > > in
> > > > > production as One Jar to run with tomee:exec.
> > > > > The only way I found to permit to the production team to configure
> > > > > resources is to make them write a tomee.xml and provide its path
by
> > > using
> > > > > the -DadditionalSystemProperties=-Dopenejb.conf.file=...
> > > > >
> > > > > Well done, but to configure the http listening port, I followed a
> > blog
> > > > post
> > > > > from Romain.
> > > > >
> > > > > in the blog article 50 shades of tomee, Romain has written that we
> > > could
> > > > > use tomee:exec to generate the big jar and pass some vars to the
> next
> > > > java
> > > > > command, to launch tomee, to override some values. In his example
> he
> > > say
> > > > > that he can override the http.port in server.xml. Great !
> > > > >
> > > > > But in fact, while I'm providing a server.xml with the
${http.port}
> > in
> > > > the
> > > > > connector for the tomcat, the tomee:exec fail because of an
> > > > > NumberFormatException.
> > > > >
> > > > > The plugin tomee try to get the value from  the provided
> server.xml,
> > > with
> > > > > pain of course in this case.
> > > > >
> > > > > Is it possible to fix it ? I can't clearly see the impacts on the
> > other
> > > > > goals of the mojo if I change the code.
> > > > >
> > > > > Does anybody have an idea ?
> > > > >
> > > > > Thanks a lot.
> > > > >
> > > >
> > >
> >
>

Re: mvn tomee:exec and vars in server.xml

Posted by Romain Manni-Bucau <rm...@gmail.com>.
No but used only in java mode. In script - catalina.sh|bat you can ude env
var CATALINA_OPTS or setenv.sh|bat
Le 11 août 2015 00:53, "Yann Blazart" <ya...@bycode.fr> a écrit :

> hmmm.  this option seems to have disapperead in tomee 7
> Le 10 août 2015 19:21, "Romain Manni-Bucau" <rm...@gmail.com> a
> écrit :
>
> > use keepServerXmlAsthis I think during build phase
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > <http://www.tomitribe.com>
> >
> > 2015-08-10 10:19 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> >
> > > it does'nt work.  it's before.  i can't provide server.xml with vars.
> > > tomee:exec fail.
> > > Le 10 août 2015 19:11, "Romain Manni-Bucau" <rm...@gmail.com> a
> > > écrit :
> > >
> > > > Hi Yann,
> > > >
> > > > you should be able to use
> > "-DadditionalSystemProperties=-Dhttp.port=1080
> > > > -Dhttps.port=1443"
> > > >
> > > >
> > > > Romain Manni-Bucau
> > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > <http://rmannibucau.wordpress.com> | Github <
> > > > https://github.com/rmannibucau> |
> > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > <http://www.tomitribe.com>
> > > >
> > > > 2015-08-10 10:08 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> > > >
> > > > > Hello, currently I'm trying to make packing to deliver TomEE and
> Apps
> > > in
> > > > > production as One Jar to run with tomee:exec.
> > > > > The only way I found to permit to the production team to configure
> > > > > resources is to make them write a tomee.xml and provide its path by
> > > using
> > > > > the -DadditionalSystemProperties=-Dopenejb.conf.file=...
> > > > >
> > > > > Well done, but to configure the http listening port, I followed a
> > blog
> > > > post
> > > > > from Romain.
> > > > >
> > > > > in the blog article 50 shades of tomee, Romain has written that we
> > > could
> > > > > use tomee:exec to generate the big jar and pass some vars to the
> next
> > > > java
> > > > > command, to launch tomee, to override some values. In his example
> he
> > > say
> > > > > that he can override the http.port in server.xml. Great !
> > > > >
> > > > > But in fact, while I'm providing a server.xml with the ${http.port}
> > in
> > > > the
> > > > > connector for the tomcat, the tomee:exec fail because of an
> > > > > NumberFormatException.
> > > > >
> > > > > The plugin tomee try to get the value from  the provided
> server.xml,
> > > with
> > > > > pain of course in this case.
> > > > >
> > > > > Is it possible to fix it ? I can't clearly see the impacts on the
> > other
> > > > > goals of the mojo if I change the code.
> > > > >
> > > > > Does anybody have an idea ?
> > > > >
> > > > > Thanks a lot.
> > > > >
> > > >
> > >
> >
>

Re: mvn tomee:exec and vars in server.xml

Posted by Yann Blazart <ya...@bycode.fr>.
hmmm.  this option seems to have disapperead in tomee 7
Le 10 août 2015 19:21, "Romain Manni-Bucau" <rm...@gmail.com> a
écrit :

> use keepServerXmlAsthis I think during build phase
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2015-08-10 10:19 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
>
> > it does'nt work.  it's before.  i can't provide server.xml with vars.
> > tomee:exec fail.
> > Le 10 août 2015 19:11, "Romain Manni-Bucau" <rm...@gmail.com> a
> > écrit :
> >
> > > Hi Yann,
> > >
> > > you should be able to use
> "-DadditionalSystemProperties=-Dhttp.port=1080
> > > -Dhttps.port=1443"
> > >
> > >
> > > Romain Manni-Bucau
> > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > <http://rmannibucau.wordpress.com> | Github <
> > > https://github.com/rmannibucau> |
> > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > <http://www.tomitribe.com>
> > >
> > > 2015-08-10 10:08 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> > >
> > > > Hello, currently I'm trying to make packing to deliver TomEE and Apps
> > in
> > > > production as One Jar to run with tomee:exec.
> > > > The only way I found to permit to the production team to configure
> > > > resources is to make them write a tomee.xml and provide its path by
> > using
> > > > the -DadditionalSystemProperties=-Dopenejb.conf.file=...
> > > >
> > > > Well done, but to configure the http listening port, I followed a
> blog
> > > post
> > > > from Romain.
> > > >
> > > > in the blog article 50 shades of tomee, Romain has written that we
> > could
> > > > use tomee:exec to generate the big jar and pass some vars to the next
> > > java
> > > > command, to launch tomee, to override some values. In his example he
> > say
> > > > that he can override the http.port in server.xml. Great !
> > > >
> > > > But in fact, while I'm providing a server.xml with the ${http.port}
> in
> > > the
> > > > connector for the tomcat, the tomee:exec fail because of an
> > > > NumberFormatException.
> > > >
> > > > The plugin tomee try to get the value from  the provided server.xml,
> > with
> > > > pain of course in this case.
> > > >
> > > > Is it possible to fix it ? I can't clearly see the impacts on the
> other
> > > > goals of the mojo if I change the code.
> > > >
> > > > Does anybody have an idea ?
> > > >
> > > > Thanks a lot.
> > > >
> > >
> >
>

Re: mvn tomee:exec and vars in server.xml

Posted by Romain Manni-Bucau <rm...@gmail.com>.
use keepServerXmlAsthis I think during build phase


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-08-10 10:19 GMT-07:00 Yann Blazart <ya...@bycode.fr>:

> it does'nt work.  it's before.  i can't provide server.xml with vars.
> tomee:exec fail.
> Le 10 août 2015 19:11, "Romain Manni-Bucau" <rm...@gmail.com> a
> écrit :
>
> > Hi Yann,
> >
> > you should be able to use "-DadditionalSystemProperties=-Dhttp.port=1080
> > -Dhttps.port=1443"
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > <http://www.tomitribe.com>
> >
> > 2015-08-10 10:08 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
> >
> > > Hello, currently I'm trying to make packing to deliver TomEE and Apps
> in
> > > production as One Jar to run with tomee:exec.
> > > The only way I found to permit to the production team to configure
> > > resources is to make them write a tomee.xml and provide its path by
> using
> > > the -DadditionalSystemProperties=-Dopenejb.conf.file=...
> > >
> > > Well done, but to configure the http listening port, I followed a blog
> > post
> > > from Romain.
> > >
> > > in the blog article 50 shades of tomee, Romain has written that we
> could
> > > use tomee:exec to generate the big jar and pass some vars to the next
> > java
> > > command, to launch tomee, to override some values. In his example he
> say
> > > that he can override the http.port in server.xml. Great !
> > >
> > > But in fact, while I'm providing a server.xml with the ${http.port} in
> > the
> > > connector for the tomcat, the tomee:exec fail because of an
> > > NumberFormatException.
> > >
> > > The plugin tomee try to get the value from  the provided server.xml,
> with
> > > pain of course in this case.
> > >
> > > Is it possible to fix it ? I can't clearly see the impacts on the other
> > > goals of the mojo if I change the code.
> > >
> > > Does anybody have an idea ?
> > >
> > > Thanks a lot.
> > >
> >
>

Re: mvn tomee:exec and vars in server.xml

Posted by Yann Blazart <ya...@bycode.fr>.
it does'nt work.  it's before.  i can't provide server.xml with vars.
tomee:exec fail.
Le 10 août 2015 19:11, "Romain Manni-Bucau" <rm...@gmail.com> a
écrit :

> Hi Yann,
>
> you should be able to use "-DadditionalSystemProperties=-Dhttp.port=1080
> -Dhttps.port=1443"
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2015-08-10 10:08 GMT-07:00 Yann Blazart <ya...@bycode.fr>:
>
> > Hello, currently I'm trying to make packing to deliver TomEE and Apps in
> > production as One Jar to run with tomee:exec.
> > The only way I found to permit to the production team to configure
> > resources is to make them write a tomee.xml and provide its path by using
> > the -DadditionalSystemProperties=-Dopenejb.conf.file=...
> >
> > Well done, but to configure the http listening port, I followed a blog
> post
> > from Romain.
> >
> > in the blog article 50 shades of tomee, Romain has written that we could
> > use tomee:exec to generate the big jar and pass some vars to the next
> java
> > command, to launch tomee, to override some values. In his example he say
> > that he can override the http.port in server.xml. Great !
> >
> > But in fact, while I'm providing a server.xml with the ${http.port} in
> the
> > connector for the tomcat, the tomee:exec fail because of an
> > NumberFormatException.
> >
> > The plugin tomee try to get the value from  the provided server.xml, with
> > pain of course in this case.
> >
> > Is it possible to fix it ? I can't clearly see the impacts on the other
> > goals of the mojo if I change the code.
> >
> > Does anybody have an idea ?
> >
> > Thanks a lot.
> >
>

Re: mvn tomee:exec and vars in server.xml

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Yann,

you should be able to use "-DadditionalSystemProperties=-Dhttp.port=1080
-Dhttps.port=1443"


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-08-10 10:08 GMT-07:00 Yann Blazart <ya...@bycode.fr>:

> Hello, currently I'm trying to make packing to deliver TomEE and Apps in
> production as One Jar to run with tomee:exec.
> The only way I found to permit to the production team to configure
> resources is to make them write a tomee.xml and provide its path by using
> the -DadditionalSystemProperties=-Dopenejb.conf.file=...
>
> Well done, but to configure the http listening port, I followed a blog post
> from Romain.
>
> in the blog article 50 shades of tomee, Romain has written that we could
> use tomee:exec to generate the big jar and pass some vars to the next java
> command, to launch tomee, to override some values. In his example he say
> that he can override the http.port in server.xml. Great !
>
> But in fact, while I'm providing a server.xml with the ${http.port} in the
> connector for the tomcat, the tomee:exec fail because of an
> NumberFormatException.
>
> The plugin tomee try to get the value from  the provided server.xml, with
> pain of course in this case.
>
> Is it possible to fix it ? I can't clearly see the impacts on the other
> goals of the mojo if I change the code.
>
> Does anybody have an idea ?
>
> Thanks a lot.
>