Example of java smallrye micro-profile example using Maven.
getting started
git clone -b mp-smallrye-maven --depth=1 https://github.com/daggerok/main-starter.git
cd main-starter
rm -rf .git
mvn -N io.takari:maven:wrapper -Dmaven=3.6.0
build fat jar
mvn package
java -jar target/*-all.jar
# or
java -cp target/*-all.jar org.jboss.weld.environment.se.StartMain
run with maven
mvn clean compile exec:java -Dexec.mainClass=org.jboss.weld.environment.se.StartMain
debug with maven
mvn clean compile exec:exec -Dexec.executable="java" \
-Dexec.args="-classpath %classpath -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 org.jboss.weld.environment.se.StartMain"
debug fat jar
java -cp target/*-all.jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 org.jboss.weld.environment.se.StartMain
NOTE
Use App.java
class for debug from IDE.
links
YouTube: Using Java EE 8 Dependency Injection in Java SE YouTube: Making the most of Java SE with CDI 2.0 by John Ament YouTube: Combining Serverless Functions with CDI
NOTE: This project has been based on GitHub: daggerok/main-starter