You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Daniel Dias Dos Santos <da...@gmail.com> on 2021/09/02 19:24:10 UTC

how to create an executable jar with new tomee-Bootstrap

Hello everybody,

I'm trying to make an executable jar with the new* tomee-Bootstrap* in
method Main .

locally using the IDE I can boot fine.

however I didn't find a way to generate an executable jar.

I'm using the following dependencies

<dependency>
<groupId>org.apache.tomee.bom</groupId>
<artifactId>tomee-microprofile-api</artifactId>
<version>8.0.8-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.tomee.bom</groupId>
<artifactId>tomee-microprofile</artifactId>
<version>8.0.8-SNAPSHOT</version>
</dependency>

Does anyone know a way?

Re: how to create an executable jar with new tomee-Bootstrap

Posted by Daniel Dias Dos Santos <da...@gmail.com>.
Hello Richard,

the way I put it works well.But I believe it is more useful to do some
local tests for debugging.

With TomEE Maven it works great and what I've been using :)

thank you so much for the support :)

Em sex., 3 de set. de 2021 às 03:33, Zowalla, Richard <
richard.zowalla@hs-heilbronn.de> escreveu:

> Hi Daniel,
>
> glad you solved it - was thinking about shading first but discovered th
> hard paths to target / src (which will obviously not work in a shade).
>
> An alternative (without bootstrap classes) to create an executable JAR
> with a full TomEE distribution would be to use the TomEE Maven plugin.
>
>             <plugin>
>                 <groupId>org.apache.tomee.maven</groupId>
>                 <artifactId>tomee-maven-plugin</artifactId>
>                 <version>8.0.7</version>
>                 <executions>
>                     <execution>
>                         <id>executable-jar</id>
>                         <goals>
>                             <goal>exec</goal>
>                         </goals>
>                         <phase>package</phase>
>                     </execution>
>                 </executions>
>             </plugin>
>
> Of course it can be configured as usual (flavour, system config, ...).
> Project needs to build a "war" archive in <packaging> but it then
> generates an executable JAR bundled with TomEE, which is pretty cool :)
>
> Gruß
> Richard
>
>
>
> Am Donnerstag, dem 02.09.2021 um 18:36 -0300 schrieb Daniel Dias Dos
> Santos:
> > I can do what I wanted here, very different from what I use, because
> > it's
> > the first time I use this plugin and it works well;
> >
> > <plugin> <groupId>org.springframework.boot</groupId> <artifactId>
> > spring-boot-maven-plugin</artifactId> <executions> <execution>
> > <goals> <goal
> > > repackage</goal> </goals> <configuration> <classifier>spring-boot</
> > classifier> <mainClass> com.baeldung.executable.ExecutableMavenJar </
> > mainClass> </configuration> </execution> </executions> </plugin>
> >
> > https://www.baeldung.com/executable-jar-with-maven
> >
> >
> > Em qui., 2 de set. de 2021 às 17:09, Daniel Dias Dos Santos <
> > daniel.dias.analistati@gmail.com> escreveu:
> >
> > > Hello,
> > >
> > > the example -> https://github.com/Daniel-Dos/tomee-JavaSe
> > >
> > > thanks
> > >
> > > Em qui., 2 de set. de 2021 às 17:03, Daniel Dias Dos Santos <
> > > daniel.dias.analistati@gmail.com> escreveu:
> > >
> > > > Hi,
> > > >
> > > > I still don't go up the example, but I'll put it.
> > > >
> > > >
> > > > Em qui., 2 de set. de 2021 às 17:00, Zowalla, Richard <
> > > > richard.zowalla@hs-heilbronn.de> escreveu:
> > > >
> > > > > Hi,
> > > > >
> > > > > do you have some example code on GitHub to play with?
> > > > >
> > > > > Gruss
> > > > > Richard
> > > > > ________________________________
> > > > > Von: Daniel Dias Dos Santos <da...@gmail.com>
> > > > > Gesendet: Donnerstag, 2. September 2021 21:24:10
> > > > > An: users@tomee.apache.org
> > > > > Betreff: how to create an executable jar with new tomee-
> > > > > Bootstrap
> > > > >
> > > > > Hello everybody,
> > > > >
> > > > > I'm trying to make an executable jar with the new* tomee-
> > > > > Bootstrap* in
> > > > > method Main .
> > > > >
> > > > > locally using the IDE I can boot fine.
> > > > >
> > > > > however I didn't find a way to generate an executable jar.
> > > > >
> > > > > I'm using the following dependencies
> > > > >
> > > > > <dependency>
> > > > > <groupId>org.apache.tomee.bom</groupId>
> > > > > <artifactId>tomee-microprofile-api</artifactId>
> > > > > <version>8.0.8-SNAPSHOT</version>
> > > > > <scope>provided</scope>
> > > > > </dependency>
> > > > >
> > > > > <dependency>
> > > > > <groupId>org.apache.tomee.bom</groupId>
> > > > > <artifactId>tomee-microprofile</artifactId>
> > > > > <version>8.0.8-SNAPSHOT</version>
> > > > > </dependency>
> > > > >
> > > > > Does anyone know a way?
> > > > >
> --
> Richard Zowalla, M.Sc.
> Research Associate, PhD Student | Medical Informatics
>
> Hochschule Heilbronn – University of Applied Sciences
> Max-Planck-Str. 39
> D-74081 Heilbronn
> phone: +49 7131 504 6791 (zur Zeit nicht via Telefon erreichbar)
> mail: richard.zowalla@hs-heilbronn.de
> web: https://www.mi.hs-heilbronn.de/
>

