Ant build script / prototype project - interested?

13 views
Skip to first unread message

jeremy.prz

unread,
Apr 10, 2007, 10:00:24 PM4/10/07
to GWT, Spring and Hibernate Reference Web Application
I'm in the process of creating a prototype/reference project using the
GWT, Spring and Hibernate Reference Web Application. My prototype
project will include an ant build script, spring IoC, Hibernate ORM,
an H2 database, JUnit test framework, and Cobertura code coverage
reporting.

The ant build script will compile everthing (including GWT stuff -
based on this: http://braindump.dk/tech/gwt-task-for-ant/ ), configure
the system based on templates depending on: hostname/user/environment,
generate hibernate config based on XDoclet (or annotations time
permitting), generate & populate an H2 test database, instrument and
run JUnit tests, generate cobertura code coverage reports, and
generate an exploded or compressed WAR file.

So far I have a basic GWT app + Spring IoC + ant script that creates
exploded WAR file. The rest should go pretty quickly since I've done
it all before (trying to migrate from WebWork/SpringIoC/Hibernate to
GWT/SpringIoC/Hibernate).

Would the maintainer of this project, or any members of this list like
a copy of it once I have finished?

gnandiga

unread,
May 8, 2007, 10:59:34 AM5/8/07
to GWT, Spring and Hibernate Reference Web Application
Hello Jeremy,

Why have you not chosen maven?

I have no problem with ant. But still think maven is much better than
ant. But it is only a personal prefrence.

Let me know if you need some help with xDoclet.

Thanks.
Giri.

On Apr 10, 10:00 pm, "jeremy.prz" <jeremy....@gmail.com> wrote:
> I'm in the process of creating a prototype/reference project using the
> GWT, Spring and Hibernate Reference Web Application. My prototype
> project will include an ant build script, spring IoC, Hibernate ORM,
> an H2 database, JUnit test framework, and Cobertura code coverage
> reporting.
>
> The ant build script will compile everthing (including GWT stuff -

> based on this:http://braindump.dk/tech/gwt-task-for-ant/), configure

Jeremy Przasnyski

unread,
May 8, 2007, 12:47:01 PM5/8/07
to gwt-spring-hibe...@googlegroups.com
I haven't used maven at all other than to build other people's projects. From what I understand it fetches the dependencies at build time... which I'm not sure I really like. I feel like the repository containing the code should be build-able without relying on external dependencies. Others may disagree, but I haven't drank the Koolaide... yet.

I need to get back on that effort... I got about 60% of the way there in 2 days & then dropped the ball because I got busy.

JP

On 5/8/07, gnandiga <gnan...@gmail.com> wrote:

Hello Jeremy,

Why have you not chosen maven?

I have no problem with ant. But still think maven is much better than
ant. But it is only a personal prefrence.

Let me know if you need some help with xDoclet.

Thanks.
Giri.

On Apr 10, 10:00 pm, "jeremy.prz" <jeremy....@gmail.com> wrote:
> I'm in the process of creating a prototype/reference project using the
> GWT, Spring and Hibernate Reference Web Application. My prototype
> project will include an ant build script, spring IoC, Hibernate ORM,
> an H2 database, JUnit test framework, and Cobertura code coverage
> reporting.
>
> The ant build script will compile everthing (including GWT stuff -
> based on this:http://braindump.dk/tech/gwt-task-for-ant/ ), configure

Giridhar Nandigam

unread,
May 8, 2007, 4:52:33 PM5/8/07
to gwt-spring-hibe...@googlegroups.com
I agree with you that a project should be able to be started on its own.

Do you think you can check the code in for the part you have
completed, and add issues to the in the issue list. In that some one
can pick the issue and start working on that.

Jeremy Przasnyski

unread,
May 8, 2007, 5:12:23 PM5/8/07
to gwt-spring-hibe...@googlegroups.com
Sure. I'm swamped with stuff to do right now, but I'll add it to my queue. I have some stuff in the source code that I might want to take out if it is checked into a public GPL (or similar) repository.

Do I need to be given write permissions for repository or anything?

JP

Giridhar Nandigam

unread,
May 9, 2007, 9:37:45 AM5/9/07
to gwt-spring-hibe...@googlegroups.com
Yes, you need write permissions to repo
or some one can check in the code if you send as an attachment..

Bradley.Holt, rlogman: Can you help with this?

Thanks.
Giri.

rlogman

unread,
May 9, 2007, 12:46:57 PM5/9/07
to GWT, Spring and Hibernate Reference Web Application
Current group settings allows every member to upload files (indeed,
when I uploaded my sample application, I was not administrator).
Please try to upload your code and tell us if you have any problem.

I'm completely anxious to see your code.

Regards,
Rodrigo.

Jeremy Przasnyski

unread,
May 24, 2007, 6:40:02 PM5/24/07
to GWT, Spring and Hibernate Reference Web Application
I have completed the prototype project. I've been EXTREMELY busy at
work, so it has taken me a while to find the time to get things
finalized. Sorry for the delay! I have a few tweaks that I need to
make (updating hibernate to latest version, ensuring things work end-
to-end in Eclipse & via ant @ command line)

At some point I had Googlipse (Google GWT Eclipse plugin) working, but
managed to severely break the project integration when "ant-ifying"
the project.

I'll attempt to upload the project in a few hours. I hope you all can
make use of it!

Jeremy

Jeremy Przasnyski

unread,
May 24, 2007, 8:55:36 PM5/24/07
to gwt-spring-hibe...@googlegroups.com
I just finished the reference project ... it is currently uploading (roughly 12MB). Here's the readme I quickly drafted before uploading (below). Please reply with any comments or suggestions.

BTW ... if there is a way to associate an SVN repository with this group (or if there is already), I'll gladly maintain the reference project there instead of doing it in my own private SVN repository.

--
Jeremy Przasnyski
AIM:jpskiii | Y!:jpskii | GTalk:jeremy.prz

readme.txt
---------------

GWT Spring Hibernate Reference Web Application
==============================================

Welcome to the reference web application that includes the following
components:
1) Ant build file (builds, localizes, deploys, runs unit tests,
   generates coverage reports, genrates DDL, etc)
2) Eclipse pre-configured project (Googlipse integration currently
   broken)
3) GWT support (with Spring IoC for server-side components)
4) Spring Inversion of Control for all components
5) Hibernate ORM (using JDK 1.5 annotations)
6) JUnit unit tests (using JDK 1.5 annotated classes, DAO code tested
   against H2 DB)
