You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Albert Battle <ba...@gmail.com> on 2015/02/07 18:51:25 UTC

Maven embedder: Compiler dependency could not be resolved

I have maven projects *A* and *B*. Project *A* uses maven embedder 3.2.5
and builds with it project *B*.

MavenCli mavenCli = new MavenCli();
mavenCli.doMain(new String[] {"package"},
"C:\\Users\\JohnDoe\\Desktop\\abc", System.out, System.out);

But I get the exception:

Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its
dependencies could not be resolved: Failed to read artifact descriptor for
org.apache.maven.plugins:maven-compiler-plugin:jar:3.1: Could not transfer
artifact org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from/to
central (https://repo.maven.apache.org/maven2): No connector factories
available

I looked into my local repository folder and there is indeed no plugin
version 3.1. If I manually put it there the build is successful. But AFAIK
maven automatically should download all necessary plugins. But it doesn't
happen. I added

 <dependency>
  <groupId>org.apache.maven.wagon</groupId>
  <artifactId>wagon-http</artifactId>
  <version>2.8</version></dependency>

to project *A* and still no luck.