Re: how to create an executable jar with new tomee-Bootstrap

Posted by "Zowalla, Richard" <ri...@hs-heilbronn.de>.
Hi Daniel,

glad you solved it - was thinking about shading first but discovered th
hard paths to target / src (which will obviously not work in a shade).

An alternative (without bootstrap classes) to create an executable JAR
with a full TomEE distribution would be to use the TomEE Maven plugin.

            <plugin>
                <groupId>org.apache.tomee.maven</groupId>
                <artifactId>tomee-maven-plugin</artifactId>
                <version>8.0.7</version>
                <executions>
                    <execution>
                        <id>executable-jar</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <phase>package</phase>
                    </execution>
                </executions>
            </plugin>

Of course it can be configured as usual (flavour, system config, ...).
Project needs to build a "war" archive in <packaging> but it then
generates an executable JAR bundled with TomEE, which is pretty cool :)

Gruß
Richard



Am Donnerstag, dem 02.09.2021 um 18:36 -0300 schrieb Daniel Dias Dos
Santos:
> I can do what I wanted here, very different from what I use, because
> it's
> the first time I use this plugin and it works well;
> 
> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>
> spring-boot-maven-plugin</artifactId> <executions> <execution>
> <goals> <goal
> > repackage</goal> </goals> <configuration> <classifier>spring-boot</
> classifier> <mainClass> com.baeldung.executable.ExecutableMavenJar </
> mainClass> </configuration> </execution> </executions> </plugin>
> 
> https://www.baeldung.com/executable-jar-with-maven
> 
> 
> Em qui., 2 de set. de 2021 às 17:09, Daniel Dias Dos Santos <
> daniel.dias.analistati@gmail.com> escreveu:
> 
> > Hello,
> > 
> > the example -> https://github.com/Daniel-Dos/tomee-JavaSe
> > 
> > thanks
> > 
> > Em qui., 2 de set. de 2021 às 17:03, Daniel Dias Dos Santos <
> > daniel.dias.analistati@gmail.com> escreveu:
> > 
> > > Hi,
> > > 
> > > I still don't go up the example, but I'll put it.
> > > 
> > > 
> > > Em qui., 2 de set. de 2021 às 17:00, Zowalla, Richard <
> > > richard.zowalla@hs-heilbronn.de> escreveu:
> > > 
> > > > Hi,
> > > > 
> > > > do you have some example code on GitHub to play with?
> > > > 
> > > > Gruss
> > > > Richard
> > > > ________________________________
> > > > Von: Daniel Dias Dos Santos <da...@gmail.com>
> > > > Gesendet: Donnerstag, 2. September 2021 21:24:10
> > > > An: users@tomee.apache.org
> > > > Betreff: how to create an executable jar with new tomee-
> > > > Bootstrap
> > > > 
> > > > Hello everybody,
> > > > 
> > > > I'm trying to make an executable jar with the new* tomee-
> > > > Bootstrap* in
> > > > method Main .
> > > > 
> > > > locally using the IDE I can boot fine.
> > > > 
> > > > however I didn't find a way to generate an executable jar.
> > > > 
> > > > I'm using the following dependencies
> > > > 
> > > > <dependency>
> > > > <groupId>org.apache.tomee.bom</groupId>
> > > > <artifactId>tomee-microprofile-api</artifactId>
> > > > <version>8.0.8-SNAPSHOT</version>
> > > > <scope>provided</scope>
> > > > </dependency>
> > > > 
> > > > <dependency>
> > > > <groupId>org.apache.tomee.bom</groupId>
> > > > <artifactId>tomee-microprofile</artifactId>
> > > > <version>8.0.8-SNAPSHOT</version>
> > > > </dependency>
> > > > 
> > > > Does anyone know a way?
> > > > 
-- 
Richard Zowalla, M.Sc.
Research Associate, PhD Student | Medical Informatics

