What's new? | Help | Directory | Sign in
Google
                
Search
for
Updated Oct 07, 2007 by sunnyliu2
Installation  

Installation

  • Download and install Java SE 5 or greater from Sun's Java Site.
  • Install Apache Maven 2.x and verify Maven's installtion per Maven document
  • Install latest Apache Ant (Optional, if you want to use ANT task instead of Spring-On-Rails' Maven plugin)
  • Download and extract latest Spring-On-Rails source distribution
  • Change directory to newly created Spring-On-Rails directory from above step.
  • Build and Install Spring-On-Rails.
  •      mvn clean install
  • A BUILD SUCCESSFUL message should display at the end of installation like below
  • [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO] ------------------------------------------------------------------------
    [INFO] spring-on-rails ....................................... SUCCESS [1.703s]
    [INFO] spring-on-rails-core .................................. SUCCESS [4.688s]
    [INFO] maven-springonrails-plugin ............................ SUCCESS [1.656s]
    [INFO] ------------------------------------------------------------------------
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESSFUL
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 8 seconds
    [INFO] Finished at: Sun Oct 07 20:05:58 EDT 2007
    [INFO] Final Memory: 13M/24M
    [INFO] ------------------------------------------------------------------------
  • Installation is complete now.
  • Run the following command to generated DEMO application;
  •     ant
  • Change directory to demo project directory (default is "Sunny_DEMO");
  • Run the following command to try out newly generated application
  •    mvn jetty:run
  • launch your web browser to http://localhost:8080/<Sunny_DEMO>/index.jsp
  • Examine generated source file in ./target/src/main directory

PS.

Newly generated application does not use any relational database yet, you have to run generated DDL file and setup JDBC properties. However, Spring-On-Rails provides mock dao for immediate development environment without relational database. That is extremely useful if you are front-end designer or JSP developer, you can start development right away, and let backend developer to worry about business logic.


Comment by sridharan.kuppa, Oct 01, 2007

You need to have Java SE 6 otherwise you can not compile since it uses the new API from Java 6, Properties.load(Reader).

Comment by gppinkham, Oct 01, 2007

what is the UI made with? plain JSP?

Comment by sunnyliu2, Oct 02, 2007

It uses JSTL and XML. You can add view=xml to your URL, it will display output in XML.

Comment by jardar.tsai, Oct 03, 2007

I fail at step :Run mvn jetty:run. It said that: Missing:


1) javax.transaction:jta:jar:1.0.1B

Try downloading the file manually from:
http://java.sun.com/products/jta
Then, install it using the command:
mvn install:install-file -DgroupId?=javax.transaction -DartifactId?=jta \
-Dversion=1.0.1B -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there: mvn deploy:depl ax.transaction -DartifactId?=jta \

-Dversion=1.0.1B -Dpackaging=jar -Dfile=/path/to/file \
-Durl=url? -DrepositoryId?=id?

Path to dependency:
  1. com.asksunny.demo:Sunny_DEMO:war:0.0.1
2) org.hibernate:hibernate:jar:3.0.5 3) javax.transaction:jta:jar:1.0.1B

1 required artifact is missing.

for artifact:

com.asksunny.demo:Sunny_DEMO:war:0.0.1

from the specified remote repositories:

central (http://repo1.maven.org/maven2)

Any comment? rgs,

Comment by nmaeder, Oct 03, 2007

Download the file using your browser, you need to accept the license

Save it in a tmp directory Then:

mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta \
            -Dversion=1.0.1B -Dpackaging=jar \ 
            -Dfile=/home/nic/tmp/jta-1_0_1B-classes.zip

then start again mvn jetty:run

Comment by otaviomacedo, Oct 07, 2007

After running mvn clean install, isn't it supposed to create a build.xml file? Because when I try to run ant it complies about not finding such file. Indeed there is no build.xml, so what should I do?

Comment by sunnyliu2, Oct 08, 2007

which download file did you download? Build file is under springonrails-core module. Here is the link to build.xml in Subversion

http://spring-on-rails.googlecode.com/svn/trunk/spring-on-rails/spring-on-rails-core/build.xml

Comment by womansw...@gmx.net, Oct 13, 2007

I get ...

$ mvn jetty:run
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'jetty'.
[INFO] artifact org.apache.maven.plugins:maven-jetty-plugin: checking for updates from central
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-jetty-plugin' does not exist or no valid version could be found
Comment by sunnyliu2, Oct 16, 2007

try here http://www.mortbay.org/maven-plugin/index.html. You may be able to find the answer for jetty related issues.

Comment by rien.null, Nov 21, 2007

mvn install

was Ant BUILD SUCCESS.

mvn clean

or

mvn clean install

was Ant BUILD ERROR.

SoR version was 1.0.5

Comment by rien.null, Nov 21, 2007

Did womansw... forget cd before Jetty running?

cd dist/project

mvn jetty:run

Change dist and project to your setting.

I think you should see "Getting Started", "5MinutesTutorial".

Comment by jimmysfu, Dec 15, 2007

see at: http://www.nabble.com/-Jetty-support--howto-install-mvn%3Ajetty-plugin--td6728273.html add the followings to pom.xml:

<build>
<plugins>
<plugin>
<groupid>
org.mortbay.jetty
</groupid>
<artifactid>
maven-jetty-plugin
</artifactid>
<version>
6.0.1
</version>
</plugin>
</plugins>
</build>


Sign in to add a comment