Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added pom.xml and removed prepare-jruby.sh

  • Loading branch information...
commit 15dc5fa3f75482e9ebd1ac0c456af3d1e0bff9eb 1 parent 38dc646
Christian Meier authored November 29, 2009

Showing 1 changed file with 44 additions and 30 deletions. Show diff stats Hide diff stats

  1. 74  datamapper_rails_templates.rb
74  datamapper_rails_templates.rb
@@ -77,32 +77,43 @@ def <<(arg)
77 77
 end
78 78
 CODE
79 79
 
80  
-file 'prepare_jruby.sh', <<-CODE
81  
-#!/bin/bash
82  
-
83  
-echo
84  
-echo "shall freeze rails and fix a bug which prevents rails to use certain"
85  
-echo "java gems like the dataobjects drivers (do_sqlite3, etc) !!"
86  
-echo
87  
-
88  
-mvn --version
89  
-if [ $? -ne 0 ] ; then
90  
-
91  
-        echo "please install maven >= 2.0.9 from maven.apache.org"
92  
-        exit -1
93  
-fi
94  
-
95  
-mvn de.saumya.mojo:rails-maven-plugin:gems-install de.saumya.mojo:rails-maven-plugin:rails-freeze-gems de.saumya.mojo:rails-maven-plugin:gems-install -Djruby.fork=false
96  
-
97  
-echo
98  
-echo "you can run rails with (no need to install jruby !!)"
99  
-echo
100  
-echo "\tmvn de.saumya.mojo:rails-maven-plugin:server -Djruby.fork=false"
101  
-echo
102  
-echo "more info on"
103  
-echo "\thttp://github.org/mkristian/rails-maven-plugin"
104  
-echo
105  
-echo
  80
+file 'pom.xml', <<-CODE
  81
+<project xmlns="http://maven.apache.org/POM/4.0.0"
  82
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  83
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
  84
+                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
  85
+  <modelVersion>4.0.0</modelVersion>
  86
+  <groupId>com.example</groupId>
  87
+  <artifactId>demo</artifactId>
  88
+  <packaging>war</packaging>
  89
+  <version>1.0-SNAPSHOT</version>
  90
+  <name>rails datamapper demo</name>
  91
+  <url>http://github.com/mkristian/rails-templates/blob/master/datamapper.rb</url>
  92
+  <pluginRepositories>
  93
+    <pluginRepository>
  94
+      <id>saumya</id>
  95
+      <name>Saumyas Plugins</name>
  96
+      <url>http://mojo.saumya.de</url>
  97
+    </pluginRepository>
  98
+  </pluginRepositories>
  99
+  <build>
  100
+    <plugins>
  101
+      <plugin>
  102
+        <groupId>de.saumya.mojo</groupId>
  103
+        <artifactId>rails-maven-plugin</artifactId>
  104
+	<version>0.3.0</version>
  105
+      </plugin>
  106
+      <plugin>
  107
+        <groupId>de.saumya.mojo</groupId>
  108
+        <artifactId>jruby-maven-plugin</artifactId>
  109
+	<version>0.3.0</version>
  110
+      </plugin>
  111
+    </plugins>
  112
+  </build>
  113
+  <properties>
  114
+    <jruby.fork>false</jruby.fork>
  115
+  </properties>
  116
+</project>
106 117
 CODE
107 118
 
108 119
 rake 'db:sessions:create'
@@ -112,10 +123,13 @@ def <<(arg)
112 123
 logger.info "info mavenized rails application"
113 124
 logger.info "\thttp://github.org/mkristian/rails-maven-plugin"
114 125
 logger.info 
115  
-logger.info "if you want to run jruby please run again after uninstalling"
116  
-logger.info "the native extension of do_sqlite3"
  126
+logger.info "if you want to run jruby please uninstall"
  127
+logger.info "the native extension of do_sqlite3 and install the java version"
117 128
 logger.info "\truby -S gem uninstall do_sqlite3"
118 129
 logger.info "\tjruby -S rake gems:install"
119  
-logger.info "rake gems:unpack does NOT work with jruby due to a bug in rail <=2.3.4"
120  
-logger.info "you can try the prepare-jruby.sh script and see if this works for you"
  130
+logger.info 
  131
+logger.info "rake gems:unpack does NOT work with jruby due to a bug in rails <=2.3.4"
  132
+logger.info "you can try which patches rails after freezing it"
  133
+logger.info "\tmvn rails:rails-freeze-gems"
  134
+logger.info 
121 135
 logger.info 

0 notes on commit 15dc5fa

Please sign in to comment.
Something went wrong with that request. Please try again.