7) Cobertura unit test code coverage & reporting
8) Log4J Logging (plus a logging facade that makes dropping logging
   statements into new classes easier -- at least I think so!)

Before Getting Started
----------------------
Please be aware that this is a work-in-progress and may contain ant targets
that are unused or broken... just because it exsits doesn't mean it is
used or functional.

Getting Started: Eclipse
------------------------
1) Ensure that you have all dependencies installed (see Dependencies)
2) From Eclipse:
    * File > New > Project...
    * Choose: General > Project
    * Click 'Next'
    * Enter the following:
      - Project Name: proto
      - Uncheck 'Use Default Location'
      - Click 'Browse' and browse to the location of the extracted reference
        project
    * Click 'Finish'
    * (At this point the project should be loaded and fully 'aware' of its
      Java nature and whatnot)
3) Make sure the Ant View is showing
4) Add the build.xml file as an ant file.
5) Run the "war.exploded" target

Getting Started: Deploying
--------------------------
1) Ensure that you have all dependencies installed (see Dependencies)
2) Run the ant-target "war.exploded"
3) Start Tomcat
4) Navigate to: http://localhost:8080/proto/
5) Click the button... you should see some junk to the right about
   customers in the DB. Go verify that the button adds 'John Doe'
   to the one and only 'customers' table.

Getting Started: Testing
------------------------
1) Ensure that you have all dependencies installed (see Dependencies)
2) Run the ant-target "junit"
3) Examine code-coverage by opening:
   <projectroot>/build/reports/artifacts/coverage/index.html
  
You can also run unit tests from within Eclipse, but the code coverage
system (cobertura) will not be used.

Dependencies
------------
1) A user environment per-user, per-host (see below)
2) A database (MySQL 5.0.20-standard preferred)
3) A J2EE Web container (apache-tomcat-5.5.17 preferred)

User Environments (UE)
-----------------
The ant buildfile assumes that every developer has a different environment
per user (username), per computer (hostname).

The ant buildfile expects the following files to exist:
<projectroot>/conf/env/user/<username>.<hostname>.properties

