I have a Java project that I use maven for dependency resolution and building the self-contained, runnable/uber jar (via maven-shade-plugin currently) and I'd like to start playing around with mixing Kotlin into the projects for some new features.
Is using maven to create a runnable/uber jar comprised of Java (primarily) and Kotlin something that is relatively simple to do, and/or supported? Or am I looking at a hack job of gluing together a bunch of stuff that might work if done right? Kotlin isn't a requirement, but since it's supposed to be able to mix freely with Java, it's something I've been wanting to try out on this project. Really trying to gauge if it's a can of worms, or no big deal (and if it's nbd, best direction to look into?)
Here is the build section of my pom.xml so you can see how I'm creating it currently
<build>
<finalName>my-server</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<!-- exclude signatures -->
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>com.mycompany.myproject.mymainclass</Main-Class>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
Anyone have experience doing something like this? Simple? or just stay away?