简体   繁体   中英

Error trying to use maven-nar-plugin

I'm trying to build a native "C" project using maven using maven-nar-plugin. I am getting the following errors:

[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]

Following is the relevant section from my pom file:

<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>

More info:

  1. I'm using Maven version 3.0.5
  2. I cannot see the maven-nar-plugin in the Central Repository either
  3. I see it is available @ http://duns.github.io/maven-snapshots/ . I don't know how to tell maven to look here. It's looking into (2) by default.

An official nar-maven-plugin version 3.0.0 has been released, and is now available from Maven Central . Two notes:

  1. The groupId and artifactId changed; the GAV is now:

     <plugin> <groupId>com.github.maven-nar</groupId> <artifactId>nar-maven-plugin</artifactId> <version>3.0.0</version> </plugin> 
  2. The cpptasks-parallel project has been merged into nar-maven-plugin , so no need to worry about that dependency anymore.

See also SO #15771086 .

The nar plugin developers didn't add it to Maven Central. However, you can use the following module, which is a repackage of the nar plugin:

http://mvnrepository.com/artifact/org.codeswarm/maven-nar-plugin

It has been working fine for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM