1

I am trying to build livy-server on one of the datanodes of our hadoop cluster which has all the prerequisites like Spark 1.6.2, hadoop 2.4.2 already set up.

I am following the instrucctions as described in the link below

https://github.com/cloudera/livy

After executing the mvn package as follows

git clone git@github.com:cloudera/livy.git
cd livy
mvn package

However I am getting an error as
Plugin org.apache.maven.plugins:maven-enforcer-plugin:1.3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-enforcer-plugin:jar:1.3.1: Could not transfer artifact org.apache.maven.plugins:maven-enforcer-plugin:pom:1.3.1 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: unknown error: Unknown host repo.maven.apache.org: unknown error ->

I tried searching for this error however since I am a newbie I am not able to follow the solutions mentioned, but one common thing was configuring the pom.xml

my pom.xml conf related to the maven enforcer plugin 1.4.1 is as follows

<plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-enforcer-plugin</artifactId>
      <version>1.4.1</version>
      <executions>
        <execution>
          <id>enforce-versions</id>
          <goals>
            <goal>enforce</goal>
          </goals>
          <configuration>
            <rules>
              <requireJavaVersion>
                <version>1.7</version>
              </requireJavaVersion>
            </rules>
          </configuration>
        </execution>
      </executions>
    </plugin>

Can anyone help me in resolving this build issue?

Thanks for your help

4

1 回答 1

2

Your error clearly says the following

Unknown host repo.maven.apache.org

Try

  1. ping repo.maven.apache.org if passes then
  2. wget http://repo.maven.apache.org/maven2
于 2017-02-06T12:21:37.227 回答