本文介绍了Alfresco Maven SDK - 如果模块版本字符串以“-SNAPSHOT"结尾,则失败;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我创建了一个 amp 项目,包括 repo 和 share,但每次我尝试构建或运行该项目时都会失败:

So I created an amp project, both repo and share, and every time I try to build or run the project it fails with:

java.lang.NoClassDefFoundError: de/schlichtherle/truezip/fs/FsSyncExceptionBuilder
    at de.schlichtherle.truezip.fs.FsManager.sync(FsManager.java:99)
    at de.schlichtherle.truezip.fs.FsSyncShutdownHook$Hook.run(FsSyncShutdownHook.java:93)
Caused by: java.lang.ClassNotFoundException: de.schlichtherle.truezip.fs.FsSyncExceptionBuilder
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
    ... 2 more

pom.xml

<project [...]>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.someco</groupId>
    <artifactId>someco-repo</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <name>someco-repo AMP project</name>
    <packaging>amp</packaging>
    [...]
    <parent>
        <groupId>org.alfresco.maven</groupId>
        <artifactId>alfresco-sdk-parent</artifactId>                       
        <version>1.1.1</version> // same with 1.1.0
    </parent>

将模块版本从 1.0.0-SNAPSHOT 更改为 1.0.0 有效,但随后我无法使用快照(或至少将它们标识为 -快照).

Changing the module version from 1.0.0-SNAPSHOT to 1.0.0 works, but then I cannot work with snapshots (or at least identify them as -SNAPSHOT).

有什么想法吗?

推荐答案

这实际上应该有效.所以我想知道你的环境中是否有一些奇怪的东西.您是否有机会删除该库的本地副本 (~/.m2/repository/de/schlichterle/truezip) 并重试?

This should actually work. So I wonder if there's something weird in your env. Any chance you can delete the local copy of that library (~/.m2/repository/de/schlichterle/truezip) and retry?

我想知道您是否有损坏的版本.

I wonder if you have a corrupted version.

听起来很奇怪,但它在您更改版本时有效...

Sounds weird though that it works when you change the version...

这篇关于Alfresco Maven SDK - 如果模块版本字符串以“-SNAPSHOT"结尾,则失败;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 05:58