Come on!!
After a lot of pointless search on Google, I ended up finding 3 links that helped me generate my JAR with Custom Dependencies / Libraries / Directories Resources. Follow the link sequence of what you’ll find in each of the sources.
Source 1: Add own or downloaded JAR to Local Maven Repository:
Mkyoung.com | Add JAR to Local Maven Repository
Source 2: Configure the Maven-Shade-Plugin to find the Main Class and Spring Boot.
http://crunchify.com
Source 3: Own website of Apache Maven
with ways to add a JAR to the local Maven repository.
https://maven.apache.org
Simplifying my Build
of Pom.xml
was the following below:
<build>
<finalName>SisAcademia</finalName>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/main/test</testSourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<!-- Optional Start -->
<finalName>SisAcademia</finalName>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>jar-with-dependencies</shadedClassifierName>
<!-- Optional End -->
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>br.com.tamarozzi.app.Main</mainClass>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.handlers</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.schemas</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.tooling</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
To generate an "executable", you have that answer with build configuration. In my case solved.
– Renan Gomes
@Renan your tip was useful, but still intended lack how to make application recognize the folders 'Resources' which in my case contain configuration files and images.
– Wilson Tamarozzi
What is your IDE ?
– David Schrammel
@Davidschrammel sorry to have not informed, I use the Eclipse but I managed to perform the procedure with the information of the 'right' answer below.
– Wilson Tamarozzi
Cool, in the eclipse Luna you can right click and export, will open a screen and you can mark to export the dependencies together in the jar.
– David Schrammel