Netbeans adding jar (like mysql-connector) to the project...

As the titel says, I can’t figure out how to add mysql-connector jar to the Vaadin project in Netbans. For other java projects it is simple. One can click on the Libraries folder (doesn’t exist in Vaadin project.) and choose ‘add JAR’ or similar.

What baffels me is that Netbeans has the connector jar in global libraries, but if I try to

​import com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource the package is not found, and only option I get is to ‘Search Dependencies at Maven Repositoreis for com.mysql.jdbc…’



Ok I find the solution. I had no previous experience with maven, so this was a bit new for me.

I had gone to Services tab in NetBeans, then right clicked on Maven repositories - Find. Here one can enter mysql to get a bunch of results containing mysql in its name. One of those is mysql-connector.There were lot of versions listed. I have choosen the newest, and download. Aferwards the package could be imported normaly.

Have you posted this here accidently, by error, or…?