Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIFI-5304 - Changed Lifecycle Phase Binding for Help Mojo #5

Closed
wants to merge 1 commit into from

Conversation

MartinPayne
Copy link
Contributor

Moved Maven Plugin Plugin help Mojo from "process-classes" to
"generate-sources" lifecycle phase to ensure the help Mojo is included
in the built plugin.

Moved Maven Plugin Plugin help Mojo from "process-classes" to
"generate-sources" lifecycle phase to ensure the help Mojo is included
in the built plugin.
@ottobackwards
Copy link

@MartinPayne how can this be verified?

@MartinPayne
Copy link
Contributor Author

@ottobackwards To verify, mvn install into your local repository and compare the outputs of mvn org.apache.nifi:nifi-nar-maven-plugin:1.2.0:help and mvn org.apache.nifi:nifi-nar-maven-plugin:1.2.1-SNAPSHOT:help. The latter should correctly show the help.

@ottobackwards
Copy link

Ok, once I got past some PEBCAK issues:

 ottofowler@Winterfell  ~/tmp/apache-nifi-maven-pr-5   pr-5  mvn org.apache.nifi:nifi-nar-maven-plugin:1.2.1-SNAPSHOT:help
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO]
[INFO] ---------------< org.apache.nifi:nifi-nar-maven-plugin >----------------
[INFO] Building nifi-nar-maven-plugin 1.2.1-SNAPSHOT
[INFO] ----------------------------[ maven-plugin ]----------------------------
[INFO]
[INFO] --- nifi-nar-maven-plugin:1.2.1-SNAPSHOT:help (default-cli) @ nifi-nar-maven-plugin ---
[INFO] nifi-nar-maven-plugin 1.2.1-SNAPSHOT
  Apache NiFi Nar Maven Plugin

This plugin has 3 goals:

nifi-nar:help
  Display help information on nifi-nar-maven-plugin.
  Call mvn nifi-nar:help -Ddetail=true -Dgoal=<goal-name> to display parameter
  details.

nifi-nar:nar
  Packages the current project as an Apache NiFi Archive (NAR). The following
  code is derived from maven-dependencies-plugin and maven-jar-plugin. The
  functionality of CopyDependenciesMojo and JarMojo was simplified to the use
  case of NarMojo.

nifi-nar:provided-nar-dependencies
  Generates the listing of dependencies that is provided by the NAR dependency
  of the current NAR. This is important as artifacts that bundle dependencies
  will not project those dependences using the traditional maven dependency
  plugin. This plugin will override that setting in order to print the
  dependencies being inherited at runtime.


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.328 s
[INFO] Finished at: 2018-06-14T14:21:07-04:00
[INFO] ----------------------------------------------------------------------

Where previously you would get

mvn org.apache.nifi:nifi-nar-maven-plugin:1.2.0:help
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.568 s
[INFO] Finished at: 2018-06-14T14:21:36-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'help' in plugin org.apache.nifi:nifi-nar-maven-plugin:1.2.0 among available goals nar, provided-nar-dependencies -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoNotFoundException

So, this looks good to go.
+1

@bbende
Copy link
Contributor

bbende commented Jul 18, 2018

This looks good, going to merge shortly, thanks!

@asfgit asfgit closed this in 953ddf4 Jul 18, 2018
@MartinPayne MartinPayne deleted the upstream/pr/help-mojo branch July 22, 2018 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants