The Boost Vision
The Open Liberty team would like to share some Maven/Gradle function with the MicroProfile community, which we’ve been prototyping as the “Boost” plugin.
The “Boost” approach abstracts away from the end-user developer the details of installing and configuring an individual MicroProfile implementation with the deployed project application, allowing for a simple, common configuration for all supported runtimes.
Watch a Demo
Building your application with Boosters
Add MicroProfile technologies to your app with a simple set of Boost-defined dependencies (“boosters”). Because they are useful to many MicroProfile applications we include boosters for Java EE (in the future, Jakarta EE) technologies as well.
<dependencyManagement> <dependencies> <dependency> <groupId>boost.boosters</groupId> <artifactId>mp20-bom</artifactId> <version>0.1.3-SNAPSHOT</version> <scope>import</scope> <type>pom</type> </dependency> </dependencies> </dependencyManagement> <dependencies> <!-- Boosters --> <dependency> <groupId>boost.boosters</groupId> <artifactId>mpConfig</artifactId> </dependency> <dependency> <groupId>boost.boosters</groupId> <artifactId>mpRestClient</artifactId> </dependency> ... <dependency> <groupId>boost.boosters</groupId> <artifactId>jpa</artifactId> </dependency> </dependencies>
Runtimes
Selection of a target runtime (MicroProfile implementation) can be expressed via a simple Maven dependency.
<!-- Runtime -->
<dependency>
<groupId>boost.runtimes</groupId>
<artifactId>openliberty</artifactId>
</dependency>
<!-- Switch runtime by switching dependencies
<dependency>
<groupId>boost.runtimes</groupId>
<artifactId>tomee</artifactId>
</dependency>
-->
Databases
Likewise, an auto-configured application database can be added to the project via adding a supported JDBC driver Maven dependency:
<!-- Database -->
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.14.2.0</version>
<scope>provided</scope>
</dependency>
<!-- Switch databases by switching dependencies
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.15</version>
<scope>provided</scope>
</dependency>
-->
How does this fit in with the MicroProfile Starter ?
Boost is designed to complement the MP Starter. The Boost idea suggests a different way to generate the Maven pom.xml, while leveraging the rest of the project creation function provided by the MicroProfile Starter.
The Starter could incorporate Boost by generating the pom.xml with the boost:package goal configured, in the same way for all supported MicroProfile implementations, with the Boost plugin internally handling the differences.
<build>
<plugins>
<plugin>
<groupId>boost</groupId>
<artifactId>boost-maven-plugin</artifactId>
<version>0.1.3-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Next Steps
To be clear, Boost is not currently affiliated with MicroProfile (or even the Extensions for MicroProfile collection), but we are open to contributing the Boost code to a MicroProfile community project.
Let me share then (for anyone in a similar position in the future) , the next steps, according to Eclipse MicroProfile procedures :
- Send an email to the MP forum at: https://groups.google.com/forum/#!forum/microprofile
- After the forum thread is posted and assuming the discussion goes well, a MicroProfile repository can be created
- At that point, new contributors will be welcomed to participate
Learn More
- Explore our sample app project, from which the pom.xml snippets above were taken.
- Visit our (very much under-development) GitHub project page.
More about Us
Besides the uplifiting connotation in the name, our transatlantic team was inspired by the Boost candy bar, a sugary and addictive childhood favorite from the UK.
As a U.S. native, for my compatriot aficionados who haven’t tasted it, I’d “translate” the Boost experience by describing it as a 100 Grand candy bar, but with a richer texture and mouthfeel. (Hope you appreciate the risk we took in smuggling that box past customs to give you that write-up).
About the Author
Scott Kurz has been working for IBM on Java EE and now MicroProfile technologies within WebSphere Application Server and Open Liberty for 20 years. Before working as team lead on the Boost plugins he recently served as Java Batch (JSR 352) maintenance specification lead while designing the WebSphere Liberty Batch implementation. He lives in New York’s Hudson Valley area and enjoys tennis, squash, downhill and cross-country skiing, drinking beer, and even doing these things with his family.
Twitter – @scott_kurz LinkedIn – https://www.linkedin.com/in/kurzscott/ GitHub – https://github.com/scottkurz