【问题标题】:Exception in clean and build of maven project清理和构建 Maven 项目的异常
【发布时间】:2018-05-15 10:47:40
【问题描述】:

我对 Maven 很陌生。我已经从下面的链接下载了 Floreant POS 的源代码: http://floreant.org/download/

但是当我尝试清理和构建 netbeans 项目时,我收到以下错误: 正在扫描项目...


构建 floreantpos 1.4-SNAPSHOT

正在下载:http://team.orocube.net:8081/nexus/content/groups/public/net/xeoh/jspf.core/1.0.2/jspf.core-1.0.2.pom

下载:http://team.orocube.net:8081/nexus/content/groups/public/com/orocube/orocube-common-classes/1.4.2/orocube-common-classes-1.4.2.pom

下载:http://team.orocube.net:8081/nexus/content/groups/public/com/pax/poslink/20161230/poslink-20161230.pom

下载中:http://team.orocube.net:8081/nexus/content/groups/public/com/floreantpos/ploader/1.1.2/ploader-1.1.2.pom


构建失败

总时间:1:27.052s 完成时间:2018 年 5 月 15 日星期二 15:38:16 IST

最终内存:10M/155M

未能在项目 floreantpos 上执行目标:无法解析项目 org.floreantpos:floreantpos:jar:1.4-SNAPSHOT 的依赖项:无法收集 [org.hibernate:hibernate:jar:3.2.6.ga 的依赖项(编译), javax.transaction:jta:jar:1.1 (编译), org.hibernate:hibernate-annotations:jar:3.3.1.GA (编译), com.miglayout:miglayout:jar:3.7.4 (编译), ecs :ecs:jar:1.4.2 (编译), xerces:xerces:jar:2.4.0 (编译), com.jgoodies:forms:jar:1.2.1 (编译), org.swinglabs:swingx-core:jar: 1.6.2-2(编译)、org.apache.derby:derby:jar:10.8.1.2(编译)、org.apache.derby:derbynet:jar:10.8.1.2(编译)、org.apache.derby:derbyclient :jar:10.8.1.2 (编译), com.sun.jersey:jersey-client:jar:1.18.1 (编译), com.jgoodies:looks:jar:2.2.2 (编译), com.intellij:forms_rt: jar:7.0.3 (编译), net.sf.jasperreports:jasperreports:jar:4.0.1 (编译), foxtrot:foxtrot:jar:2.0 (编译), org.swinglabs:swing-layout:jar:1.0.3 (编译), commons-lang:commons-lang:jar:2.6 (编译), commons-co nfiguration:commons-configuration:jar:1.2 (编译), log4j:log4j:jar:1.2.15 (编译), mysql:mysql-connector-java:jar:5.1.30 (编译), commons-codec:commons-codec :jar:1.9 (编译), commons-io:commons-io:jar:2.4 (编译), org.metawidget.modules:metawidget-all:jar:3.9 (编译), net.xeoh:jspf.core:jar: 1.0.2 (编译), commons-cli:commons-cli:jar:1.2 (编译), net.authorize:anet-java-sdk:jar:1.8.1 (编译), org.apache.httpcomponents:httpclient:jar :4.0.1 (编译), org.apache.httpcomponents:httpcore:jar:4.0.1 (编译), commons-validator:commons-validator:jar:1.4.0 (编译), com.jidesoft:jide-oss: jar:3.6.1 (编译), javax.json:javax.json-api:jar:1.0 (编译), org.glassfish:javax.json:jar:1.0.4 (编译), net.sourceforge.barbecue:barbecue :jar:1.5-beta1 (编译), xerces:xercesImpl:jar:2.11.0 (编译), us.fatehi:magnetictrackparser:jar:1.0 (编译), org.jdom:jdom2:jar:2.0.5 (编译) , jaxen:jaxen:jar:1.1.4 (编译), c3p0:c3p0:jar:0.9.1.2 (编译), com.orocube:orocube-common-class es:jar:1.4.2 (编译), joda-time:joda-time:jar:2.3 (编译), org.scream3r:jssc:jar:2.8.0 (编译), org.postgresql:postgresql:jar:9.3 -1103-jdbc3(编译)、com.pax:poslink:jar:20161230(编译)、com.google.maps:google-maps-services:jar:0.1.12(编译)、net.java.dev.jna: jna:jar:4.2.2 (编译), net.java.dev.jna:jna-platform:jar:4.2.2 (编译), com.floreantpos:ploader:jar:1.1.2 (编译)]: 失败读取 net.xeoh:jspf.core:jar:1.0.2 的工件描述符:无法将工件 net.xeoh:jspf.core:pom:1.0.2 从/到 oro (http://team.orocube.net:8081/nexus/content/groups/public/) 传输:连接到 team.orocube .net:8081 [team.orocube.net/69.16.236.56] 失败:连接超时:连接-> [帮助 1]

要查看错误的完整堆栈跟踪,请使用 -e 开关重新运行 Maven。 使用 -X 开关重新运行 Maven 以启用完整的调试日志记录。

有关错误和可能的解决方案的更多信息,请阅读以下文章: [求助1]http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

下面是我的 pom.xml:

<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>org.floreantpos</groupId>
    <artifactId>floreantpos</artifactId>
    <version>1.4-SNAPSHOT</version>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <scm>
        <connection>scm:svn:http://svn.code.sf.net/p/floreantpos/code/trunk</connection>
    </scm>

    <build>
        <sourceDirectory>src</sourceDirectory>
        <finalName>floreantpos</finalName>
        <resources>
            <resource>
                <directory>src</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>resources</directory>
            </resource>
            <resource>
                <directory>filters</directory>
                <filtering>true</filtering>
                <includes>
                    <include>*.properties</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.3</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <doCheck>false</doCheck>
                    <doUpdate>false</doUpdate>
                    <providerImplementations>
                        <svn>javasvn</svn>
                    </providerImplementations>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
                        <artifactId>maven-scm-provider-svnjava</artifactId>
                        <version>2.1.1</version>
                    </dependency>
                    <dependency>
                        <groupId>org.tmatesoft.svnkit</groupId>
                        <artifactId>svnkit</artifactId>
                        <version>1.8.5</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib/</classpathPrefix>
                            <mainClass>com.floreantpos.main.Main</mainClass>
                        </manifest>
                        <manifestEntries>
                            <Class-Path>config/ i18n/</Class-Path>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <descriptor>resources/META-INF/mvn-assembly.xml</descriptor>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>prepare</id>
                        <phase>validate</phase>
                        <configuration>
                            <target>
                                <echo message="prepare phase" />
                                <unzip src="database/derby-server/posdb.zip" dest="${project.build.directory}" />
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                    <execution>
                        <phase>package</phase>
                        <configuration>
                            <target>
                                <zip destfile="${project.build.directory}/${project.build.finalName}-1.4-build${buildNumber}.zip" basedir="${project.build.directory}/${project.build.finalName}-bin/${project.build.finalName}"></zip>
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            org.apache.maven.plugins
                                        </groupId>
                                        <artifactId>
                                            maven-antrun-plugin
                                        </artifactId>
                                        <versionRange>
                                            [1.6,)
                                        </versionRange>
                                        <goals>
                                            <goal>run</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate</artifactId>
            <version>3.2.6.ga</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.transaction</groupId>
                    <artifactId>jta</artifactId>
                </exclusion>
                <exclusion>
                    <artifactId>commons-collections</artifactId>
                    <groupId>commons-collections</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>javax.transaction</groupId>
            <artifactId>jta</artifactId>
            <version>1.1</version>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-annotations</artifactId>
            <version>3.3.1.GA</version>
        </dependency>

        <dependency>
            <groupId>com.miglayout</groupId>
            <artifactId>miglayout</artifactId>
            <version>3.7.4</version>
        </dependency>

        <dependency>
            <groupId>ecs</groupId>
            <artifactId>ecs</artifactId>
            <version>1.4.2</version>
        </dependency>

        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xerces</artifactId>
            <version>2.4.0</version>
        </dependency>

        <dependency>
            <groupId>com.jgoodies</groupId>
            <artifactId>forms</artifactId>
            <version>1.2.1</version>
        </dependency>

        <dependency>
            <groupId>org.swinglabs</groupId>
            <artifactId>swingx-core</artifactId>
            <version>1.6.2-2</version>
        </dependency>

        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derby</artifactId>
            <version>10.8.1.2</version>
        </dependency>

        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derbynet</artifactId>
            <version>10.8.1.2</version>
        </dependency>

        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derbyclient</artifactId>
            <version>10.8.1.2</version>
        </dependency>

        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-client</artifactId>
            <version>1.18.1</version>
        </dependency>

        <dependency>
            <groupId>com.jgoodies</groupId>
            <artifactId>looks</artifactId>
            <version>2.2.2</version>
        </dependency>

        <dependency>
            <groupId>com.intellij</groupId>
            <artifactId>forms_rt</artifactId>
            <version>7.0.3</version>
        </dependency>

        <dependency>
            <groupId>net.sf.jasperreports</groupId>
            <artifactId>jasperreports</artifactId>
            <version>4.0.1</version>
            <exclusions>
                <exclusion>
                    <artifactId>itext</artifactId>
                    <groupId>com.lowagie</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>commons-collections</artifactId>
                    <groupId>commons-collections</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>xml-apis</artifactId>
                    <groupId>xml-apis</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>foxtrot</groupId>
            <artifactId>foxtrot</artifactId>
            <version>2.0</version>
        </dependency>

        <dependency>
            <groupId>org.swinglabs</groupId>
            <artifactId>swing-layout</artifactId>
            <version>1.0.3</version>
        </dependency>

        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
        </dependency>

        <dependency>
            <groupId>commons-configuration</groupId>
            <artifactId>commons-configuration</artifactId>
            <version>1.2</version>
            <exclusions>
                <exclusion>
                    <artifactId>servlet-api</artifactId>
                    <groupId>javax.servlet</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>xml-apis</artifactId>
                    <groupId>xml-apis</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.15</version>
            <exclusions>
                <exclusion>
                    <artifactId>mail</artifactId>
                    <groupId>javax.mail</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jms</artifactId>
                    <groupId>javax.jms</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jmxtools</artifactId>
                    <groupId>com.sun.jdmk</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jmxri</artifactId>
                    <groupId>com.sun.jmx</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.30</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.9</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>org.metawidget.modules</groupId>
            <artifactId>metawidget-all</artifactId>
            <version>3.9</version>
        </dependency>
        <dependency>
            <groupId>net.xeoh</groupId>
            <artifactId>jspf.core</artifactId>
            <version>1.0.2</version>
        </dependency>
        <dependency>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
            <version>1.2</version>
        </dependency>

        <dependency>
            <groupId>net.authorize</groupId>
            <artifactId>anet-java-sdk</artifactId>
            <version>1.8.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>4.0.1</version>
        </dependency>
        <dependency>
            <groupId>commons-validator</groupId>
            <artifactId>commons-validator</artifactId>
            <version>1.4.0</version>
        </dependency>

        <dependency>
            <groupId>com.jidesoft</groupId>
            <artifactId>jide-oss</artifactId>
            <version>3.6.1</version>
        </dependency>

        <dependency>
            <groupId>javax.json</groupId>
            <artifactId>javax.json-api</artifactId>
            <version>1.0</version>
        </dependency>

        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>javax.json</artifactId>
            <version>1.0.4</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.barbecue</groupId>
            <artifactId>barbecue</artifactId>
            <version>1.5-beta1</version>
        </dependency>

        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.11.0</version>
        </dependency>

        <dependency>
            <groupId>us.fatehi</groupId>
            <artifactId>magnetictrackparser</artifactId>
            <version>1.0</version>
        </dependency>

        <dependency>
            <groupId>org.jdom</groupId>
            <artifactId>jdom2</artifactId>
            <version>2.0.5</version>
        </dependency>
        <dependency>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
            <version>1.1.4</version>
        </dependency>
        <dependency>
            <groupId>c3p0</groupId>
            <artifactId>c3p0</artifactId>
            <version>0.9.1.2</version>
        </dependency>
        <dependency>
            <groupId>com.orocube</groupId>
            <artifactId>orocube-common-classes</artifactId>
            <version>1.4.2</version>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.3</version>
        </dependency>
        <dependency>
            <groupId>org.scream3r</groupId>
            <artifactId>jssc</artifactId>
            <version>2.8.0</version>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>9.3-1103-jdbc3</version>
        </dependency>
        <dependency>
            <groupId>com.pax</groupId>
            <artifactId>poslink</artifactId>
            <version>20161230</version>
        </dependency>
        <dependency>
            <groupId>com.google.maps</groupId>
            <artifactId>google-maps-services</artifactId>
            <version>0.1.12</version>
        </dependency>
        <dependency> 
            <groupId>net.java.dev.jna</groupId> 
            <artifactId>jna</artifactId> 
            <version>4.2.2</version> 
        </dependency> 
        <dependency> 
            <groupId>net.java.dev.jna</groupId> 
            <artifactId>jna-platform</artifactId> 
            <version>4.2.2</version> 
        </dependency>
        <dependency> 
            <groupId>com.floreantpos</groupId> 
            <artifactId>ploader</artifactId> 
            <version>1.1.2</version> 
        </dependency>
    </dependencies>

    <!-- <repositories>
        <repository>
            <id>local-repo</id>
            <url>file://${project.basedir}/local-lib</url>
        </repository>
    </repositories> -->
    <repositories>
        <repository>
            <id>oro</id>
            <url>http://team.orocube.net:8081/nexus/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
    <distributionManagement>
        <repository>
            <id>oro</id>
            <name>oro release</name>
            <url>http://team.orocube.net:8081/nexus/content/repositories/releases</url>
        </repository>
        <snapshotRepository>
            <id>oro</id>
            <url>http://team.orocube.net:8081/nexus/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
</project>

我该如何解决这个错误?

【问题讨论】:

    标签: maven


    【解决方案1】:

    Maven 在定义的存储库中找不到指定的依赖项。这可能有多种原因,包括:

    • 您需要添加额外的存储库来解决依赖关系。
    • 您位于阻止您下载依赖项的代理或防火墙后面。

    通过浏览器查看存储库,看看是否存在所需的工件。

    【讨论】:

    • 当我通过浏览器查看存储库时,出现了危险警告消息:“前面的站点包含恶意软件”。这是什么意思?
    • 这意味着您的防火墙/防病毒程序可能会阻止 Maven 访问该站点。是否真的危险,我不知道。
    • 我尝试在手机上打开存储库,但没有打开。它显示“无法访问此站点”。
    猜你喜欢
    • 2013-08-29
    • 1970-01-01
    • 1970-01-01
    • 2014-11-27
    • 2016-05-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-21
    相关资源
    最近更新 更多