我正在尝试使用Maven编译Floreant POS源代码。我从SVN信息库获取源代码,并尝试运行“mvn clean install”命令,但出现以下错误:

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building floreantpos 1.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.oro:licensor:jar:1.1-SNAPSHOT is missing, no dependency information available
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ floreantpos ---
[INFO] Deleting C:\workspace\floreantpos-code-706-trunk\target
[INFO]
[INFO] --- buildnumber-maven-plugin:1.3:create (default) @ floreantpos ---
[INFO] Downloading: http://maven.tmatesoft.com/content/repositories/releases/org/tmatesoft/svnkit/svnkit/1.8.4/svnkit-1.8.4.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.329 s
[INFO] Finished at: 2016-07-20T15:33:40-03:00
[INFO] Final Memory: 13M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.3:create (default) on project floreantpos: Execution default of goal org.codehaus.mojo:buildnumber-maven-plugin:1.3:create failed: Plugin org.codehaus.mojo:buildnumber-maven-plugin:1.3 or one of its dependencies could not be resolved: Failed to collect dependencies at org.codehaus.mojo:buildnumber-maven-plugin:jar:1.3 -> com.google.code.maven-scm-provider-svnjava:maven-scm-provider-svnjava:jar:2.1.1 -> org.tmatesoft.svnkit:svnkit:jar:1.8.4: Failed to read artifact descriptor for org.tmatesoft.svnkit:svnkit:jar:1.8.4: Could not transfer artifact org.tmatesoft.svnkit:svnkit:pom:1.8.4 from/to maven.tmatesoft.com.releases (http://maven.tmatesoft.com/content/repositories/releases): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [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/PluginResolutionException

谁能帮我?谢谢!

最佳答案

简单的解决方案是从pom.xml文件中删除以下插件

<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>

谢谢

关于java - Floreant POS:使用Maven构建时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38488329/

10-10 05:25