You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by jieryn <ji...@gmail.com> on 2013/11/18 05:37:15 UTC

Apache TomEE Maven Plugin -- Executable WAR

Is there any easy way to produce an executable WAR file, which embeds
Apache TomEE? Apache Tomcat Maven plugin makes this trivial -
http://tomcat.apache.org/maven-plugin-2.2/executable-war-jar.html

It is extremely convenient to be able to bundle up a single JAR file
which contains everything required to just java -jar <jar> and have it
initialize Apache TomEE and execute the embedded web application.

Re: Apache TomEE Maven Plugin -- Executable WAR

Posted by Romain Manni-Bucau <rm...@gmail.com>.
right, you need to play with war explosion and assembly plugin (a bit
harder but works)
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2013/11/18 jieryn <ji...@gmail.com>:
> I gave it a shot in tomee-embedded module, but the Shade plugin does
> not seem to want to have multiple executions with different
> dependencies. It seems the current mechanism, Shade plugin, will not
> support the request I have made earlier.
>
> On Mon, Nov 18, 2013 at 8:32 AM, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
>> no but when users wanta flat classpath they generally want more
>> control so we can't meet the requirement.
>>
>> Another point is even if embedded/using a uber jar tomee/tomcat will
>> still create temp folders/files, that's not a full embedded solution
>> like openejb.
>>
>> that said if you spend few time doing the plus uber jar we can add it
>> (just open a jira for it and attach a patch)
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>>
>> 2013/11/18 jieryn <ji...@gmail.com>:
>>> Ok, thanks for the link. We need the tomee-plus profile. I really like
>>> the idea of providing a drop-in which up converts an Apache Tomcat
>>> instance to Apache TomEE, but I am surprised we would not do it for
>>> every profile. They would be useful just like the alternate bundles
>>> for stand alone are useful.
>>>
>>> Is it difficult to have them composed automatically by the automated
>>> build system, release process, etc?
>>>
>>> On Mon, Nov 18, 2013 at 7:55 AM, Romain Manni-Bucau
>>> <rm...@gmail.com> wrote:
>>>> http://repo1.maven.org/maven2/org/apache/openejb/tomee-embedded/1.5.2/
>>>> tomee-embedded-1.5.2-uber.jar
>>>>
>>>> that's the webprofile. To get jaxrs/plus you need to add few tomee-* modules.
>>>>
>>>> We never provided 3 versions since the classpath is used and the user
>>>> can easily add what is missing
>>>> Romain Manni-Bucau
>>>> Twitter: @rmannibucau
>>>> Blog: http://rmannibucau.wordpress.com/
>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>> Github: https://github.com/rmannibucau
>>>>
>>>>
>>>>
>>>> 2013/11/18 jieryn <ji...@gmail.com>:
>>>>> According to Maven Repository:
>>>>> http://search.maven.org/#search|ga|1|tomee there seems to be a problem
>>>>> with that WAR module TomEE provides. I see:
>>>>>
>>>>> org.apache.openejb:tomee-jaxrs-webapp:1.5.2
>>>>> org.apache.openejb:tomee-plus-webapp:4.0.0
>>>>> org.apache.openejb:tomee-webapp:4.0.0
>>>>>
>>>>> Maybe we stopped producing/pushing all three flavors of the single JAR
>>>>> file added to your $CATALINA_BASE/lib or WEB-INF/lib to up-convert an
>>>>> existing Apache Tomcat into an Apache TomEE?
>>>>>
>>>>> On Mon, Nov 18, 2013 at 1:36 AM, Romain Manni-Bucau
>>>>> <rm...@gmail.com> wrote:
>>>>>> did you try the mvn plugin adding tomee dependencies? it should work.
>>>>>>
>>>>>> 2013/11/18 jieryn <ji...@gmail.com>:
>>>>>>> Is there any easy way to produce an executable WAR file, which embeds
>>>>>>> Apache TomEE? Apache Tomcat Maven plugin makes this trivial -
>>>>>>> http://tomcat.apache.org/maven-plugin-2.2/executable-war-jar.html
>>>>>>>
>>>>>>> It is extremely convenient to be able to bundle up a single JAR file
>>>>>>> which contains everything required to just java -jar <jar> and have it
>>>>>>> initialize Apache TomEE and execute the embedded web application.