Hochschule Heilbronn – University of Applied Sciences
Max-Planck-Str. 39 
D-74081 Heilbronn 
phone: +49 7131 504 6791 (zur Zeit nicht via Telefon erreichbar)
mail: richard.zowalla@hs-heilbronn.de
web: https://www.mi.hs-heilbronn.de/ 

Re: how to create an executable jar with new tomee-Bootstrap

Posted by Daniel Dias Dos Santos <da...@gmail.com>.
I can do what I wanted here, very different from what I use, because it's
the first time I use this plugin and it works well;

<plugin> <groupId>org.springframework.boot</groupId> <artifactId>
spring-boot-maven-plugin</artifactId> <executions> <execution> <goals> <goal
>repackage</goal> </goals> <configuration> <classifier>spring-boot</
classifier> <mainClass> com.baeldung.executable.ExecutableMavenJar </
mainClass> </configuration> </execution> </executions> </plugin>

https://www.baeldung.com/executable-jar-with-maven


Em qui., 2 de set. de 2021 às 17:09, Daniel Dias Dos Santos <
daniel.dias.analistati@gmail.com> escreveu:

> Hello,
>
> the example -> https://github.com/Daniel-Dos/tomee-JavaSe
>
> thanks
>
> Em qui., 2 de set. de 2021 às 17:03, Daniel Dias Dos Santos <
> daniel.dias.analistati@gmail.com> escreveu:
>
>> Hi,
>>
>> I still don't go up the example, but I'll put it.
>>
>>
>> Em qui., 2 de set. de 2021 às 17:00, Zowalla, Richard <
>> richard.zowalla@hs-heilbronn.de> escreveu:
>>
>>> Hi,
>>>
>>> do you have some example code on GitHub to play with?
>>>
>>> Gruss
>>> Richard
>>> ________________________________
>>> Von: Daniel Dias Dos Santos <da...@gmail.com>
>>> Gesendet: Donnerstag, 2. September 2021 21:24:10
>>> An: users@tomee.apache.org
>>> Betreff: how to create an executable jar with new tomee-Bootstrap
>>>
>>> Hello everybody,
>>>
>>> I'm trying to make an executable jar with the new* tomee-Bootstrap* in
>>> method Main .
>>>
>>> locally using the IDE I can boot fine.
>>>
>>> however I didn't find a way to generate an executable jar.
>>>
>>> I'm using the following dependencies
>>>
>>> <dependency>
>>> <groupId>org.apache.tomee.bom</groupId>
>>> <artifactId>tomee-microprofile-api</artifactId>
>>> <version>8.0.8-SNAPSHOT</version>
>>> <scope>provided</scope>
>>> </dependency>
>>>
>>> <dependency>
>>> <groupId>org.apache.tomee.bom</groupId>
>>> <artifactId>tomee-microprofile</artifactId>
>>> <version>8.0.8-SNAPSHOT</version>
>>> </dependency>
>>>
>>> Does anyone know a way?
>>>
>>

Re: how to create an executable jar with new tomee-Bootstrap

