
| View previous topic :: View next topic |
| Author |
Message |
nvarun
Joined: 27 Aug 2008 Posts: 161 Location: India
|
Posted: Mon Feb 23, 2009 1:56 pm Post subject: Deploy on Build using JBoss Application Server |
|
|
Hello all,
Since 1 week, I was working on a Dynamic Web project in Eclipse 2.0.0.Beta2 IDE using JBoss 4.0.5 GA (and J2EE 1.4). I was encountering some issues, so I imported the complete project into NetBeans 6.5 IDE.
Import was successful and I added JBoss server into NetBeans IDE (Tools > Servers). Now, project is successfully building and deploying. Its absolutely working fine.
Now, some questions;
1. I found "Deploy on Save" disabled in project.properties. Is it due to the server, or Java Platform (1.4) or J2EE version?
2. If not, then if I set the property "j2ee.deploy.on.save" to "true", it displays a tick on "Project Properties Window", with the option still disabled.
3. Does deploy on save work only on non-imported web projects?
Now, if I made any changes to the webpages sources during run time, then I had to "Deploy" to see immediate effect. So, I tried the following steps, I have overriden an "Ant Target" in build.xml;
| Code: |
<target name="-post-dist">
<echo>Automatic-deploy</echo>
<antcall target="run-display-browser" inheritrefs="-init-deploy-ant"/>
</target>
|
Now, if I replace the "run-display-browser" with "run-deploy", its working fine. It would be great to get more insight on the above raised questions, as well as the workaround, I discovered.
Now, I only use "F6" to run the project and "F11" to build and auto-deploy the project.
Regards, _________________ --
Varun Nischal
http://weblogs.java.net/blog/n_varun/ |
|
| Back to top |
|
 |
rdelaplante
Joined: 23 Oct 2008 Posts: 50 Location: Toronto, Canada
|
Posted: Mon Feb 23, 2009 3:23 pm Post subject: |
|
|
| Quote: | | Now, if I replace the "run-display-browser" with "run-deploy", its working fine. |
I would imagine that this is an oversight by the Sun developers. They test primarily with GlassFish and probably haven't tested "deploy on save" with JBoss. This feature is also intended to be used with directory deploy for even better performance, and I'm not sure if NetBeans can do directory deploy with JBoss. I wonder if deploy on save requires directory deploy?
I would open an RFE ticket (not a bug) to add support for deploy on save to ant projects when using application servers other than GlassFish.
Maybe before you file the RFE, test directory deploy on GlassFish with a J2EE 1.4 ant project to make sure the feature is not limited only to Java EE 5 projects. I can't see why it would be limited to Java EE 5 only?
Also try a J2EE 1.4 Maven project in NetBeans 6.7, because 6.7 adds directory deploy feature to Maven projects.
Thanks,
Ryan |
|
| Back to top |
|
 |
Petr Hejl Posted via mailing list.
|
Posted: Mon Feb 23, 2009 7:09 pm Post subject: Deploy on Build using JBoss Application Server |
|
|
Hi,
deploy on save is supported only for certain servers so far (namely
Tomcat, GlassFish). This limitation comes from server plugins. In order
to support it these must support directory based deployment. This is
unfortunately not the case for JBoss.
P.
nvarun wrote:
| Quote: | Hello all,
Since 1 week, I was working on a Dynamic Web project in Eclipse 2.0.0.Beta2 IDE using JBoss 4.0.5 GA (and J2EE 1.4). I was encountering some issues, so I imported the complete project into NetBeans 6.5 IDE.
Import was successful and I added JBoss server into NetBeans IDE (Tools > Servers). Now, project is successfully building and deploying. Its absolutely working fine.
Now, some questions;
1. I found "Deploy on Save" disabled in project.properties. Is it due to the server, or Java Platform (1.4) or J2EE version?
2. If not, then if I set the property "j2ee.deploy.on.save" to "true", it displays a tick on "Project Properties Window", with the option still disabled.
3. Does deploy on save work only on non-imported web projects?
Now, if I made any changes to the webpages sources during run time, then I had to "Deploy" to see immediate effect. So, I tried the following steps, I have overriden an "Ant Target" in build.xml;
Code:
<target name="-post-dist">
<echo>Automatic-deploy</echo>
<antcall target="run-display-browser" inheritrefs="-init-deploy-ant"/>
</target>
Now, if I replace the "run-display-browser" with "run-deploy", its working fine. It would be great to get more insight on the above raised questions, as well as the workaround, I discovered.
Now, I only use "F6" to run the project and "F11" to build and auto-deploy the project.
Regards,
------------------------
--
Varun Nischal
http://weblogs.java.net/blog/n_varun/
|
|
|
| Back to top |
|
 |