Re: Apache TomEE Maven Plugin -- Executable WAR

Posted by jieryn <ji...@gmail.com>.
I gave it a shot in tomee-embedded module, but the Shade plugin does
not seem to want to have multiple executions with different
dependencies. It seems the current mechanism, Shade plugin, will not
support the request I have made earlier.

On Mon, Nov 18, 2013 at 8:32 AM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> no but when users wanta flat classpath they generally want more
> control so we can't meet the requirement.
>
> Another point is even if embedded/using a uber jar tomee/tomcat will
> still create temp folders/files, that's not a full embedded solution
> like openejb.
>
> that said if you spend few time doing the plus uber jar we can add it
> (just open a jira for it and attach a patch)
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2013/11/18 jieryn <ji...@gmail.com>:
>> Ok, thanks for the link. We need the tomee-plus profile. I really like
>> the idea of providing a drop-in which up converts an Apache Tomcat
>> instance to Apache TomEE, but I am surprised we would not do it for
>> every profile. They would be useful just like the alternate bundles
>> for stand alone are useful.
>>
>> Is it difficult to have them composed automatically by the automated
>> build system, release process, etc?
>>
>> On Mon, Nov 18, 2013 at 7:55 AM, Romain Manni-Bucau
>> <rm...@gmail.com> wrote:
>>> http://repo1.maven.org/maven2/org/apache/openejb/tomee-embedded/1.5.2/
>>> tomee-embedded-1.5.2-uber.jar
>>>
>>> that's the webprofile. To get jaxrs/plus you need to add few tomee-* modules.
>>>
>>> We never provided 3 versions since the classpath is used and the user
>>> can easily add what is missing
>>> Romain Manni-Bucau
>>> Twitter: @rmannibucau
>>> Blog: http://rmannibucau.wordpress.com/
>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>> Github: https://github.com/rmannibucau
>>>
>>>
>>>
>>> 2013/11/18 jieryn <ji...@gmail.com>:
>>>> According to Maven Repository:
>>>> http://search.maven.org/#search|ga|1|tomee there seems to be a problem
>>>> with that WAR module TomEE provides. I see:
>>>>
>>>> org.apache.openejb:tomee-jaxrs-webapp:1.5.2
>>>> org.apache.openejb:tomee-plus-webapp:4.0.0
>>>> org.apache.openejb:tomee-webapp:4.0.0
>>>>
>>>> Maybe we stopped producing/pushing all three flavors of the single JAR
>>>> file added to your $CATALINA_BASE/lib or WEB-INF/lib to up-convert an
>>>> existing Apache Tomcat into an Apache TomEE?
>>>>
>>>> On Mon, Nov 18, 2013 at 1:36 AM, Romain Manni-Bucau
>>>> <rm...@gmail.com> wrote:
>>>>> did you try the mvn plugin adding tomee dependencies? it should work.
>>>>>
>>>>> 2013/11/18 jieryn <ji...@gmail.com>:
>>>>>> Is there any easy way to produce an executable WAR file, which embeds
>>>>>> Apache TomEE? Apache Tomcat Maven plugin makes this trivial -
>>>>>> http://tomcat.apache.org/maven-plugin-2.2/executable-war-jar.html
>>>>>>
>>>>>> It is extremely convenient to be able to bundle up a single JAR file
>>>>>> which contains everything required to just java -jar <jar> and have it
>>>>>> initialize Apache TomEE and execute the embedded web application.

Re: Apache TomEE Maven Plugin -- Executable WAR

Posted by Romain Manni-Bucau <rm...@gmail.com>.
no but when users wanta flat classpath they generally want more
control so we can't meet the requirement.

Another point is even if embedded/using a uber jar tomee/tomcat will
still create temp folders/files, that's not a full embedded solution
like openejb.

