You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Etienne Jouvin <la...@gmail.com> on 2021/01/18 14:35:59 UTC

Custom Processors / Service packaging

Hello all.

Upgrade to 1.12.1 for my custom processors and services.
What a surprise, the packaging failed with error message :
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireReleaseDeps
failed with message:
Other than org apache nifi components themselves no snapshot dependencies
are allowed
Found Banned Dependency: XXX:jar:0.0.1-SNAPSHOT
Use 'mvn dependency:tree' to locate the source of the banned dependencies.


I checked the default pom.xml file and what a surprise :
<execution>
    <id>enforce-no-snapshots</id>
    <goals>
        <goal>enforce</goal>
    </goals>
    <configuration>
        <rules>
            <requireReleaseDeps>
                <message>Other than org apache nifi components themselves
no snapshot dependencies are allowed</message>
                <!-- If we want to only enforce this for nifi release
itself we should add 'onlyWhenRelease' and remove
'failWhenParentIsSnapshot' element -->
                <failWhenParentIsSnapshot>false</failWhenParentIsSnapshot>
                <excludes>
                    <exclude>org.apache.nifi:*</exclude>
                    <exclude>org.apache.nifi.registry:*</exclude>
                </excludes>
            </requireReleaseDeps>
        </rules>
        <fail>true</fail>
    </configuration>
</execution>

I understand a restriction is necessary on dependencies. But it also means
that we can not develop custom processors / services with a different group.

Or may be there is a specific profile for packaging during development
phase, with SNAPSHOTS ?

ANy idea ?

Regards

Etienne Jouvin

Re: Custom Processors / Service packaging

Posted by Bryan Bende <bb...@gmail.com>.
Hello,

The issue is that your custom NAR has a parent of nifi-nar-bundles so
therefore is inheriting things from NiFi's main build, which it sounds
like you don't want.

So you are free to make your NAR project not have a parent of
nifi-nar-bundles, you will likely have to make a few tweaks to your
poms to declare some specific versions of things that you were
inheriting before.

https://cwiki.apache.org/confluence/display/NIFI/Maven+Projects+for+Extensions#MavenProjectsforExtensions-Inheritance

-Bryan

On Mon, Jan 18, 2021 at 9:36 AM Etienne Jouvin <la...@gmail.com> wrote:
>
> Hello all.
>
> Upgrade to 1.12.1 for my custom processors and services.
> What a surprise, the packaging failed with error message :
> [WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireReleaseDeps failed with message:
> Other than org apache nifi components themselves no snapshot dependencies are allowed
> Found Banned Dependency: XXX:jar:0.0.1-SNAPSHOT
> Use 'mvn dependency:tree' to locate the source of the banned dependencies.
>
>
> I checked the default pom.xml file and what a surprise :
> <execution>
>     <id>enforce-no-snapshots</id>
>     <goals>
>         <goal>enforce</goal>
>     </goals>
>     <configuration>
>         <rules>
>             <requireReleaseDeps>
>                 <message>Other than org apache nifi components themselves no snapshot dependencies are allowed</message>
>                 <!-- If we want to only enforce this for nifi release itself we should add 'onlyWhenRelease' and remove 'failWhenParentIsSnapshot' element -->
>                 <failWhenParentIsSnapshot>false</failWhenParentIsSnapshot>
>                 <excludes>
>                     <exclude>org.apache.nifi:*</exclude>
>                     <exclude>org.apache.nifi.registry:*</exclude>
>                 </excludes>
>             </requireReleaseDeps>
>         </rules>
>         <fail>true</fail>
>     </configuration>
> </execution>
>
> I understand a restriction is necessary on dependencies. But it also means that we can not develop custom processors / services with a different group.
>
> Or may be there is a specific profile for packaging during development phase, with SNAPSHOTS ?
>
> ANy idea ?
>
> Regards
>
> Etienne Jouvin