7 Replies Latest reply on Dec 29, 2010 10:09 AM by Felipe Ulate

    Jboss, Maven and Eclipse setup

    Andreas Melvanius Newbie

      Hi,

       

      I have rebuilt a web app to fit the Maven setup. After this rebuild of the web app I have a problem regarding deployment of my code to my local Jboss server. Before Mavenizing the project I had no problem starting and stopping my external Jboss server and after the initial publish of all the files all changes were published when saving the files and restart of the Jboss server was quickly from my Eclipse IDE. But now it takes like forever to publish the files and start the server and all changes results in building the entire war file and deploys it to the external JBoss server. This makes it impossible for me to work with the new project. I guess it's all about settings in the eclipse or jboss so that it will run on the internal exploded directory rather then building the whole war file and deploy it but I can't find the solution. Can anybody point me in the right direction here?

       

      I'm using

       

      JBoss 4

      Eclipse Helios EE 32-bit (with a couple of plugins like WTP and Maven integration)

       

      /Andreas

        • 1. Re: Jboss, Maven and Eclipse setup
          Mike Bria Newbie

          Hi,

           

          I'm in similar need of help.  I've built a new Maven-based JSF/Spring web app, using Helios.  I was using the plugged-in Tomcat server support to deploy through Eclipse, with hotsynch, etc working fine.

           

          This week I'm switching over to JBoss AS 6.0 (from Tomcat 6).  I've installed all the eclipse JBoss Tools plugins, and have a JBoss server that I start/stop through Eclipse. But, I'm not sure I can deploy my app with Eclipse.  If I package (mvn package) manually and deploy the war directly through JBoss' admin-console it works, but if I use the "Add and remove" in Eclipse I can't tell if its using the "maven package" (which I need it to), or something else.

           

          Any expertise on this topic would be very helpful.

           

          Thanks!

          MB

          • 2. Re: Jboss, Maven and Eclipse setup
            Andreas Melvanius Newbie

            After som more trial and error I managed to get my mavenized project to work in eclipse. What I did was that I downgraded to Eclipse Galileo SE and added m2, m2 extra and jboss tools . I then cleared my project from a lot of images (had around 500MB) which made it possible to publish in around 10-15 minutes. But no building wars and after the initial publish it all works fine.

            • 3. Re: Jboss, Maven and Eclipse setup
              Mike Bria Newbie

              I've got it working fine in Helios too

               

              As far as Eclipse plugins, one needs:

              Maven - http://m2eclipse.sonatype.org/sites/m2e

              Maven Extras (esp WTP) - http://m2eclipse.sonatype.org/sites/m2e-extra

              JBoss Tools (particularly the 'Maven Support' components) - http://download.jboss.org/jbosstools/updates/nightly/trunk/

               

              You also (of course) need JBoss installed somewhere (I put all my stuff like that in C:\tools\ or /tools/).

               

              You should be able to create an "Eclipse-based" JBoss server, "Add and Remove" your Maven web projects to it, and start/stop from within Eclipse. 

               

              My startup usually takes between 45 seconds and 2 minutes (most of which is deploying the app).  That irks me (Tomcat was a fraction of that), but it's livable for now.

              • 4. Re: Jboss, Maven and Eclipse setup
                salsaid Newbie

                hello  Mike,

                I am new to Jboss and maven and i am trying to create a new seam  web project , after i select the seam runtime enviroment ( e.g. Jboss 4.  Runtime) eclipse asks me for the "Home Directory" for the JBoss 4.2  Runtime. Wher can I find this home directory. I have eclipse Java EE  helios and i have also installed the plugins Maven, Maven Extras, Jboss  Tools 2.3. I get the same problem when i try to run an example maven  projekt: Run As--> Run on Server. Should I install Maven or JBoss  extra in e.g. C:\Maven and C/Jboss... I don't knoe how ti configerate  the server because i cann't find the home directory for the runtime!

                Thanks!

                Salsaid

                • 5. Re: Jboss, Maven and Eclipse setup
                  Mike Bria Newbie

                  Hi Salsaid,

                   

                  Yes, you'll need to install JBoss Server (outside of Eclipse) in addition to the Eclipse work you've done.

                  http://www.jboss.org/jbossas/downloads/

                   

                  Once you've got this, you'll point the "home dir" to the root of the server install (wherever you unzipped to).

                   

                  Good luck!

                  • 6. Re: Jboss, Maven and Eclipse setup
                    Felipe Ulate Newbie

                    Hi,

                    Enviroment:

                    Eclipse Helios

                    Ubuntu 9.1

                    Jboss 4.2

                     

                    I have everything install and running but when i want to run jboss from eclipse this error appears:

                    log4j:ERROR setFile(null,false) call failed.
                    java.io.FileNotFoundException: /home/User/Jboss/server/default/log/boot.log (Permission denied)
                        at java.io.FileOutputStream.open(Native Method)
                        at java.io.FileOutputStream.<init>(FileOutputStream.java:209)

                     

                    I think it is because to run Jboss I need the password from root, to start how can I configured this so I can start Jboss from eclipse...

                    Thanks

                    felixugf