我发誓这是一个非常简单的问题,但不知怎的,我无法弄明白。它只是c ++中的一个hello world。我正在使用nar-maven-plugin。
我已经研究过其他问题,但问题仍未得到解决。
这是我的pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>myapp</groupId>
<artifactId>myapp</artifactId>
<packaging>nar</packaging>
<version>1.0-SNAPSHOT</version>
<name>myapp</name>
<properties>
<skipTests>true</skipTests>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-marven-plugin</artifactId>
<version>3.5.1</version>
<extensions>true</extensions>
<configuration>
<os>Linux</os>
<skipTests>true</skipTests>
<cpp>
<name>g++</name>
<debug>true</debug>
<options>
<option>-g</option>
<option>-Wall</option>
</options>
</cpp>
<linker>
<name>g++</name>
</linker>
<libraries>
<library>
<type>executable</type>
</library>
</libraries>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>cppunit</groupId>
<artifactId>cppunit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
我已经下载了一个nar maven插件的示例应用程序,它运行良好。但是凭借我自己的应用程序,它不能。
[INFO] Scanning for projects...
[WARNING] The POM for com.github.maven-nar:nar-marven-plugin:jar:3.5.1 is missing, no dependency information available
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin com.github.maven-nar:nar-marven-plugin:3.5.1 or one of its dependencies could not be resolved: Failure to find com.github.maven-nar:nar-marven-plugin:jar:3.5.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @
[ERROR] Unknown packaging: nar @ line 6, column 14
[ERROR] 'dependencies.dependency.version' for cppunit:cppunit:jar is missing. @ line 44, column 17
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project myapp:myapp:1.0-SNAPSHOT (/home/liu/Downloads/mavenproj/myapp/pom.xml) has 3 errors
[ERROR] Unresolveable build extension: Plugin com.github.maven-nar:nar-marven-plugin:3.5.1 or one of its dependencies could not be resolved: Failure to find com.github.maven-nar:nar-marven-plugin:jar:3.5.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 2]
[ERROR] Unknown packaging: nar @ line 6, column 14
[ERROR] 'dependencies.dependency.version' for cppunit:cppunit:jar is missing. @ line 44, column 17
[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/PluginManagerException
非常感谢!