that said if you spend few time doing the plus uber jar we can add it
(just open a jira for it and attach a patch)
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2013/11/18 jieryn <ji...@gmail.com>:
> Ok, thanks for the link. We need the tomee-plus profile. I really like
> the idea of providing a drop-in which up converts an Apache Tomcat
> instance to Apache TomEE, but I am surprised we would not do it for
> every profile. They would be useful just like the alternate bundles
> for stand alone are useful.
>
> Is it difficult to have them composed automatically by the automated
> build system, release process, etc?
>
> On Mon, Nov 18, 2013 at 7:55 AM, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
>> http://repo1.maven.org/maven2/org/apache/openejb/tomee-embedded/1.5.2/
>> tomee-embedded-1.5.2-uber.jar
>>
>> that's the webprofile. To get jaxrs/plus you need to add few tomee-* modules.
>>
>> We never provided 3 versions since the classpath is used and the user
>> can easily add what is missing
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>>
>> 2013/11/18 jieryn <ji...@gmail.com>:
>>> According to Maven Repository:
>>> http://search.maven.org/#search|ga|1|tomee there seems to be a problem
>>> with that WAR module TomEE provides. I see:
>>>
>>> org.apache.openejb:tomee-jaxrs-webapp:1.5.2
>>> org.apache.openejb:tomee-plus-webapp:4.0.0
>>> org.apache.openejb:tomee-webapp:4.0.0
>>>
>>> Maybe we stopped producing/pushing all three flavors of the single JAR
>>> file added to your $CATALINA_BASE/lib or WEB-INF/lib to up-convert an
>>> existing Apache Tomcat into an Apache TomEE?
>>>
>>> On Mon, Nov 18, 2013 at 1:36 AM, Romain Manni-Bucau
>>> <rm...@gmail.com> wrote:
>>>> did you try the mvn plugin adding tomee dependencies? it should work.
>>>>
>>>> 2013/11/18 jieryn <ji...@gmail.com>:
>>>>> Is there any easy way to produce an executable WAR file, which embeds
>>>>> Apache TomEE? Apache Tomcat Maven plugin makes this trivial -
>>>>> http://tomcat.apache.org/maven-plugin-2.2/executable-war-jar.html
>>>>>
>>>>> It is extremely convenient to be able to bundle up a single JAR file
>>>>> which contains everything required to just java -jar <jar> and have it
>>>>> initialize Apache TomEE and execute the embedded web application.

Re: Apache TomEE Maven Plugin -- Executable WAR

Posted by jieryn <ji...@gmail.com>.
Ok, thanks for the link. We need the tomee-plus profile. I really like
the idea of providing a drop-in which up converts an Apache Tomcat
instance to Apache TomEE, but I am surprised we would not do it for
every profile. They would be useful just like the alternate bundles
for stand alone are useful.

Is it difficult to have them composed automatically by the automated
build system, release process, etc?

On Mon, Nov 18, 2013 at 7:55 AM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> http://repo1.maven.org/maven2/org/apache/openejb/tomee-embedded/1.5.2/
> tomee-embedded-1.5.2-uber.jar
>
> that's the webprofile. To get jaxrs/plus you need to add few tomee-* modules.
>
> We never provided 3 versions since the classpath is used and the user
> can easily add what is missing
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2013/11/18 jieryn <ji...@gmail.com>:
>> According to Maven Repository:
>> http://search.maven.org/#search|ga|1|tomee there seems to be a problem
>> with that WAR module TomEE provides. I see:
>>
>> org.apache.openejb:tomee-jaxrs-webapp:1.5.2
>> org.apache.openejb:tomee-plus-webapp:4.0.0
>> org.apache.openejb:tomee-webapp:4.0.0
>>
>> Maybe we stopped producing/pushing all three flavors of the single JAR
>> file added to your $CATALINA_BASE/lib or WEB-INF/lib to up-convert an
>> existing Apache Tomcat into an Apache TomEE?
>>
>> On Mon, Nov 18, 2013 at 1:36 AM, Romain Manni-Bucau
>> <rm...@gmail.com> wrote:
>>> did you try the mvn plugin adding tomee dependencies? it should work.
>>>
>>> 2013/11/18 jieryn <ji...@gmail.com>:
>>>> Is there any easy way to produce an executable WAR file, which embeds
>>>> Apache TomEE? Apache Tomcat Maven plugin makes this trivial -
>>>> http://tomcat.apache.org/maven-plugin-2.2/executable-war-jar.html
>>>>
>>>> It is extremely convenient to be able to bundle up a single JAR file
>>>> which contains everything required to just java -jar <jar> and have it
>>>> initialize Apache TomEE and execute the embedded web application.

