5 Replies Latest reply on Jul 22, 2010 3:47 PM by jaikiran pai

    Dynamic changes of values in vfs.xml and profile.xml files

    Karthik G Newbie

      Hi,

       

      I created a new entry in vfs and profile.xml to allow jboss to pickup the changes in jsp while the server is running.

       

      I am pointing to my war file which is at C:/workspace/trunk/archive.

       

      VFS Cache

      ----------------

      <entry>
                <key>file:///C:/workspace/trunk/archive</key>
                <value><inject bean="VfsNamesExceptionHandler"/></value>

      </entry>

       

      Profile

      --------

      <list elementClass="java.net.URI">
          <value>${jboss.server.home.url}deploy</value>
          <value>file:///C:/workspace/trunk/archive</value>
      </list>

       

       

      Now, if I create a new project and build it, I need to change these two values manually everytime.

       

      I am trying to automate this by changing the values dynamically at the time of building the war file using build.xml.

       

      Please suggest me some approach to achieve this.

       

      Thanks in advance.

        • 1. Re: Dynamic changes of values in vfs.xml and profile.xml files
          jaikiran pai Master

          Karthik G wrote:

           

          Hi,

           

          I created a new entry in vfs and profile.xml to allow jboss to pickup the changes in jsp while the server is running.

           

          Changes to jsps in a exploded deployment (like .war, .ear) are picked up by default without having to do any configurations. How are you deploying your application? And which exact version of JBoss AS is this?

          • 2. Re: Dynamic changes of values in vfs.xml and profile.xml files
            Karthik G Newbie

            I am using JBoss 5.1.0 GA version.

             

            Deployment procedure:

             

            1.Compile the java files and copy into WEB-INF/classes (using ant build)

            2.Make an entry in vfs.xml and profile.xml that points to war directory.

                 ex: c:/workspace/trunk/archive/appln.war/WEB-INF ..

            Entry in vfs and profile would be file:///c:/workspace/trunk/archive

             

            Jboss will virtually refer this path to deploy the appln.

            • 3. Re: Dynamic changes of values in vfs.xml and profile.xml files
              jaikiran pai Master

              Karthik G wrote:

               


              2.Make an entry in vfs.xml and profile.xml that points to war directory.

                   ex: c:/workspace/trunk/archive/appln.war/WEB-INF ..

              Entry in vfs and profile would be file:///c:/workspace/trunk/archive

               

               

              Is that because you want to deploy the application outside of JBoss folder structure? Or is there some other reason to it?

               

              In your first post, you mentioned:

               

              Now, if I create a new project and build it, I need to change these  two values manually everytime.

               

              I am trying to automate this by changing the  values dynamically at the time of building the war file using  build.xml.

              I am not sure why you would need to add a new folder for every project. Why not add something like C:/myapps to those files, to mark it as an external deploy folder and then place any number of applications (/projects) in that folder?

              • 4. Re: Dynamic changes of values in vfs.xml and profile.xml files
                Karthik G Newbie

                Yes, I want to deploy the application outside of JBoss folder structure.

                 

                In this case, I need to keep all my war files into c:/myapps

                I may create a new project which is at d: or e: or at someother location.

                 

                The approcah I am trying is like updating these files at the building the appln. Using build.xml to update these two files directly.

                 

                Or updating the path in some property file and referring that path in vfs and profile.xml, that would be taken up at the time of server restart.

                • 5. Re: Dynamic changes of values in vfs.xml and profile.xml files
                  jaikiran pai Master

                  Karthik G wrote:

                   

                  In this case, I need to keep all my war files into c:/myapps

                  I may create a new project which is at d: or e: or at someother location.

                   

                  The approcah I am trying is like updating these files at the building the appln. Using build.xml to update these two files directly.

                   

                  It looks more like something that you could do with your Ant tasks. Maybe the XSLT Ant task http://ant.apache.org/manual/Tasks/style.html would help.