Let's call this file a UE for brevity. Each UE contains the user's environment,
which is essentially a link to a file containing shared configuration. My
UE is at the path:
<projectroot>/conf/env/user/jeremy.jerry.properties
and uses the environment 'development', which is located at:
<projectroot>/conf/env/development.properties

My username is 'jeremy' and my computer's hostname is 'jerry' (I love
Seinfeld!), thus the name jeremy.jerry.properties. Each user must create
their own UE that matches their specific environment.

Database
--------
When building this reference project, I was using MySQL 5 with a database
called 'proto' username 'proto' and password 'proto'. The proto user had
full permissions on the DB. Hibernate (at least with my UE) will automatically
update the DDL within the DB (see this line in my UE:
hibernate.hbm2ddl.auto=update)

My configuration is not guaranteed to be perfect or optimized (nor is the DDL).
My goal was to get all the big-picture parts hooked all together so that the
tuning could be done for whatever specific application you have in mind.

H2, the database I used for testing will automatically be configured, and
populated by the single unit test. I typically delete all data at the beginning
of a unit test and leave it at the end of the test since I sometimes want to
inspect the state of the DB when a test fails. You can connect to H2 via
DBVisualizer using the H2 JDBC driver (beyond the scope of this document).

J2EE Web Container
------------------
This reference project creates a WAR file was implemented using
Apache Tomcat 5.5. For the initial development of this reference
project, a plain-vanilla installation of Tomcat 5.5.17 was used
with all examples removed.

Jeremy Przasnyski

unread,
May 25, 2007, 12:32:25 AM5/25/07
to gwt-spring-hibe...@googlegroups.com
I'm attempting to upload the reference project and it doesn't seem to be accepting the upload. I attached a screenshot of what I see as it is attempting to perform the upload.  I let it sit on this screen for at least 3 hours (plenty of time to upload a 12MB file regardless of the upload speed).

In the meantime I'll just drop it on my server. Here's the url:
http://pski.org/gwt-proto-20070524-174844.tgz

Can someone sanity check me on the file upload process?

Jeremy
upload-screenshot.png

Rodrigo López Guzmán

unread,
May 25, 2007, 6:17:29 AM5/25/07
to gwt-spring-hibe...@googlegroups.com
Plese visit http://code.google.com/p/gwt-spring-hibernate-reference/source

Tell me if you have any problem with the SVN repository.


Rodrigo.

Jeremy Przasnyski

unread,
May 25, 2007, 9:53:56 AM5/25/07
to gwt-spring-hibe...@googlegroups.com
Can someone add me to the project so I can get read/write access to the SVN repository?

Also, I'm assuming I should create a new project under trunk as opposed to blowing away the GWT_Spring_Hibernate_Sample? I started completely from scratch, so my code/config has nothing to do with GWT_Spring_Hibernate_Sample.

Jeremy

Rodrigo López Guzmán

unread,
May 25, 2007, 10:12:28 AM5/25/07
to gwt-spring-hibe...@googlegroups.com

I've added you as a project member, so you can start to upload your project.

You have to authenticate over HTTPS to commit changes (upload/delete files) to the SVN repository.

Previously, you have to generate a googlecode.com password for you.


Rodrigo.

Jeremy Przasnyski

unread,
May 25, 2007, 10:34:15 AM5/25/07
to gwt-spring-hibe...@googlegroups.com
I just checked in the project under a different folder under trunk:
gwt-spring-hibernate-ant-reference

Let me know what you think.

Giridhar Nandigam

unread,
May 25, 2007, 11:39:28 AM5/25/07
to gwt-spring-hibe...@googlegroups.com
Jeremy did you try to check your code in through svn?

I think that would be btter

On 5/25/07, Jeremy Przasnyski <jerem...@gmail.com> wrote:

Giridhar Nandigam

unread,
May 25, 2007, 11:40:06 AM5/25/07
to gwt-spring-hibe...@googlegroups.com
sorry, didnot see your last message.

Will check and let you know.

Jeremy Przasnyski

unread,
May 25, 2007, 5:59:21 PM5/25/07
to gwt-spring-hibe...@googlegroups.com
Okay... so I should have done some research. Apparently GWT doesn't support Java 5.0 source code. What that means for my reference project is that I have to make adapter classes for any object that crosses an RPC service boundary.

