Gero .jar netbeans quando executo diz que falta driver mysql

MySQL

Java

Maven

NetBeans

06/06/2020

Tenho um projeto .jar feito em netbeans com maven que quando gero ele executa normalmente, mas quando executo ele disse que falta o driver do banco de dados, detalhe dentro da IDE quando executo funciona normalmente.

Vou deixar meu POM completo para analise:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.wagnerdanielli</groupId>
<artifactId>Bancos2</artifactId>
<version>1.0-BETA</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>14</maven.compiler.source>
<maven.compiler.target>14</maven.compiler.target>
</properties>
<name>Bancos2</name>
<description>Sistem para controle de movimentação bancária</description>
<build>
<plugins>
<!-- Inicio da configuração dos plugins maven -->


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>br.com.wagnerdanielli.bancos2.Login</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<foo>bar</foo>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
<id>compile</id>
</execution>
</executions>
<configuration>
<foo>bar</foo>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<foo>bar</foo>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Wagner Danielli

Wagner Danielli

Curtidas 0
POSTAR