maven - How can I run a script before RPM file creation? -


I am using rpm-maven-plugin to create an RPM of tarbars with WARs from my project. I can create an RPM if I already have a tar file, however, when I run the RPM target, I would like to generate tar file

I have a script which creates a tar file. In the finished stage, although the RPM is already built when the script is implemented, thus this RARA is not included in my RPM.

  & lt; Plugin & gt; & Lt; Group & gt; Org.codehaus.mojo & lt; / Group & gt; & Lt; ArtifactId & gt; RPM-Maven-plugin & lt; / ArtifactId> & Lt; Version & gt; 2.1-alpha 4 & lt; / Edition & gt; & Lt; Hanging & gt; & Lt; Execution & gt; & Lt; ID & gt; Generated-rpm & lt; / Id & gt; & Lt; Goals & gt; & Lt; Goal & gt; Rpm & lt; / Target & gt; & Lt; / Targets & gt; & Lt; / Execution & gt; & Lt; / Hanging & gt; & Lt; Configuration & gt; & Lt; Mapping & gt; & Lt; Mapping & gt; & Lt; Directory & gt; / Foo & lt; / Directory & gt; & Lt; Sources & gt; & Lt; Source & gt; & Lt; Location & gt; DIRECTORY_FOR_MY_TAR & lt; / Location & gt; & Lt; / Source & gt; & Lt; / Sources & gt; & Lt; / Mapping & gt; & Lt; / Mapping & gt; & Lt; DefineStatements & gt; & Lt; DefineStatement & gt; _unpackaged_files_terminate_build 0 & lt; / Define Statement & gt; & Lt; / DefineStatements & gt; & Lt; PrepareScriptlet & gt; & Lt; Script & gt; ./../../../../ Scripts / rpm / Ready / makeATar.sh & lt; / Script & gt; & Lt; / PrepareScriptlet & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt;  

When I run mvn rpm: rpm , the makearar script creates a tariff in DIRECTORY_FOR_MY_TAR, but it is not included in my RPM. If I run the mvn rpm: rpm then my rear will be successfully included in the RPM (since the execution of it was made to DIRECTORY_FOR_MY_TAR last time I mvn rpm: rpm ).

We also have a similar setup where we create some artifacts and then give them an RPM With rpm-maven-plugin . In order to organize the artworks before packing in the form of RPM, we will get the

  • in the ready-package
  • < / Li> ul>

    This works very well for us.
    You can compile the rpm-maven-plugin execution in the Install step and use artifacts that are packages Package in phase or put RPM packing in a separate Maven module and creating it after the other module

    I hope this will be helpful.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -