Format code Ctrl + Alt + L
Remove unused imports CTRL + ALT + O
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>fully.qualified.MainClass</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
and you run it with
mvn clean compile assembly:single
https://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven
Oracle is proprietary solution provider and oracle jars are not available in maven. So we need to manually add those jars to our local maven repository.
One of the errors, you can see is below.
Missing artifact com.oracle:ojdbc6:jar:11.2.0 in pom.xml
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0</version>
</dependency>
Solution : install manually in maven local local repo, run below command
mvn install:install-file -Dfile={path/to/your/ojdbc.jar} -DgroupId=com.oracle
-DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar
-DgroupId this may vary, ex: if your group id just "oracle" , you can ommit or empty
DgroupId
Then it will looks like below
mvn install:install-file -Dfile={path/to/your/ojdbc.jar} -DgroupId=
-DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar
Today US confirmed, US President, Donald Trump and First Lady, Melania Trump positive for coronavirus.