nvarun
Joined: 27 Aug 2008 Posts: 161 Location: India
|
Posted: Tue Feb 24, 2009 1:10 pm Post subject: |
|
|
Petr,
The hack I wrote in build script, if its ok to use. Then, should I contribute it to NetBeans Community Docs as a wiki. I think it can help users working with JBoss and NetBeans to make use of it, so as to deploy on build, instead of right-clicking the project, choosing "Deploy" for incremental changes.
What say?
Also, Ryan I tried out the same for Glassfish V2 and Java EE Platform as "Java EE 5", "J2EE 1.4", it only created problem once. Thats when, I created a new web app and edit the "project.properties" file before even running/building the project once to disable deploy.on.save
Now, when I run the project once and thereafter making any changes to the webpages during run time, the incremental deploy takes place, while I had disabled it.
PS: Thanks Ryan for the comments and suggestions.
Regards, _________________ --
Varun Nischal
http://weblogs.java.net/blog/n_varun/ |
|
| Back to top |
|
 |
nvarun
Joined: 27 Aug 2008 Posts: 161 Location: India
|
|
| Back to top |
|
 |
petrioneill
Joined: 24 Sep 2009 Posts: 6
|
Posted: Sat Sep 26, 2009 5:39 am Post subject: |
|
|
My experience is often "the application server could not be started" message is inaccurate. It is often a timing issue. If you watch the server log output, you can see if this is the case, e.g. the server starts up regardless of the popup message.
And many thanks for this useful information which you have presenting online. It is very valuable resource for me. I just have finished my 000-253 exam which i had given for attaining the certification. Although! it was so hard to get certified but I was well prepared for it. Frankly speaking this kept me a lot busy for last two months. I have also attained the certification of another course of 1Y0-456 exam which I had passed six months back. Meanwhile I have completed my thesis of 1z0-042 exam which I will submit soon. I really like your website and want to visit it again. |
|
| Back to top |
|
 |
petrioneill
Joined: 24 Sep 2009 Posts: 6
|
Posted: Sat Sep 26, 2009 5:42 am Post subject: |
|
|
The hack I wrote in build script, if its ok to use. Then, should I contribute it to NetBeans Community Docs as a wiki. I think it can help users working with JBoss and NetBeans to make use of it, so as to deploy on build, instead of right-clicking the project, choosing "Deploy" for incremental changes.
What say?
Also, Ryan I tried out the same for Glassfish V2 and Java EE Platform as "Java EE 5", "J2EE 1.4", it only created problem once. Thats when, I created a new web app and edit the "project.properties" file before even running/building the project once to disable deploy.on.save....... Also this is absolutely brilliant. Really your post is very good for clearing my concepts. Recently i have finished my 1z0-043 exam, which i appear for attaining the certification. Although! it was not so hard to get certified but the study kept me busy whole summer. I've also attained certification of another course of 220-601 exam which I had passed last three months back. In the same time I have completed my thesis project of 350-018 exam which I will going to submit it soon. I really enjoyed my stay over here and gain useful knowledge which I am sure will work for me. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|
|