[
https://issues.apache.org/jira/browse/NIFI-8028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17286367#comment-17286367
]
Chris Sampson commented on NIFI-8028:
-------------------------------------
An alternative may be to change the relevant enforcer rule to use the suggested
{{onlyWhenRelease}} property instead of the current
{{failWhenParentIsSnapshot}} (as is commented in the
[pom.xml|https://github.com/apache/nifi/blob/main/pom.xml#L643]).
The Wiki should still be updated as suggested, probably with some guidance on
how to prevent build failure, e.g. include a {{-Denforcer.skip=true}} flag when
building custom processors with Maven that have a {{-SNAPSHOT}} version - but
of course, this skips *all* rules, not just the SNAPSHOT check.
*Or* include an enforcer override in the custom processor's pom.xml if the
developer does not wish to use any enforcer rules during any builds (maybe they
don't need to follow the same rules as the main NiFi build if they're not going
to be committing their processors to the NiFi repository), e.g.
```xml
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
```
or
```xml
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<inherited>false</inherited>
</plugin>
</plugins>
```
Maybe the archetype could be updated to include one of the above but, by
default, execute the enforcer rules - then all a developer needs to do is
change a boolean property to allow their build to run as they may desire (i.e.
many developers are likely to use {{-SNAPSHOT}} versions during local/initial
development before releasing their code... much like is done in the main
apache/nifi repo, of course).
> Cannot compile "SNAPSHOT" extention
> -----------------------------------
>
> Key: NIFI-8028
> URL: https://issues.apache.org/jira/browse/NIFI-8028
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 1.12.0, 1.12.1
> Reporter: humpfhumpf
> Priority: Minor
>
> Since NIFI-7291, the master pom.xml forbids to compile an extension with
> version like "1.0-SNAPSHOT" (through `enforce-no-snapshots` rule).
> The [Wiki
> page|https://cwiki.apache.org/confluence/display/NIFI/Maven+Projects+for+Extensions]
> should mention it.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)