我正在尝试使用maven使用maven-nar-plugin构建一个原生的“C”项目。我收到以下错误:
[WARNING] The POM for org.apache.maven.plugins:maven-nar-plugin:jar:2.1-SNAPSHOT is missing, no dependency information available
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.sec.mediascoop:mediascoop:1.0-SNAPSHOT (D:\source\metadata\mediascoop\pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Plugin org.apache.maven.plugins:maven-nar-plugin:2.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.apache.maven.plugins:maven-nar-plugin:jar:2.1-SNAPSHOT -> [Help 2]
以下是我的pom文件中的相关部分:
<project>
...
<packaging>nar</packaging>
...
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-nar-plugin</artifactId>
<version>2.1-SNAPSHOT</version>
<extensions>true</extensions>
<configuration>
<layout>NarLayout20</layout>
<libraries>
<library>
<type>shared</type>
</library>
</libraries>
</configuration>
</plugin>
</plugins>
</build>
更多信息:
maven-nar-plugin
答案 0 :(得分:3)
官方nar-maven-plugin
版本3.0.0已发布,现在为available from Maven Central。两个注意事项:
groupId和artifactId已更改; GAV现在是:
<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
<version>3.0.0</version>
</plugin>
cpptasks-parallel
项目已合并到nar-maven-plugin
,因此无需担心该依赖项。
另见SO #15771086。
答案 1 :(得分:2)
nar插件开发人员没有将它添加到Maven Central。但是,您可以使用以下模块,这是对nar插件的重新打包:
http://mvnrepository.com/artifact/org.codeswarm/maven-nar-plugin
它对我来说一直很好。