2008-12-08
My First Published plug-in on google code
I finally managed to write a (semi) useful plug-in that helped me understand variables in the context of source provider in the Command Core Expressions Framework. The code is puvlished under the Apache 2.0 license and is available on google code @ http://code.google.com/p/rcprevealsourceprovider/.
This plug-in will track all source provider variables and isplay their values in real-time. It took me a while to undersatnd how to work them and hopefully this plug-in or at least the code will be useful to someone.
It's been a while since I published anything on this blog, but I have been real busy in the last 18 months, hopefully I am back on a roll and will keep posting more regularly.
2006-10-11
Eclipse Training
I finally managed to put togeteher a web page about my upcoming training session on eclipse RCP.
Doing so I found a number of resources for those willing to learn by themselves:
- the ECESIS eclipse project: a list of resources and open source training material
- Wayne Beaton post about Training
- and of course my own page
2006-04-11
OWASP & tools
WTP 1.0
Of course with each new release of WTP the process describe for WTP 0.7 is less and less successfull. But this comes with no surprise, as those were undocumented and temporary features.
For those who wonders, the assembled webapp now resides under your workspace directory in .metadata/.plugins/org.eclipse.wst.server.core/tmpX
where X is the number of your server starting at 0. Using this tmp folder clearly indicate that nobody should rely on the files at this location, as they will be regenrated with the build process. Those tmp folders also allows eclipse to build a separate assembly specific to each server, which make a lot more sense than the .deployables directory which was shared amongts all server instances.
If you need to explicitely reference this directory, you should probably review your build process (but you are already using Maven, right?).
2005-09-27
WTP 1.0M8 is out
I have tried to applied the method descibed in my previous post de WTP 1.0M8 without must success.
First problem: the builder org.eclipse.wst.common.modulecore.DependencyGraphBuilder and the nature org.eclipse.jst.j2ee.web.WebNature have disappeared. It seems to enough to remove them from .project file
Second problem: my webapps which where deploying seemlessly on WTP 0.7 with Tomcat 5.5 are running like dogs under 1.0M8. Each time I edit a jsp file, it quicks in the builder, and wtp needs to republish the entire webapp to the server, reloading the context in the process. This renders quick editing almost impossible. and I don't event speak about modifying a java class on the fly.
Third problem: saving a jsp or java file is now really slow (probably linked to pb#2)
May be I screwed up my server settings or my projects settings. but I tried a clean eclipse install, a clean server definition, a clean projects checkout, with the same result.
I tried a demo app LowAirFare which works very well and doesn't republish on jsp editing, but does republish on class editing.
I really like to understand why my webapp gets republished when I edit a JSP.
I guess I'll have to revert to 0.7 until those issues are worked out.
First problem: the builder org.eclipse.wst.common.modulecore.DependencyGraphBuilder and the nature org.eclipse.jst.j2ee.web.WebNature have disappeared. It seems to enough to remove them from .project file
Second problem: my webapps which where deploying seemlessly on WTP 0.7 with Tomcat 5.5 are running like dogs under 1.0M8. Each time I edit a jsp file, it quicks in the builder, and wtp needs to republish the entire webapp to the server, reloading the context in the process. This renders quick editing almost impossible. and I don't event speak about modifying a java class on the fly.
Third problem: saving a jsp or java file is now really slow (probably linked to pb#2)
May be I screwed up my server settings or my projects settings. but I tried a clean eclipse install, a clean server definition, a clean projects checkout, with the same result.
I tried a demo app LowAirFare which works very well and doesn't republish on jsp editing, but does republish on class editing.
I really like to understand why my webapp gets republished when I edit a JSP.
I guess I'll have to revert to 0.7 until those issues are worked out.
2005-07-25
Using Eclipse WTP 0.7RC2 with a maven project
When you want to develop web app on eclise, you have not many choices, but the picture is changing as the WTP project is reaching a stable build by the end of the month.
WTP is a very promising eclipse extension, that seems to have been very well though from the ground up, and from my point of view gives you better control than myEclipse (what I have been using so far).
It took me about a day to be able to use wtp 0.7rc2 with my maven projects. I couldn't find any relevant up to date documentation but some bugzilla entries and some outdated test plans. I am writing this post to not forget what I have been doing so far.
Basically a maven project is a project with the following features:
[ArtifactId] will denote the current project name as per maven standards
This is still a very manual process, hopefully either the eclipse maven plugin or the mevenide eclipse plugin will be enabled to generate/edit/synchronize those configuration files.
Setup: eclipse 3.1 + wtp 0.7 RC2 or RC3
Of course you also need to install EMF/GEF/JEM plugins. I highly recommend installing in an extension directory (a directory with an eclipse subfolder and an empty file named .eclipseextension), so it is easy to switch versions and update to the latest version without having to reinstall eclipse from scratch.
I have two kind of projects, libraries and webapps. Libraries are used by webapps. This setup looks exactly like what is described by Integrating existing maven projects in WTP and by Flexible project test plan. But following those instructions written for WTP-M3 won't work with the current release of WTP.
I assume the projects are already setup as standard eclipse projects and compiling. To edit configuration files, you should switch to the resource perspective and disable "build automatically".
Step 1: setup the library projects
Edit .project there should be 3 builders in the following order:
Create a .wtpmodules file that contains the following code
Step 2: setup the webapps
Edit .project and add the following builders
Create a file .wtpmodules which reads
The handle protocol is as follow:
You can now enable "automatic building", and your webapp should be assembled in the .deployables directory. You can then rigth-click your webapp project icon and Run it on the server of your choice.
This is a very error prone process, as there is no error or warning if you provide a broken .wtpmodules file.
Any comments appreciated.
WTP is a very promising eclipse extension, that seems to have been very well though from the ground up, and from my point of view gives you better control than myEclipse (what I have been using so far).
It took me about a day to be able to use wtp 0.7rc2 with my maven projects. I couldn't find any relevant up to date documentation but some bugzilla entries and some outdated test plans. I am writing this post to not forget what I have been doing so far.
Basically a maven project is a project with the following features:
- separation of sources by topic java, test, webapp
- usage of external libraries with a variable (MAVEN_REPO)
- eclipse project dependency where needed (<eclipse.dependency>true</eclipse.dependency>)
[ArtifactId] will denote the current project name as per maven standards
This is still a very manual process, hopefully either the eclipse maven plugin or the mevenide eclipse plugin will be enabled to generate/edit/synchronize those configuration files.
Setup: eclipse 3.1 + wtp 0.7 RC2 or RC3
Of course you also need to install EMF/GEF/JEM plugins. I highly recommend installing in an extension directory (a directory with an eclipse subfolder and an empty file named .eclipseextension), so it is easy to switch versions and update to the latest version without having to reinstall eclipse from scratch.
I have two kind of projects, libraries and webapps. Libraries are used by webapps. This setup looks exactly like what is described by Integrating existing maven projects in WTP and by Flexible project test plan. But following those instructions written for WTP-M3 won't work with the current release of WTP.
I assume the projects are already setup as standard eclipse projects and compiling. To edit configuration files, you should switch to the resource perspective and disable "build automatically".
Step 1: setup the library projects
Edit .project there should be 3 builders in the following order:
- org.eclipse.wst.common.modulecore.ComponentStructuralBuilder
- org.eclipse.jdt.core.javabuilder
- org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDependencyResolver
- org.eclipse.jdt.core.javanature
- org.eclipse.wst.common.modulecore.ModuleCoreNature
Create a .wtpmodules file that contains the following code
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId">
<wb-module name="[artifactId]">
<module-type module-type-id="jst.utility"/>
<wb-resource path="/"/>
</wb-module>
</project-modules>
<project-modules id="moduleCoreId">
<wb-module name="[artifactId]">
<module-type module-type-id="jst.utility"/>
<wb-resource path="/"/>
</wb-module>
</project-modules>
Step 2: setup the webapps
Edit .project and add the following builders
- org.eclipse.wst.common.modulecore.ComponentStructuralBuilder
- org.eclipse.jdt.core.javabuilder
- org.eclipse.wst.validation.validationbuilder
- org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDependencyResolver
- org.eclipse.wst.common.modulecore.DependencyGraphBuilder
- org.eclipse.jem.workbench.JavaEMFNature
- org.eclipse.jst.j2ee.web.WebNature
- org.eclipse.jdt.core.javanature
- org.eclipse.wst.common.modulecore.ModuleCoreNature
Create a file .wtpmodules which reads
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId">
<wb-module deploy-name="[artifactId]">
<module-type module-type-id="jst.web">
<version>2.3</version>
<property name="context-root" value="[artifactId]"/>
<property name="java-output-path" value="/bin/"/>
</module-type>
<wb-resource source-path="/src/java" deploy-path="/WEB-INF/classes"/>
<wb-resource source-path="/src/webapp" deploy-path="/"/>
<dependent-module deploy-path="/WEB-INF/lib"
handle="module:/resource/[libArtifactId]/[libArtifactId]">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module deploy-path="/WEB-INF/lib"
handle="module:/classpath/var/MAVEN_REPO/[groupId]/jars/[artifactId]-[version].jar"/>
</wb-module>
</project-modules>
<project-modules id="moduleCoreId">
<wb-module deploy-name="[artifactId]">
<module-type module-type-id="jst.web">
<version>2.3</version>
<property name="context-root" value="[artifactId]"/>
<property name="java-output-path" value="/bin/"/>
</module-type>
<wb-resource source-path="/src/java" deploy-path="/WEB-INF/classes"/>
<wb-resource source-path="/src/webapp" deploy-path="/"/>
<dependent-module deploy-path="/WEB-INF/lib"
handle="module:/resource/[libArtifactId]/[libArtifactId]">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module deploy-path="/WEB-INF/lib"
handle="module:/classpath/var/MAVEN_REPO/[groupId]/jars/[artifactId]-[version].jar"/>
</wb-module>
</project-modules>
The handle protocol is as follow:
- classpath is a classpath reference, the second item on the path can be lib or var (as the kind attribute in the .classpath file)
- resource is an eclipse flexible project reference, the second item being the project name, and the third item a module within the project. dependency-type can be uses which build the jar for you or consumes which copy the files across.
You can now enable "automatic building", and your webapp should be assembled in the .deployables directory. You can then rigth-click your webapp project icon and Run it on the server of your choice.
This is a very error prone process, as there is no error or warning if you provide a broken .wtpmodules file.
Any comments appreciated.
2004-01-16
2003-10-23
2003-10-16
How to install Oracle 9i on Linux
This article is totaly irrelevant, it just took me far too long to find it, I am not going to loose this link. (hopefully the next time I'll have to install oracle on linux, it will be version 10g, and hopefully, the install process will be bug free)
Multiple Inheritance in Java
They said it was impossible... on purpose, but you can use multiple inheritance in java.
2003-10-15
Display tag library
Allows you to do nice table output sorting-paging-grouping-callback
Display tag library
2003-09-25
2003-09-17
roumanoff.com is patched with openssh3.7p1
[Full-Disclosure] new ssh exploit?
It was difficult because the configure option
--with-ssl-diris not explicit: should point to you openSSL installation directory, in fact it should point to your openssl include files, while you configure by another mean (LD_LIBRARY_PATH) the location of the library. This means the configure script doesn't take into account the particular version of openSSL I want to use. and I have to launch configure with
LD_LIBRARY_PATH=/path/to/openssl/lib ./configure --with-ssl-dir=/path/to/openssl/includemake is alsmost no problem after you edit the Makefile to replace -L/path/to/openssl/include with -L/path/to/openssl/lib As far as I understand, the specified ssl-dir must contains both the include and lib dir at the same level.
2003-09-12
JamesHolmes.com Java Server Faces Resources
Everything there is to know about JSF
http://www.jamesholmes.com/JavaServerFaces/
Subscribe to:
Posts (Atom)