Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8152775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:48:49+00:00 2026-06-06T15:48:49+00:00

I’m planing to package WAR files as RPMs. Current deployment process just doesn’t work

  • 0

I’m planing to package WAR files as RPMs. Current deployment process just doesn’t work for us and my idea of fixing it would be to create a new Custom Channel in RHN Satellite and publish my WAR files through that Channel. Currently (as we are trying to win some time) I’m managing some config files through Satellite so configs are not a big problem. We don’t keep them in WAR for many reasons but that’s different story.

Anyway, has anyone packaged WAR as RPMs? Do you do hot deployment or do you force JBOSS/Tomcat to restart? Is that After RPM installation or as a part of it? What’s your SPEC file looks like? Can I please see it as an example? Do you check in your SPEC for JBOSS/Java/Oracle client or just install WAR? Any stories to tell? Any major problems?
Should I consider something else?
I can build RPMs no problem but I’d like to hear what’s the best way of doing this with WAR files and JBOSS (some Tomcats are still running here but they will be phased out soon-ish so I’m not too worried about them).

I do appropriate any input.

Thanks in advance
Kind Regards
Chris

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:48:52+00:00Added an answer on June 6, 2026 at 3:48 pm

    I have packaged a WAR file and its companion config file as RPM. My SPEC file checks whether JBoss is running. If it is, the installation exits with an error message, requesting that JBoss be stopped before installation.

    In general, it is not a good idea to kill processes or force restart through RPMs. The person in charge of installation should have a separate procedure for doing this.

    Other considerations:

    1. Does your organization have other installations on the same server?

    If so, you might want to standardize on a path under which all installations on the server will go. (For example, /usr/local/bin/myorg/)
    It might also help to have a custom *nix user and group, for which file attributes are set for all installations on the server.

    2. Do you want a relocatable RPM?

    Is there ever a chance that you might want to change the default path for your installation? If so, a relocatable RPM will help.
    There are conditions where a relocatable RPM may not work, so check out these things to consider at http://www.rpm.org.

    3. Do you want to back up an existing deployment when your RPM runs?

    If so, you would need to write that code in your SPEC file.

    Here is my complete SPEC file:

    Summary: Summary for my Java project
    Name: Name for my Java project
    Version: 2.1.2
    Release: 5
    Requires: jboss >= 5.1
    BuildArch: noarch
    Group: Internet / Applications
    Prefix: /usr/local/bin
    License: (C) Copyright my organization
    Vendor: my organization
    
    %description 
    Description for my Java project
    
    %prep
    # Check if the WAR file has been created
    
    %install
    # Copy war file to buildroot's Jboss deployment directory
    # Copy config file to buildroot's Jboss config directory
    
    %files
    # Set file permissions and ownership
    
    %pre
    # Check if JBoss deployment path exists on the web server. 
    # If not, exit with an error. 
    
    # Check if JBoss config file path exists on the web server. 
    # If not, exit with an error. 
    
    # Check if custom user 'myuser' exists. If not, exit with an error.
    # Check if custom group 'mygroup' exists. If not, exit with an error
    # Check if JBOSS is running. If yes, exit with an error.   
    # Take backup of existing deployment, if needed.
    
    %post
    # Perform post-installation steps, if needed.
    echo "Installation complete."
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have thousands of HTML files to process using Groovy/Java and I need to
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a bunch of posts stored in text files formatted in yaml/textile (from
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.