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 6884711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:32:35+00:00 2026-05-27T05:32:35+00:00

We do a lot of deployments of Java web applications to Weblogic and Jboss

  • 0

We do a lot of deployments of Java web applications to Weblogic and Jboss servers. Quite often the deployment looks like this:

  1. Copy the code and default configs to a staging directory on the application server or Weblogic admin server.

  2. Edit a properties file to set environment-specific variables (IP addresses, usernames, etc.)

  3. Run ant to create the ear/war and drop it in the appropriate directory.

  4. Start services

This has proven to be a very unfriendly set of steps to use with Puppet as our configuration management tool. We would prefer a process which is much more similar to the Package, File, Service trifecta of Puppet, but having to configure the properties before building the ear/war makes this difficult because it requires an extra step to build the war/ear on the host after the properties have been populated.

Is there a way to build a war/ear which is environment-agnostic and keep the configurations external, removing the extra build step?

Has anyone specifically worked with web applications and Puppet, and do you have any recommendations?

  • 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-05-27T05:32:36+00:00Added an answer on May 27, 2026 at 5:32 am

    What I’ve done with tomcat and .war webapps is build a system package with an unzipped war and then deal with the conf files. I haven’t dealt with Weblogic much or JBoss at all, so I don’t know how it deals with unzipped WAR stuff.

    1) Build a package (RPM) where I do all the .war building stuff, then something like:

    mkdir -p %{buildroot}/var/lib/tomcat5/webapps/APP
    cd %{buildroot}/var/lib/tomcat5/webapps/APP
    unzip ../APP.war
    rm ../APP.war
    

    (so that the unzipped .war file is in the package with no actual .war file in there. With tomcat it will then leave that directory alone, especially if it doesn’t have write access because the files belong to root)

    2) Puppet stuff somewhat like:

    package {
      "tomcat5":
        require => Package["java-1.6.0-sun"],
        ensure => installed;
      "java-1.6.0-sun":
        ensure => installed;
      "APP":
        ensure => installed,
        notify => Service["tomcat5"],
        require => Package["java-1.6.0-sun"];
    }
    
    file {
      "/usr/share/tomcat5/webapps/APP":
        source  => [ "puppet:///MODULE/APP" ],
        ensure  => directory,
        ignore  => [ 'CVS', '.git', '.svn', '*~' ], # ignore revision control and backup files
        purge   => false, # leaves other stuff alone
        replace => true, # replaces stock files with ours
        recurse => true, # gets everything recursively
        require => Package[APP], # install package first
        notify  => Service[tomcat5]; # restart tomcat after
    }
    

    This particular package has 32 files in 8 directories that we’re modifying or pushing out to configure it. If it was just a few files, I’d use a couple simple file{} resources to manage those files instead of the recursive stuff.

    If you didn’t want to build a system type package, you could do a file{} resource for the war into an alternate directory, an exec{"unzip ...": creates => '/path/to/unzipped/webapp;} and have the file{} resources for configuration require the Exec["unzip ..."].

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are doing quite a lot of traditional web applications with relational databases. All
A lot of these pages are like mini applications that have their own CSS
A lot of time was spent to solve the problem, and it looks easy,
A lot of applications on the mac show a little graphic when the installer
A lot of Java ME tutorials use the startApp() method for creating and initializing
I created a Java Project in Eclipse using the Web services Top down approach
I am writing a Java EE application which calculates a lot of things by
I'd like some advice on a deployment strategy. If a development team creates an
The solution I'm building contains a whole lot of projects. One of them, Web,
I have a Java EE web application using features from the Java EE 6

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.