This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I am wondering what all, exactly, does the Maven RPM Plug-In actually do,... besides creating a deliverable package ?? I understand that it can include scripts that can be somehow executed that determine how the RPM package will install itself -or- uninstall itself; but how does it all happen ? I am presuming that Maven can be relied upon to create the RPM package, via the RPM Plug-In's available goals. The package will usually contain an executable artifact that is also a Maven project or module. But how ( and when) do the scripts get executed ? Does Maven do the script invocation during the deployment phase; or is that something that is done in concert with some third-party Package-Management application ?? Can Maven also run the scripts itself, and thereby initiate the process of Installing the completed package to a specific target directory ?
I have never run the maven rpm plugin nor looked at its documentation, but from what I know of RPM and Maven, I can make a few guesses. First, rpm takes a number of parameters, including a list of files or directories (one of the files being the rpm installation script), and uses all of the information to build the rpm package. The Maven rpm plugin should provide configuration options to set the various rpm command line options and specify the locations of files, which might also include selecting among dependencies.
The Maven rpm plugin only performs rpm packaging, it does not run an rpm (that is, you cannot use the rpm plugin to install an application packaged as an rpm). Note that in Maven the term "install" means "place the built artifact(s) into the local repository" and the term "deploy" means "place the artifact(s) into a remote repository". Neither of these terms have the usual meaning. Therefore, the rpm installation scripts are never called.
If you need to run an rpm install as part of your build, then use the maven exec plugin to invoke the rpm utility to run the installation.