当我运行任何 maven 命令(如mvn clean
ormvn clean install
或)时,我遇到了错误mvn eclipse:eclipse
。
但是我可以在我的系统中运行除此之外的任何其他 maven 项目,所以我确信它与路径问题或代理无关。
以下是我的错误
1.[错误]构建无法读取1个项目-> [帮助1] org.apache.maven.project.ProjectBuildingException:处理POM时遇到一些问题:
2.[错误] 无法解决的构建扩展:插件 com.opencloud.maven.plugins:maven-opencloud-jainslee-plugin:1.1 或其依赖项之一无法解决:未能找到“com.opencloud.maven.plugins:maven “ http://repo.maven.apache.org/maven2 ”中的-opencloud-jainslee-plugin:jar:1.1”被缓存在本地仓库中,直到central的更新间隔已经过去或更新完成后才会重新尝试解析强制@
3.[错误]未知包装:"
我用 maven 命令生成了 sbb 文件,
mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeCatalog=http://developer.opencloud.com/maven2/public
它生成成功。
但是当使用 mvn clean install 构建它时,它会出现上述错误
下面是我的 POM.xml
<modelVersion>4.0.0</modelVersion>
<groupId>com.bt</groupId>
<artifactId>myapp-sbb</artifactId>
<packaging>jainslee-sbb-jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>myapp SBB</name>
<dependencies>
<dependency>
<groupId>javax.slee</groupId>
<artifactId>jainslee-api</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>com.opencloud</groupId>
<artifactId>jainslee-base-classes</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>com.opencloud.maven.plugins</groupId>
<artifactId>maven-opencloud-jainslee-plugin</artifactId>
<extensions>true</extensions>
<version>1.1</version>
<configuration>
<jainsleeVersion>1.1</jainsleeVersion>
<createLibrary>true</createLibrary>
<createDeploymentUnit>true</createDeploymentUnit>
</configuration>
</plugin>
</plugins>
</build>
当我在命令行和 Eclipse 中运行 maven clean 时,我会得到以下错误
C:\Users\611542579\Documents\NOAS-CSG\Sample\com.bt>mvn clean
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project myApp:com.bt-sbb:1.0-SNAPSHOT
(C:\Users\611542579\Documents\NOAS-CSG\Sample\com.bt\pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Error resolving version for plugin
'com.opencloud.maven.plugins:maven-opencloud-jainslee-plugin'
from the repositories
[local (C:\Users\611542579\.m2\repository),
central (http://repo.maven.apache.org/maven2)]:
Plugin not found in any plugin repository -> [Help 2]
[ERROR] Unknown packaging: jainslee-sbb-jar @ line 7, column 16
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginVersionResolutionException