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 <
> [email protected]> 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 <
> > [email protected]> 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 <
> > > [email protected]> escreveu:
> > > 
> > > > Hi,
> > > > 
> > > > do you have some example code on GitHub to play with?
> > > > 
> > > > Gruss
> > > > Richard
> > > > ________________________________
> > > > Von: Daniel Dias Dos Santos <[email protected]>
> > > > Gesendet: Donnerstag, 2. September 2021 21:24:10
> > > > An: [email protected]
> > > > 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: [email protected]
web: https://www.mi.hs-heilbronn.de/ 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to