Strange, it works now...
I had
Properties systemProps = System.getProperties();
systemProps.put( "javax.net.ssl.trustStore", "/truststore.jks");
systemProps.put( "javax.net.ssl.trustStorePassword", "changeit");
System.setProperties(systemProps);
and change the second line to
systemProps.put( "javax.net.ssl.trustStore", "src/main/resources/truststore.jks");
Anyone knows why? Is this solution ok?