Re: Apache TomEE Maven Plugin -- Executable WAR

Posted by Romain Manni-Bucau <rm...@gmail.com>.
http://repo1.maven.org/maven2/org/apache/openejb/tomee-embedded/1.5.2/
tomee-embedded-1.5.2-uber.jar

that's the webprofile. To get jaxrs/plus you need to add few tomee-* modules.

We never provided 3 versions since the classpath is used and the user
can easily add what is missing
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2013/11/18 jieryn <ji...@gmail.com>:
> According to Maven Repository:
> http://search.maven.org/#search|ga|1|tomee there seems to be a problem
> with that WAR module TomEE provides. I see:
>
> org.apache.openejb:tomee-jaxrs-webapp:1.5.2
> org.apache.openejb:tomee-plus-webapp:4.0.0
> org.apache.openejb:tomee-webapp:4.0.0
>
> Maybe we stopped producing/pushing all three flavors of the single JAR
> file added to your $CATALINA_BASE/lib or WEB-INF/lib to up-convert an
> existing Apache Tomcat into an Apache TomEE?
>
> On Mon, Nov 18, 2013 at 1:36 AM, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
>> did you try the mvn plugin adding tomee dependencies? it should work.
>>
>> 2013/11/18 jieryn <ji...@gmail.com>:
>>> Is there any easy way to produce an executable WAR file, which embeds
>>> Apache TomEE? Apache Tomcat Maven plugin makes this trivial -
>>> http://tomcat.apache.org/maven-plugin-2.2/executable-war-jar.html
>>>
>>> It is extremely convenient to be able to bundle up a single JAR file
>>> which contains everything required to just java -jar <jar> and have it
>>> initialize Apache TomEE and execute the embedded web application.

Re: Apache TomEE Maven Plugin -- Executable WAR

Posted by jieryn <ji...@gmail.com>.
According to Maven Repository:
http://search.maven.org/#search|ga|1|tomee there seems to be a problem
with that WAR module TomEE provides. I see:

org.apache.openejb:tomee-jaxrs-webapp:1.5.2
org.apache.openejb:tomee-plus-webapp:4.0.0
org.apache.openejb:tomee-webapp:4.0.0

Maybe we stopped producing/pushing all three flavors of the single JAR
file added to your $CATALINA_BASE/lib or WEB-INF/lib to up-convert an
existing Apache Tomcat into an Apache TomEE?

On Mon, Nov 18, 2013 at 1:36 AM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> did you try the mvn plugin adding tomee dependencies? it should work.
>
> 2013/11/18 jieryn <ji...@gmail.com>:
>> Is there any easy way to produce an executable WAR file, which embeds
>> Apache TomEE? Apache Tomcat Maven plugin makes this trivial -
>> http://tomcat.apache.org/maven-plugin-2.2/executable-war-jar.html
>>
>> It is extremely convenient to be able to bundle up a single JAR file
>> which contains everything required to just java -jar <jar> and have it
>> initialize Apache TomEE and execute the embedded web application.

Re: Apache TomEE Maven Plugin -- Executable WAR

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

did you try the mvn plugin adding tomee dependencies? it should work.


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



2013/11/18 jieryn <ji...@gmail.com>:
> Is there any easy way to produce an executable WAR file, which embeds
> Apache TomEE? Apache Tomcat Maven plugin makes this trivial -
> http://tomcat.apache.org/maven-plugin-2.2/executable-war-jar.html
>
> It is extremely convenient to be able to bundle up a single JAR file
> which contains everything required to just java -jar <jar> and have it
> initialize Apache TomEE and execute the embedded web application.