How can I display a message in Maven?
In ant, we do have \"echo\" to display a message, but in maven, how can I do that?
You can use the antrun plugin:
maven-antrun-plugin
generate-resources
run
Hello world!
One issue though is that you have to choose what phase of the build lifecycle to bind this to (my example has the plugin bound to generate-resources
). Unlike Ant, you aren't controlling the lifecycle yourself, but rather just binding plugins to certain points in a pre-defined lifecycle. Depending on what you are actually trying to do, this may or may not make sense for your use case.