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

1 Answers1

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
GauravJ
  • 2,162
  • 1
  • 22
  • 28
  • hi,i tried the ping, but it says unknown host repo.maven.apache.,org – Srinivas Santhanam Feb 06 '17 at 12:52
  • Check network configuration. It's not a maven problem – GauravJ Feb 06 '17 at 13:07
  • Hi gaurav, i downloaded the pom and the jar of maven-enforcer-plugin-1.4.1. So is it possible to proceed with building the package with the above jar present, if possible then where do i mention the path to this jar? – Srinivas Santhanam Feb 07 '17 at 04:38
  • Did you manage to solve your network problem ? If not, then its going to be difficult to solve this problem. As far as keeping the jar file of plugin or a dependency is concerned, you keep it in either /root/.m2/repository or if you have logged on using different user then, /home//.m2/repository. You should accept this answer and raise another question with relevant context. – GauravJ Feb 07 '17 at 04:45