I have a GWT application that I need to deploy from a WAR file. I've got it kinda working using export to WAR option in Eclipse but after I deploy all of images in the application just show as missing image icon, and besides when we have multiple developers it is not nice to build from IDE this way.
I am looking for if there is a best way to script the build process that people have found (hopefully with an example) such as an Ant xml or any other GWT specific tools?
This tutorial provides step by step instructions for writing an ant script to build the war file including GWT specific compile steps and where/how to package static resources such as images.
http://www.rubiconred.com/blog/build-package-a-gwt-app-to-war-using-ant/
You could look into the GWT maven plugin.
If you're new to GWT or Maven, you might want to first read the GWT documentation and get more familiar with Maven by reading at least its getting started guide or by reading the online reference book.
Related
I have recently started out on Maven. I am trying to integrate Maven+eclipse(Juno)+tomcat7.
I have downloaded m2e-wtp plugin for eclipse and created a Maven project whose structure follows a standard Maven project structure. It is also configured a dynamic web project.
It is a multi module project with two modules of flex(f1 AND f2) and one module of webapp(w).I have configured all the plugins correctly and there is no problem with configuration of POMs.
What I want to achieve is :
When I clean and Build project in Eclipse using Project-->Clean,Eclipse does not build the war in target folder of my web application project (w). I also does not copy any of the flex resources to target folder. However,
When I run the project as maven build by right-clicking the web application project and running it as a "maven install" it creates everything as expected.
My question is that if it is possible to achieve what I mentioned in point (1)? Or the only correct way to do this is the way mentioned in point (2).
I am also not able to deploy the generted files in step 2 automatically in tomcat.
Do I need to use another maven plugin for this?
Please note that this i my first experience with Maven + eclispe. I have followed certain tutorials. So, Please be lenient while voting negatively.
From what I know it is not possible to force Eclipse to use Maven directly (I would gladly be proven wrong).
Eclipse does not use Maven to build (1). Using the m2e plugin, it is possible to run maven to perform the build as you discovered (2).
If you are looking for that kind of tight integration you can look at NetBeans or IntelliJ who are using Maven natively.
EDIT:
About (3) there is a Tomcat-Maven-Plugin that can deploy the WAR file created on a running tomcat instance. Check the Usage page for more details.
I am trying to learn how to implement OSGi using JBoss 7 and Eclipse. I am trying to find out how to do it by using Maven. I have already created a bundle and converted it to a deployable jar file. Now I want to deploy it. Through my search on internet, especially the JBoss.org, I am getting how to create a pom.xml file etc. But when it comes to creating a new Maven project in Eclipse, I am unable to proceed further. I don't expect a direct solution here. I would be glad if some one can point me to an appropriate tutorial. I have failed to search on internet. If any more information is required from my side, please feel free to comment.
I wish to setup an eclipse project for implementing a simple module but not a service for axis. I wonder if there're any templates I could use?
Secondly, I would like to ask if there are any information sources such as links around on how to build complex Axis2 applications in eclipse mainly focusing on module building as well
I appreciate your hints.
Best regards,
Alex
I could come along with this issue with my own solution:
Using an customized build.xml based on axis2 module builds I am able to build a module project in Eclipse using ant. I trigger this via key shortcut.
The build.xml has an deploy.module target that puts the module back to the axis2 $HOME/repository folder. Running there ant build.xml will deploy axis2 at whole as an war-file (EAR) the module containing there within to be ready to deploy in a container such as jboss.
The eclipse project is based on common java project (no dynamic web project) containing the $AXIS2/lib in CLASSPATH.
Since Jboss supports hot deployment on update, you can run jboss in a terminal or withing eclipse. I customized the latter build.xml to support easy jboss deployment.
This is a good solution for me.
I'm serious when I say have been all over the internet and on google for past few hours trying to find an answer to this question. Ok, I have already coded and compiled a working wicket in Eclipse. It runs in Eclipse just fine but I now need to export this to my webserver. How do I do this!? It's such a simple concept and yet no one has talked about it. I know I need tomcat, but they don't say how to export the files. If a JAR file works. If I need to configure Tomcat is some way. How to get this to work with an already running web apache server. My guess is that tomcat has to be running to execute the java portion of the wicket and then you can just point a link to your index.html. But I have no idea. Enlighten me please with a step-by-step tutorial? I'm a slight beginner with Eclipse and started using Tomcat and Wicket only 2 days ago.
Its preferable to pack your project into a war file distribution.
An easy approach to do that, is to use Apache Maven for building it.
For Maven there are plenty of plugins available, one of them is a "war" plugin, which helps you creating your war / web archive.
The war file you have simply to put into the webapp of a fresh downloaded tomcat.
There's a couple ways but one way is you can compile to a .war file and deploy from the admin console in tomcat. See here for the tomcat documentation.
In Eclipse, right click your web application project, select Export -> War File and follow the wizard.
When you have your .war file ready you can then upload it to a Tomcat or Glassfish installation.
I am new to GWT. I have developed a GWT application in version-1.6.4 and it is working fine. Now I want to integrate with that project in existing Java EE application. I don't know how to go ahead.
Where to copy the GWT source code in this existing Java EE application? I am also using RPC in GWT.
Can anyone provide help on this?
GWT is just a set of javascript and HTML files, so the most basic form of integration is just to put them in a folder in the same place your as your web pages go.
One step up from there would be to integrate the gwt Compiler in with your build process. If you use Netbeans there is a good plugin called GWT4NB that will handle all of this process for you, so that when you build the WAR of your project it will build the GWT portions of it as well. There would probably be something similar for Eclipse. You could also do all this by hand using maven or ant.
You would tell the compiler where you want it to put the generated files, which again, would be in the same location you put your web pages for your WAR project. The RPC side of it will still work just fine no matter where you put the files.