简体   繁体   中英

Maven export of 3rd party jar's are not exported with mvn install

Wenn i do in eclipse a maven build with maven install no 3rd party jar is delivered. in my poms i have the dependency added, eg:

<project>
<dependencies>
    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi</artifactId>
        <version>3.9</version>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.29</version>
    </dependency>
</dependencies>
</project>

but after running the main.jar of my maven projects i get

java.sql.SQLException: No suitable driver found for jdbc:mysql:

What I'm doing wrong.

Everything should be installed if you've run the proper command. Try running

 mvm clean install

before you try to build your project. Then afterwards try running

mvm compile

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM