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

Reply via email to