I found this out by adding a method to the HelloService that returned a list of Customer objects (EJB 3.0 annotated class for objects in the customers table). Additionally, according to this:
http://code.google.com/webtoolkit/makinggwtbetter.html#roadmap
JDK 5.0 support is 'Tier 2' (More complex, but important) on the list of things to do.

Oh well... I guess I'll be ready when GWT 1.4 or 1.5 comes out.

Until then I guess I'll just have to wrap 5.0 objects in 1.4 adapters. blech.

Jeremy

Jeremy Przasnyski

unread,
May 26, 2007, 1:18:00 PM5/26/07
to gwt-spring-hibe...@googlegroups.com
I've been messing around with both projects (mine and the existing one) & realized that the existing project includes translations between domain objects and adaptor objects that are used across the RPC boundary. I assume this is a necessary evil in using GWT currently?

I'll beef up the RPC layer to include more calls between the client and server layers.

Jeremy

Jeremy Przasnyski

unread,
May 27, 2007, 1:16:47 AM5/27/07
to GWT, Spring and Hibernate Reference Web Application
Okay... my reference project now has a decent UI. By 'decent' I mean
uses domain objects, services, DAOs, and other IoC wired goodness.

Additionally, I read a bit in the GWT Google Group and discovered that
mapping between client-side IsSerializable objects and server-side
domain objects (hibernate mapped) is a common issue. Apparently many
people use dozer to do the mappings automatically. The whole mapping
between client/server objects feels a bit 'dirty' to me, but is
understandable given what is going on under the covers.

I have added dozer to this reference project to perform the mapping
between CustomerAdaptor and Customer domain object.

Here's my roadmap of things I'm interested in:
1) Reconfiguring Googlipse to work with the project (I want to debug
the client-side app stuff within Eclipse)
2) Figure out how to get client-side unit tests to work
3) Figure out how to get client-side unit tests to work from within
ant
4) Give the app a little CSS love (plain vanilla isn't too fun).

I'm still interested in getting some feedback! Anyone?

On May 26, 10:18 am, "Jeremy Przasnyski" <jeremy....@gmail.com> wrote:
> I've been messing around with both projects (mine and the existing one) &
> realized that the existing project includes translations between domain
> objects and adaptor objects that are used across the RPC boundary. I assume
> this is a necessary evil in using GWT currently?
>
> I'll beef up the RPC layer to include more calls between the client and
> server layers.
>
> Jeremy
>

> On 5/25/07, Jeremy Przasnyski <jeremy....@gmail.com> wrote:
>
>
>
>
>
> > Okay... so I should have done some research. Apparently GWT doesn't
> > support Java 5.0 source code. What that means for my reference project is
> > that I have to make adapter classes for any object that crosses an RPC
> > service boundary.
>
> > I found this out by adding a method to the HelloService that returned a
> > list of Customer objects (EJB 3.0 annotated class for objects in the
> > customers table). Additionally, according to this:
> >http://code.google.com/webtoolkit/makinggwtbetter.html#roadmap
> > JDK 5.0 support is 'Tier 2' (More complex, but important) on the list of
> > things to do.
>
> > Oh well... I guess I'll be ready when GWT 1.4 or 1.5 comes out.
>
> > Until then I guess I'll just have to wrap 5.0 objects in 1.4 adapters.
> > blech.
>
> > Jeremy
>

> > On 5/25/07, Giridhar Nandigam <gnand...@gmail.com> wrote:
>
> > > sorry, didnot see your last message.
>
> > > Will check and let you know.
>

> > > On 5/25/07, Giridhar Nandigam < gnand...@gmail.com> wrote:
> > > > Jeremy did you try to check your code in through svn?
>
> > > > I think that would be btter
>

> > > > On 5/25/07, Jeremy Przasnyski < jeremy....@gmail.com> wrote:
> > > > > I'm attempting to upload the reference project and it doesn't seem
> > > to be
> > > > > accepting the upload. I attached a screenshot of what I see as it is
>
> > > > > attempting to perform the upload. I let it sit on this screen for
> > > at least
> > > > > 3 hours (plenty of time to upload a 12MB file regardless of the
> > > upload
> > > > > speed).
>
> > > > > In the meantime I'll just drop it on my server. Here's the url:
> > > > >http://pski.org/gwt-proto-20070524-174844.tgz
>
> > > > > Can someone sanity check me on the file upload process?
>
> > > > > Jeremy
>

Reply all
Reply to author
Forward
0 new messages