giraph格式-用依赖关系构建jar

i7uq4tfw  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(377)

我正在尝试构建giraph格式jar…带有依赖性。。在我的项目中使用它,但是即使在成功构建之后,我也无法获得jar文件。
我曾尝试向pom中添加组装部件,以构建具有依赖关系的jar,但它很少遗漏hive的定义,这会导致更难解决的错误。我不知道怎么了。
我正在使用maven 3.04和hadoop 0.20.2
要运行的命令:

giraph/trunk/giraph-formats-contrib$ mvn -Phadoop_non_secure verify -Dcheckstyle.skip

有2个警告我无法解决:
结果:

Tests run: 3, Failures: 0, Errors: 0, Skipped: 0

13/01/05 13:42:03 INFO zk.ZooKeeperManager: run: Shutdown hook started.
[INFO] 
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ giraph-formats-contrib ---
[INFO] Building jar: /home/dipu/Downloads/pradeep/giraph/trunk/giraph-formats-contrib/target/giraph-formats-contrib-0.2-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-jar-plugin:2.3.2:test-jar (default) @ giraph-formats-contrib ---
[INFO] Building jar: /home/dipu/Downloads/pradeep/giraph/trunk/giraph-formats-contrib/target/giraph-formats-contrib-0.2-SNAPSHOT-tests.jar
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.9:check (default) @ giraph-formats-contrib ---
[INFO] 
[INFO] >>> findbugs-maven-plugin:2.5.1:check (default) @ giraph-formats-contrib >>>
[WARNING] Failure to transfer asm:asm/maven-metadata.xml from file:../../local.repository/trunk was cached in the local repository, resolution will not be reattempted until the update interval of local.repository has elapsed or updates are forced. Original error: Could not transfer metadata asm:asm/maven-metadata.xml from/to local.repository (file:../../local.repository/trunk): No connector available to access repository local.repository (file:../../local.repository/trunk) of type legacy using the available factories WagonRepositoryConnectorFactory
[WARNING] Failure to transfer asm:asm/maven-metadata.xml from file:../../local.repository/trunk was cached in the local repository, resolution will not be reattempted until the update interval of local.repository has elapsed or updates are forced. Original error: Could not transfer metadata asm:asm/maven-metadata.xml from/to local.repository (file:../../local.repository/trunk): No connector available to access repository local.repository (file:../../local.repository/trunk) of type legacy using the available factories WagonRepositoryConnectorFactory
[INFO] 
[INFO] --- findbugs-maven-plugin:2.5.1:findbugs (findbugs) @ giraph-formats-contrib ---
[INFO] Fork Value is true
     [java] The following classes needed for analysis were missing:
     [java]   org.apache.hadoop.security.token.Token
     [java]   org.apache.hadoop.security.Credentials
     [java] Missing classes: 1
[INFO] Done FindBugs Analysis....
[INFO] 
[INFO] <<< findbugs-maven-plugin:2.5.1:check (default) @ giraph-formats-contrib <<<
[INFO] 
[INFO] --- findbugs-maven-plugin:2.5.1:check (default) @ giraph-formats-contrib ---
[INFO] BugInstance size is 0
[INFO] Error size is 0
[INFO] No errors/warnings found
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:27.588s
[INFO] Finished at: Sat Jan 05 13:42:38 IST 2013
[INFO] Final Memory: 39M/186M
[INFO] ------------------------------------------------------------------------

