Erik,
Here's a basic pom with which I started, if you're interested. I've
got some dependencies that might come in handy, but certainly aren't
required. These include XStream for generic serialization as XML and
JSON, Spring for all the wiring, and the YUI compressor for smooshing
all of my JS and CSS at build time. I'm using Eclipse with the
(adequate) Subclipse plugin <http://subclipse.tigris.org/> to bridge
the gap between Maven dependencies and Eclipse's project classpath. I
hope to be able to publish the source to my entire sandbox app
sometime soon. Please let me know if you have any questions.
Justin
<?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://
maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.troove</groupId>
<artifactId>troove-restlet</artifactId>
<name>troove-restlet</name>
<version>1.0-SNAPSHOT</version>
<url>http://troove.net</url>
<packaging>jar</packaging>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>net.sf.alchim</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<configuration>
<failOnWarning>true</failOnWarning>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>maven-restlet</id>
<name>Public online Restlet repository</name>
<url>http://maven.restlet.org</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.restlet</groupId>
<artifactId>org.restlet</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>org.restlet</groupId>
<artifactId>org.restlet.ext.freemarker</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>com.noelios.restlet</groupId>
<artifactId>com.noelios.restlet</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>com.noelios.restlet</groupId>
<artifactId>com.noelios.restlet.ext.jetty</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
<version>1.0-RC1</version>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.restlet</groupId>
<artifactId>org.restlet.example</artifactId>
<version>1.0.4</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
On Sep 26, 2007, at 4:31 AM, Erik Vullings wrote:
Hi Thierry,
I'm a bit further now, and I could get a basic example to run.
However, I would still like to see a basic Hello World (RESTlet as
a server) application, with build.xml or pom.xml files, and the
correct directory hierarchy. Shouldn't this be available from the
website. Or a maven archetype to quickly setup the basic structure.
It has already taken me a day or more to start, which is not really
a recommendation for RESTlet (it took me less time to get a basic
struts(2) or tapestry webapp project running, and RESTlet is
supposed to be simple...).
My current project looks like this (improvements???)
root
build
classes etc
lib
whole bunch of jar files
src
java
packagename
Main.java
Thanks
Erik
On 9/24/07, Thierry Boileau <[EMAIL PROTECTED]> wrote: Hello Erik,
this sample code must be run inside a servlet container such as
Tomcat,
Jboss, etc.
You can use one of the inner servlet containers provided by Eclipse
and
link it with the sample project (use Eclipse 3.3 e.g.) or generate the
war of the project and deploy it in your prefered servlet container
manually.
best regards,
Thierry Boileau
> Hi,
>
> I'm new to RESTlet, and liked the tutorial descriptions on
restlet.org
> <http://restlet.org>. I've also had a look at the Wiki, and did
manage
> to find some examples (like Restlet-example) by Irfan Jamadar.
> Unfortunately, it doesn't come with a tutorial how to run it...
>
> I'm using Eclipse, have read the developer FAQ#21 and included the
> library directory from Restlet in my plugin directory. I can open
this
> particular example, and it doesn't show any errors (anymore - that
> involved adding the manifest etc.), but my question is how can I run
> it (it auto builds). Or if there are other useful examples out
there,
> I would be very grateful!
>
> Thanks,
> Erik
> .