Posts Tagged ‘Eclipse’

Maven + GWT
I needed to create a GWT project using maven again. The original post lacked some details. This time, I got it to work with a slightly different steps. First, I ran the following command:

mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo -DarchtypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.4.0 -DarchetypeRepository=repo1.maven.org

Somehow, Maven didn’t pickup the group ID and artifact ID. So, I had to choose from one of the listed item.

Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 337
Choose org.codehaus.mojo:gwt-maven-plugin version: 
1: 1.1
2: 1.2
3: 2.1.0
4: 2.1.0-1
5: 2.4.0
Choose a number: 5: 5

Next, I defined the properties for my project.

Define value for property 'groupId': : com.my.app.package.name
Define value for property 'artifactId': : directoryNameForTheGeneratedProject
Define value for property 'version':  1.0-SNAPSHOT: :
Define value for property 'package':  com.my.app.package.name
Define value for property 'module': : moduleName

Now I can run the generated module with the following command. This will bring up a console. All I have to do is copy the URL and then past it in the browser.

mvn gwt:run

Maven + Eclipse
Next, I followed the instructions on this page to run the following command within the project folder to enable support for Eclipse:

mvn eclipse:eclipse

Then, I use Eclipse to import existing project into workspace to open the project. Eclipse complained that the default directory for the project should be set to /PorjectFolder/src/main/webapp/WEB-INF/classes Since I want to use Maven to build, I ignore the error by right click on the error, choose quick fix, choose Do not use the WAR directory for ProjectName launching and deploying (this disables management of WEB-INF)

Maven + WebLogic
I noticed that the JRE libraries were referencing version Java SE 7 jars, I changed it to 6 so the project will be compatible with WebLogic 11g. For WebLogic 12c, see this post.

I followed the instructions to configure WebLogic 11g with Maven. The available commands for 11g are slightly different from 12c. They are are deploy, help, list-apps, redeploy, start-app, stop-app, undeploy, update-app. Once I completed the configuration, I was able to run mvn weblogic:list-apps command. Next, I ran mvn package to create the WAR file before attempted mvn weblogic:deploy. I was able to load the application in my browser! :)

This howto helped me to create a GWT project using Maven. It even allows me to run the GWT project in development mode with Jetty, very sweet!

On the other hand, OEPE’s Weblogic plug-in doesn’t play nice with GWT based project. Looks like I’ll continue use Maven to build WAR files.

When I tried to add an Oracle WebLogic Server 12c as a new server runtime to a project in OEPE (Eclipse), OEPE refused to recognize the information I entered. Fortunately, Daniel G. told me that I have to select the wlserver folder first, then backspace a few times to remove wlserver from the path and type in the wlserver back to trigger the screen to fresh. The goal is to change the path using different ways to trigger a refresh action, which doesn’t get triggered when it supposed to. Once I was able to trigger the fresh action on wlserver folder, OEPE was able to recognize the server runtime installed in the folder. ;)

This definitely worth a bug on OEPE!

I found a need to debug JBoss with Eclipse. A search on google led me to ths page. I had to tweak a bit to get my local instance to work.

For example, I had to change the quote character from ” to “.

JAVA_OPTS="-Xdebug -Xnoagent
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS"

After that, JBOSS was able to load the new parameters correctly.

The post also have slightly different UI screen than what I see on my version of Eclipse. I did the following:

  1. Go to Run –> Debug Configurations … in the menu
  2. Rick click on Remote Java Application and choose New
  3. Choose the project of your choice. Change the address to 8787 to match the parameter specified for JBoss earlier. Change host name if necessary.
  4. Click Apply and then Debug

I was able to connect to the server and start debug the application. :)

After I was so spoiled by GWT/Eclipse’s streamlined way of deploying a GWT application to the embedded server or Google App Engine, I was annoyed by how little support it has for other application servers. Fortunately, I was able to semi-automatically generate a WAR file for manual deployment on a remote server by following this tutorial :)

Back when I was working with Netbeans, deployment to a remote server was as simple as a single mouse click. On Eclipse, deployment to a remote server appears to be discouraged.

GWT dev mode remote access

Posted: June 1, 2011 in howto
Tags: , , ,

I needed to access the GWT build-in server for Eclipse from another machine. A search on-line led me to this tutorial. It worked! :)

ebuild

Posted: April 13, 2011 in Life in general
Tags: , ,

While looking for an ant build script generator, I came across ebuild and found it interesting. With this, I no longer really need to maintain a “generated” ant build script. :)

Subclipse on Fedora

Posted: March 24, 2011 in howto, Technology
Tags: , , ,

Update 20110926: In Fedora 15, you can just install subversion-javahl-1.6.17-1.fc15 from Add/Remove Software tool, much easier than the method described earlier. :)


When trying to run Subclipse, I got the following error: Failed to load JavaHL Library. To get JavaHL loaded for Subclipse on Fedora, I had to first register on Collabnet before attempt to install JavaHL rpm from this location. Once installed, I had to run export LD_LIBRARY_PATH=/opt/CollabNet_Subversion/lib on the command line before running eclipse.

This above tip is the result of combining the howto from this and this page.

A workaround for Eclipse

Posted: March 26, 2010 in howto, Technology
Tags: ,

I encountered an access restriction error in Eclipse and found the following workaround worked for me.

Eclipse Tip

Posted: January 14, 2010 in Technology
Tags: , , ,

This tip was helpful and resolved the same issue I had with the original post.