Posted by Daniel Dias Dos Santos <da...@gmail.com>.
Hello,

the example -> https://github.com/Daniel-Dos/tomee-JavaSe

thanks

Em qui., 2 de set. de 2021 às 17:03, Daniel Dias Dos Santos <
daniel.dias.analistati@gmail.com> escreveu:

> Hi,
>
> I still don't go up the example, but I'll put it.
>
>
> Em qui., 2 de set. de 2021 às 17:00, Zowalla, Richard <
> richard.zowalla@hs-heilbronn.de> escreveu:
>
>> Hi,
>>
>> do you have some example code on GitHub to play with?
>>
>> Gruss
>> Richard
>> ________________________________
>> Von: Daniel Dias Dos Santos <da...@gmail.com>
>> Gesendet: Donnerstag, 2. September 2021 21:24:10
>> An: users@tomee.apache.org
>> Betreff: how to create an executable jar with new tomee-Bootstrap
>>
>> Hello everybody,
>>
>> I'm trying to make an executable jar with the new* tomee-Bootstrap* in
>> method Main .
>>
>> locally using the IDE I can boot fine.
>>
>> however I didn't find a way to generate an executable jar.
>>
>> I'm using the following dependencies
>>
>> <dependency>
>> <groupId>org.apache.tomee.bom</groupId>
>> <artifactId>tomee-microprofile-api</artifactId>
>> <version>8.0.8-SNAPSHOT</version>
>> <scope>provided</scope>
>> </dependency>
>>
>> <dependency>
>> <groupId>org.apache.tomee.bom</groupId>
>> <artifactId>tomee-microprofile</artifactId>
>> <version>8.0.8-SNAPSHOT</version>
>> </dependency>
>>
>> Does anyone know a way?
>>
>

Re: how to create an executable jar with new tomee-Bootstrap

Posted by Daniel Dias Dos Santos <da...@gmail.com>.
Hi,

I still don't go up the example, but I'll put it.


Em qui., 2 de set. de 2021 às 17:00, Zowalla, Richard <
richard.zowalla@hs-heilbronn.de> escreveu:

> Hi,
>
> do you have some example code on GitHub to play with?
>
> Gruss
> Richard
> ________________________________
> Von: Daniel Dias Dos Santos <da...@gmail.com>
> Gesendet: Donnerstag, 2. September 2021 21:24:10
> An: users@tomee.apache.org
> Betreff: how to create an executable jar with new tomee-Bootstrap
>
> Hello everybody,
>
> I'm trying to make an executable jar with the new* tomee-Bootstrap* in
> method Main .
>
> locally using the IDE I can boot fine.
>
> however I didn't find a way to generate an executable jar.
>
> I'm using the following dependencies
>
> <dependency>
> <groupId>org.apache.tomee.bom</groupId>
> <artifactId>tomee-microprofile-api</artifactId>
> <version>8.0.8-SNAPSHOT</version>
> <scope>provided</scope>
> </dependency>
>
> <dependency>
> <groupId>org.apache.tomee.bom</groupId>
> <artifactId>tomee-microprofile</artifactId>
> <version>8.0.8-SNAPSHOT</version>
> </dependency>
>
> Does anyone know a way?
>

AW: how to create an executable jar with new tomee-Bootstrap

Posted by "Zowalla, Richard" <ri...@hs-heilbronn.de>.
Hi,

do you have some example code on GitHub to play with?

Gruss
Richard
________________________________
Von: Daniel Dias Dos Santos <da...@gmail.com>
Gesendet: Donnerstag, 2. September 2021 21:24:10
An: users@tomee.apache.org
Betreff: how to create an executable jar with new tomee-Bootstrap

Hello everybody,

I'm trying to make an executable jar with the new* tomee-Bootstrap* in
method Main .

locally using the IDE I can boot fine.

however I didn't find a way to generate an executable jar.

I'm using the following dependencies

<dependency>
<groupId>org.apache.tomee.bom</groupId>
<artifactId>tomee-microprofile-api</artifactId>
<version>8.0.8-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.tomee.bom</groupId>
<artifactId>tomee-microprofile</artifactId>
<version>8.0.8-SNAPSHOT</version>
</dependency>

Does anyone know a way?