gpt4 book ai didi

java - 使用 Tycho/Maven 构建 RAP 会出现 DuplicateReactorIUsException

转载 作者:行者123 更新时间:2023-12-01 11:15:30 25 4
gpt4 key购买 nike

我正在艰难地使用 Tycho 让 Maven 编译我的基于 OSGi 的 RAP 应用程序。我想我几乎已经把所有东西粘在一起了,但是有一个错误我无法修复,因为我不知道它来自哪里。使用工作目录根目录中的任何 Maven 命令,我都会收到以下错误:

[ERROR] Internal error: org.eclipse.tycho.p2.target.DuplicateReactorIUsException: Duplicate reactor project IUs.
[ERROR] de.andre.osgitest 0.0.1.qualifier => [C:\eclipse\modeling\pomws\de.andre.osgitest, C:\eclipse\modeling\pomws\de.andre.osgitest.product]
[ERROR] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: org.eclipse.tycho.p2.target.DuplicateReactorIUsException: Duplicate reactor project IUs.
de.andre.osgitest 0.0.1.qualifier => [C:\eclipse\modeling\pomws\de.andre.osgitest, C:\eclipse\modeling\pomws\de.andre.osgitest.product]

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:121)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.eclipse.tycho.p2.target.DuplicateReactorIUsException: Duplicate reactor project IUs.
de.andre.osgitest 0.0.1.qualifier => [C:\eclipse\modeling\pomws\de.andre.osgitest, C:\eclipse\modeling\pomws\de.andre.osgitest.product]

at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.getPreliminaryReactorProjectUIs(TargetPlatformFactoryImpl.java:376)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:179)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:128)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:1)
at org.eclipse.tycho.p2.manager.ReactorRepositoryManagerImpl.computePreliminaryTargetPlatform(ReactorRepositoryManagerImpl.java:84)
at org.eclipse.tycho.p2.resolver.P2DependencyResolver.computePreliminaryTargetPlatform(P2DependencyResolver.java:223)
at org.eclipse.tycho.core.resolver.DefaultTychoResolver.resolveProject(DefaultTychoResolver.java:109)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:95)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:266)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
... 11 more

项目结构如下:

root
|de.andre.osgitest
| |src
| | | ...
| |
| |META-INF
| | | MANIFEST.MF
| |
| |OSGI-INF
| | | contribution.xml
| |
| |WEB-INF
| | | launch.ini
| | | web.xml
| |
| |- build.properties
| |- de.andre.osgitest.launch
| |- osgitest.target
| |- pom.xml
|
|de.andre.osgitest.feature
| |rootfiles
| | |lib
| | | |- org.eclipse.equinox.servletbridge_1.3.0.v20140430-1556.jar
| | |
| | |- launch.ini
| | |- web.xml
| |
| |- pom.xml
| |- feature.xml
| |- build.properties
|
|de.andre.osgitest.product
| |- pom.xml
| |- osgitest.product
| |- assembly.xml
|
|- pom.xml

因为 pom.xml 对于这个线程来说太多了,我将引用 http://pastebin.com/S7AM7hbW在这里。

我希望你们中的一位聪明人有一个想法。

干杯,安德烈

最佳答案

看来您需要确保所有 artifactId 都是唯一的 ( http://software.2206966.n2.nabble.com/Does-artifact-id-really-have-to-be-globally-unique-0-10-regression-td5630018.html )。

我通常使用这种模式:

<groupId>com.example.product</groupId> 
<artifactId>com.example.product.bundle1</artifactId>

<groupId>com.example.product</groupId>
<artifactId>com.example.product.bundle2</artifactId>

其中 artifactId 与 bundle Bundle-SymbolicName 匹配。

关于java - 使用 Tycho/Maven 构建 RAP 会出现 DuplicateReactorIUsException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31878776/

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