编译hbase 0.98的一个程序的,然后莫名奇妙的就开始报错。。。。
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building hbaseHealthChecker 0.98-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.hortonworks.com/content/repositories/releases/javax/jms/jms/1.1/jms-1.1.jar
Downloading: http://repo.hortonworks.com/content/repositories/releases/com/sun/jdmk/jmxtools/1.2.1/jmxtools-1.2.1.jar
Downloading: http://repo.hortonworks.com/content/repositories/releases/com/sun/jmx/jmxri/1.2.1/jmxri-1.2.1.jar
Downloading: http://central.maven.org/maven2/javax/jms/jms/1.1/jms-1.1.jar
Downloading: http://central.maven.org/maven2/com/sun/jdmk/jmxtools/1.2.1/jmxtools-1.2.1.jar
Downloading: http://central.maven.org/maven2/com/sun/jmx/jmxri/1.2.1/jmxri-1.2.1.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.274 s
[INFO] Finished at: 2017-03-24T11:49:04+08:00
[INFO] Final Memory: 13M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project hbaseHealthChecker: Could not resolve dependencies for project com.ebay.gdi:hbaseHealthChecker:jar:0.98-SNAPSHOT: The following artifacts could not be resolved: javax.jms:jms:jar:1.1, com.sun.jdmk:jmxtools:jar:1.2.1, com.sun.jmx:jmxri:jar:1.2.1: Could not transfer artifact javax.jms:jms:jar:1.1 from/to java.net (https://maven-repository.dev.java.net/nonav/repository): Cannot access https://maven-repository.dev.java.net/nonav/repository with type legacy using the available connector factories: BasicRepositoryConnectorFactory: Cannot access https://maven-repository.dev.java.net/nonav/repository with type legacy using the available layout factories: Maven2RepositoryLayoutFactory: Unsupported repository layout legacy -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
参考了下面的文章,增加了一个比较新的log4j的依赖,然后重新编译成功
http://www.tuicool.com/articles/zIbiuq
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.test.xx</groupId> <artifactId>hbaseHealthChecker</artifactId> <version>0.98-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> <version>3.4.5</version> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>12.0.1</version> </dependency> <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase-client</artifactId> <version>0.98.0.2.1.3.0-563-hadoop2</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> </dependencies> <repositories> <repository> <releases> <enabled>true</enabled> <updatePolicy>always</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> <snapshots> <enabled>false</enabled> <updatePolicy>never</updatePolicy> <checksumPolicy>fail</checksumPolicy> </snapshots> <id>HDPReleases</id> <name>HDP Releases</name> <url>http://repo.hortonworks.com/content/repositories/releases/</url> <layout>default</layout> </repository> <repository> <snapshots> <enabled>true</enabled> </snapshots> <id>central</id> <name>Central Repository</name> <url>http://repo.maven.apache.org/maven2</url> </repository> <repository> <snapshots> <enabled>true</enabled> </snapshots> <id>mvnrepo</id> <name>mvnrepo</name> <url>http://central.maven.org/maven2</url> </repository> </repositories> </project>