title: maven not downloading dependencies because the trustAnchors parameter must be non-empty
body: <p>Before anybody closes the question or flags it as repeated, I must say I've been researching all the internet and could not find any similar problem.</p>
  
  <p>The thing is I installed a fresh Linux Mint 19 in a Virtual Box image. So after installing Java 8 I downloaded Eclipse Scala and any dependency I try to add to my new project won't be downloaded and an error is marked in its pom.xml .</p>
  
  <p>After checking the urls and doing exactly the same on my Eclipse Scala for Windows (in the host machine) it works, but not for the Linux one.</p>
  
  <p>I think it should be an eclipse bug as it has to do with certificates.</p>
  
  <p>If it helps, I'm trying to write some Apache Flink programs, but can't get to do it with this error...</p>
  
  <p>I attach the error:</p>
  
  <pre><code>Failed to read artifact descriptor for org.apache.flink:flink-scala_2.11:jar:1.6.0
  
  org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.flink:flink-scala_2.11:jar:1.6.0
      at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:282)
      at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:198)
      at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:535)
      at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:519)
      at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:409)
      at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
      at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)
      at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:254)
      at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:316)
      at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:172)
      at org.apache.maven.project.DefaultProjectBuilder.resolveDependencies(DefaultProjectBuilder.java:215)
      at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:188)
      at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:119)
      at org.eclipse.m2e.core.internal.embedder.MavenImpl.readMavenProject(MavenImpl.java:636)
      at org.eclipse.m2e.core.internal.project.registry.DefaultMavenDependencyResolver.resolveProjectDependencies(DefaultMavenDependencyResolver.java:63)
      at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refreshPhase2(ProjectRegistryManager.java:530)
      at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager$3.call(ProjectRegistryManager.java:492)
      at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager$3.call(ProjectRegistryManager.java:1)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
      at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:496)
      at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:351)
      at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:298)
      at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration0(ProjectConfigurationManager.java:405)
      at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$2.call(ProjectConfigurationManager.java:352)
      at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$2.call(ProjectConfigurationManager.java:1)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
      at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1351)
      at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:349)
      at org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace(UpdateMavenProjectJob.java:77)
      at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
  Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.apache.flink:flink-scala_2.11:pom:1.6.0 from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
      at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
      at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
      at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267)
      ... 33 more
  Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.apache.flink:flink-scala_2.11:pom:1.6.0 from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:895)
      at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:1)
      at io.takari.aether.connector.AetherRepositoryConnector$GetTask.flush(AetherRepositoryConnector.java:673)
      at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:310)
      at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
      at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
      ... 36 more
  Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
      at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1964)
      at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1921)
      at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1904)
      at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1420)
      at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
      at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:268)
      at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:238)
      at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:149)
      at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:192)
      at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:121)
      at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:100)
      at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
      at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
      at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
      at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
      at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
      at okhttp3.RealCall.execute(RealCall.java:69)
      at io.takari.aether.okhttp.OkHttpAetherClient.execute(OkHttpAetherClient.java:207)
      at io.takari.aether.okhttp.OkHttpAetherClient.get(OkHttpAetherClient.java:153)
      at io.takari.aether.connector.AetherRepositoryConnector$GetTask.resumableGet(AetherRepositoryConnector.java:600)
      at io.takari.aether.connector.AetherRepositoryConnector$GetTask.run(AetherRepositoryConnector.java:453)
      at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:304)
      ... 38 more
  Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      at sun.security.validator.PKIXValidator.&lt;init&gt;(PKIXValidator.java:91)
      at sun.security.validator.Validator.getInstance(Validator.java:181)
      at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:312)
      at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:171)
      at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:184)
      at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
      at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1596)
      at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
      at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1052)
      at sun.security.ssl.Handshaker.process_record(Handshaker.java:987)
      at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1072)
      at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
      at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
      ... 63 more
  Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
      at java.security.cert.PKIXParameters.&lt;init&gt;(PKIXParameters.java:120)
      at java.security.cert.PKIXBuilderParameters.&lt;init&gt;(PKIXBuilderParameters.java:104)
      at sun.security.validator.PKIXValidator.&lt;init&gt;(PKIXValidator.java:89)
      ... 75 more
  </code></pre>
  
  <p>Edit: just some grammar and clarity</p>