我在下面粘贴的giraph格式的默认pom。。。。。

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.apache.giraph</groupId>
    <artifactId>parent</artifactId>
    <version>0.2-SNAPSHOT</version>
  </parent>
  <artifactId>giraph-formats-contrib</artifactId>
  <packaging>jar</packaging>

  <name>Apache Giraph Formats</name>

  <properties>
    <top.dir>${project.basedir}/..</top.dir>
    <lib.dir>${top.dir}/lib</lib.dir>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.9</version>
        <configuration>
          <configLocation>${top.dir}/checkstyle.xml</configLocation>
          <headerLocation>${top.dir}/license-header.txt</headerLocation>
          <enableRulesSummary>false</enableRulesSummary>
          <failOnError>true</failOnError>
          <includeTestSourceDirectory>false</includeTestSourceDirectory>
        </configuration>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
               <goal>check</goal>
             </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.6</version>
        <configuration>
          <systemProperties>
            <property>
              <name>prop.jarLocation</name>
              <value>${top.dir}/giraph/target/giraph-${project.version}-${forHadoop}-jar-with-dependencies.jar</value>
            </property>
          </systemProperties>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>2.5.1</version>
        <configuration>
          <xmlOutput>true</xmlOutput>
          <findbugsXmlOutput>false</findbugsXmlOutput>
          <excludeFilterFile>${top.dir}/findbugs-exclude.xml</excludeFilterFile>
        </configuration>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <repositories>
    <!-- This is the main maven repository. Normally we wouldn't need to put
       it here when it's the only one being used, but since we need to add
       special repositories to get hcatalog we need to mention this one
       specifically otherwise it won't be included. -->
    <repository>
      <id>central</id>
      <name>Maven Repository</name>
      <url>http://repo1.maven.org/maven2</url>
      <releases>
        <enabled>true</enabled>
      </releases>
    </repository>
    <!-- This is necessary for hcatalog. -->
    <repository>
      <id>apache</id>
      <name>Apache Repository</name>
      <url>https://repository.apache.org/content/repositories/snapshots</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
    <!-- This is necessary for hive-metastore dependencies for hcatalog. -->
    <repository>
      <id>datanucleus</id>
      <name>datanucleus maven repository</name>
      <url>http://www.datanucleus.org/downloads/maven2</url>
      <layout>default</layout>
      <releases>
        <enabled>true</enabled>
        <checksumPolicy>warn</checksumPolicy>
      </releases>
    </repository>
  </repositories>

  <profiles>
    <profile>
      <id>hadoop_0.20.203</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.apache.hadoop</groupId>
          <artifactId>hadoop-test</artifactId>
          <version>${hadoop.version}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>

    <profile>
      <id>hadoop_1.0</id>
      <dependencies>
        <dependency>
          <groupId>org.apache.hadoop</groupId>
          <artifactId>hadoop-test</artifactId>
          <version>${hadoop.version}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>

    <profile>
      <id>hadoop_non_secure</id>
      <dependencies>
        <dependency>
          <groupId>org.apache.hadoop</groupId>
          <artifactId>hadoop-test</artifactId>
          <version>${hadoop.version}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>

    <profile>
      <id>hadoop_facebook</id>
      <dependencies>
        <dependency>
          <groupId>org.apache.hadoop</groupId>
          <artifactId>hadoop-test</artifactId>
          <version>${hadoop.version}</version>
          <scope>system</scope>
          <systemPath>${lib.dir}/facebook-hadoop-0.20-test.jar</systemPath>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

  <dependencies>
    <!-- compile dependencies. sorted lexicographically. -->
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.giraph</groupId>
      <artifactId>giraph</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.hcatalog</groupId>
      <artifactId>hcatalog-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.hive</groupId>
      <artifactId>hive-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.hive</groupId>
      <artifactId>hive-exec</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.hive</groupId>
      <artifactId>hive-metastore</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.zookeeper</groupId>
      <artifactId>zookeeper</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.giraph</groupId>
      <artifactId>giraph</artifactId>
      <version>0.2-SNAPSHOT</version>
      <type>test-jar</type>
    </dependency>

    <!-- provided dependencies. sorted lexicographically. -->
    <dependency>
      <groupId>org.apache.accumulo</groupId>
      <artifactId>accumulo-core</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- test dependencies. sorted lexicographically. -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
qyzbxkaa

qyzbxkaa1#

那些警告看起来无害。如果您担心的话,您应该删除它警告的缓存文件,然后让它再次下载它们。

相关问题