gpt4 book ai didi

maven - giraph格式-建立具有依赖项的jar

转载 作者:行者123 更新时间:2023-12-02 21:55:53 25 4
gpt4 key购买 nike

我正在尝试构建具有依赖项的giraph格式的jar ...以将其用于我的项目,但是即使构建成功后,我也无法获取jar文件。

我试图将装配零件添加到pom中,以构建具有依赖关系的jar,但是它缺少配置单元的定义,这给解决更难的错误提供了条件。我不知道怎么了

我正在使用 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>

最佳答案

这些警告看起来无害。如果您担心的话,应该删除警告的缓存文件,然后重新下载。

关于maven - giraph格式-建立具有依赖项的jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14170632/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com