1 Reply Latest reply: Jun 16, 2010 9:28 PM by EJP RSS

    Can new folder be added into a war using jar commands?

    843804
      Hi All,
      I am working on an installer creation attempt to make some changes on a war at the client side to inject my changes into it. As a result i am in need to modify the war using jar commands and have found some success.
      I user the following command.
      D:\MyWarLab>jar uf webtop.war custom
      This command helped me in adding my changes inside a folder named 'custom' placed at location 'D:\MyWarLab' into the 'custom' folder inside my 'webtop.war'.
      Now this worked as expected since the 'custom' folder was already present inside the war.

      Now my next step is to inject a new folder named 'customA' inside
      webtop.war ->WEB-INF -> classes -> com -> application. This customA folder would contain the java class files i have created.The customA folder does not already exist at the above mentioned location, hence the need to create it.

      I have not been able to find a jar command to add new folders at desired locations of the war.
      Could you please validate my attempt and suggest a command to fulfil my requirement.
        • 1. Re: Can new folder be added into a war using jar commands?
          EJP
          Now this worked as expected since the 'custom' folder was already present inside the war.
          No. It worked because 'custom' existed in the file system as a directory with files under it. Whether it was already in the war is irrelevant.
          This customA folder would contain the java class files i have created. The customA folder does not already exist at the above mentioned location, hence the need to create it.
          If it exists on the disk you can add it to the war with the jar uf command.
          I have not been able to find a jar command to add new folders at desired locations of the war.
          You've already found it!