2 Replies Latest reply on Jun 17, 2008 3:18 PM by Clint Popetz

    Incremental Archive deployment without WTP in 2.1.0.GA

    Clint Popetz Apprentice

      We had recently decided to stop using JBoss Tools because of their dependence on WTP, which has been too buggy for us. This was unfortunate, because all our work is Seam based, and the seam tools are really nice.

      Now that Jboss Tools 2.1 supports seam projects that aren't WTP-based, I'm trying to use it, and I'm wondering how to approach deployment with the Project Archives view and the AS server view.

      I have 5 projects, three of which should be packaged as EJBs, one as a WAR, and the third is the EAR project. They are just plain java projects. The EAR project has:

      EARContent/
      META-INF/
      ....
      libs/
      ...
      jboss-seam.jar

      And I have it export its libs/, and make the jar/war projects depend upon it, so that they can pick up their EAR lib dependencies. That works great, everything builds.

      Now I want to build an exploded ear with exploded jar/wars under it, like:

      EarProject.ear/
      META-INF/
      lib/
      jboss-seam.jar
      EjbProject1.jar/
      EjbProject2.jar/
      EjbProject3.jar/
      WarProject.war/

      In my ear project I set up an ear archive with the Project Archives view, and under it (in the same project) an archive for each of the above jars/war. They all build correctly, and I get the resulting ear directory in my build/dist directory as specified. In "Edit Publish Settings" I click choose my Jboss 4.2 server, check "Always publish to these servers", but if I check "Auto-deploy to selected servers after builds" then when I click "Finish" the dialog doesn't go away, but my .packages file (with all the information) suddenly has a zero size. At that point, if I quit Eclipse, when I restart the entire archive tree will be gone. If instead I choose "Edit Publish Settings" and make sure that box isn't checked and click "Finish," things are ok, but no incremental deployment.

      In addition, if I give up on incremental deployment but click "Full Publish" I often get a Null Pointer Exception.

      Are these known issues?

      Thanks,
      -Clint

        • 1. Re: Incremental Archive deployment without WTP in 2.1.0.GA
          Rob Stryker Master

          Yes these are known =] There's been a flurry of commits this past week on project archives to remedy these situations. I'm not sure when we'll respin, but I encourage you to download a nightly build and give it a spin,

          • 2. Re: Incremental Archive deployment without WTP in 2.1.0.GA
            Clint Popetz Apprentice

            That's great to hear. I've just downloaded the latest nightly, and will give it a try.

            Here's a question. I see two ways of approaching deploying sub-deployment archives with these tools. One would be to have the war project have a .war archive in "Project Archives," the ejb jars have their own archives, etc. The other way is to have my ear project package up everything from other projects, as I described in my original post.

            I'm wondering which is preferred, or maybe, which is simply more tested and less likely to have bugs :)

            The case of having each project handle its own archive makes sense in terms of clarity, but since each sub-deployment archive .package entry has to know the directory of the ear archive to publish _to_, there's still a dependence there. And I'm worried about splitting them all up for fear of triggering bugs. For example, if different sub-deployment projects are simultaneously incrementally publishing their contents during a build to jboss, will jboss survive, or will I get incomplete deployments?

            On the other hand, in the "one project with archives to rule them all" approach, if changes are made to files in the war project, and the ear project has an archive that references those files, will incremental deployment of the ear/war happen even if the ear project has no project dependency (in the build path) on the war project?

            Thanks for any advice. And thanks again for providing a way to avoid using WTP, which has singed my eyebrows too many times to believe "really, in this next release the tools are stable and usable."