Ok, will try to just post simple thing.

The project has the following :
<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
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>ch.amexio.nifi.transform</groupId>
        <artifactId>nifi-transform-nar-bundles</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </parent>

    <artifactId>nifi-transform-service-api</artifactId>
    <packaging>jar</packaging>

    <dependencies>
        <!-- NiFi dependencies. -->
        <dependency>
            <groupId>org.apache.nifi</groupId>
            <artifactId>nifi-api</artifactId>
        </dependency>
    </dependencies>
</project>

the nar project ::

<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
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>ch.amexio.nifi.transform</groupId>
        <artifactId>nifi-transform-nar-bundles</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </parent>

    <artifactId>nifi-transform-service-api-nar</artifactId>
    <packaging>nar</packaging>

    <properties>
        <maven.javadoc.skip>true</maven.javadoc.skip>
        <source.skip>true</source.skip>
    </properties>

    <dependencies>
        <!-- Project dependencies. -->
        <dependency>
            <groupId>ch.amexio.nifi.transform</groupId>
            <artifactId>nifi-transform-service-api</artifactId>
            <version>0.0.1-SNAPSHOT</version>
            <scope>compile</scope>
        </dependency>

        <!-- NiFi dependencies. -->
        <dependency>
            <groupId>org.apache.nifi</groupId>
            <artifactId>nifi-standard-services-api-nar</artifactId>
            <type>nar</type>
        </dependency>
    </dependencies>
</project>

It was then in failure.
What I did, is to change the my parent pom and add the following in
dependencies
    <dependencies>
        <!-- NiFi dependencies. -->
        <!-- Required for NAR generation. -->
        <dependency>
            <groupId>org.apache.nifi</groupId>
            <artifactId>nifi-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.nifi</groupId>
            <artifactId>nifi-framework-api</artifactId>
        </dependency>
    </dependencies>


By the way, I submit a Pull Request on nifi-maven
https://github.com/apache/nifi-maven/pull/13
With following change :
https://github.com/apache/nifi-maven/pull/13/files

Etienne



Le ven. 19 juin 2020 à 13:52, Mike Thomsen <[email protected]> a
écrit :

> Without seeing your POM(s), it could be several things. Try posting your
> POMs here or as a GitHub gist.
>
> On Fri, Jun 19, 2020 at 3:36 AM Etienne Jouvin <[email protected]>
> wrote:
>
>> Hello all.
>>
>> Do not know where to post the message, guide me if I should send to
>> another mailing list.
>> A simple summary in first step.
>> I created a simple project to build a new service.
>> I extend the nifi-nar-bundles artifact with version 1.11.4.
>> My project version is currently 0.0.1-SNAPSHOT.
>>
>> During NAR generation, it failed for the documentation with message :
>> org.apache.maven.plugin.MojoExecutionException: Failed to create
>> Extension Documentation
>> Caused by: org.apache.maven.plugin.MojoExecutionException: Could not
>> resolve local dependency org.apache.nifi:nifi-api:jar:0.0.1-SNAPSHOT
>>
>> I am currently looking in source code of nifi-maven project, specially
>> class ExtensionClassLoaderFactory.
>>
>> What I do not understand is why it searches for version 0.0.1-SNAPSHOT on
>> nifi-api, and not the version 1.11.4
>>
>> Let me know if I should discuss about this in another thread.
>>
>> Regards
>>
>> Etienne
>>
>

Reply via email to