[Lift] Re: Building war for production mode.
Thanks very much, I missing the production.default.props file . Cheers, Neil On Nov 28, 9:33 pm, Leo Lännenmäki wrote: > Hi, > > I'm a Lift newbie so I don't know if my way is the "right" way but > here goes: > > I generated my app using the archetype lift-archetype-basic in order > to get the database configuration stuff to Boot.scala. Then i created > two files src/main/webapp/WEB-INF/classes/props/default.props and > production.default.props. When developing I want to use an in memory > database so I added: > > db.driver = org.apache.derby.jdbc.EmbeddedDriver > db.url = jdbc:derby:my_database_name;create=true > > to default.props. I want to use MySQL on the "production" server so I > added: > > db.driver = com.mysql.jdbc.Driver > db.url = jdbc:mysql://localhost:3306/my_database_name > db.user = my_user > db.password = my_pass > > to production.default.props. On the "production" server I user Tomcat > with -Drun.mode=production. > > I hope you get some ideas about my configuration. > > Leo > > On Nov 28, 11:02 am, "Neil.Lv" wrote: > > > Now the lift app runs in the production mode, > > > ### > > put the "JAVA_OPTIONS=-Drun.mode=production" on the top, and it can > > workd. > > ### > > > But it will create the database in the jetty's folder > > /home/jetty6/derby.log > > /home/jetty6/lift_example > > > It can's find the jdbc:mysql ? (It the development mode it can find > > the jdbc:mysql driver) > > > I don't know what's the problem with it . > > > Thanks for any help! > > > Cheers, > > Neil > > > On Nov 28, 3:48 pm, "Neil.Lv" wrote: > > > > I have the same issue, is add this statement into /home/jetty6/bin/ > > > jetty.sh > > > > ### > > > echo "JAVA_OPTIONS=-Drun.mode=production" >> /home/jetty6/bin/ > > > jetty.sh > > > ### > > > > then restart the jetty server, but it alwasy show the Development > > > Mode information > > > "The requested page was not defined in your SiteMap, so access was > > > blocked" > > > > The server is CentOS 5.3 > > > > Cheers, > > > Neil > > > > On Nov 27, 7:13 pm, Jeppe Nejsum Madsen wrote: > > > > > Marcin Jurczuk writes: > > > > > Hello, > > > > > > I'm trying to first test deploy of my app :) > > > > > > I created package (mvn package), uploaded created war as root.war in > > > > > webapp folder of jetty server and when running app it looks that lift > > > > > app is running in development mode (no 404 is showed but: > > > > > "The requested page was not defined in your SiteMap, so access was > > > > > blocked. (This message is displayed in development mode only" > > > > > > How inform maven that I'm building "production" package ? > > > > > I tried mvn -Drun.mode=production package - no effect ? > > > > > You don't build for deployment, it is the same war (modulus any compiler > > > > settings or other build steps you've specified) > > > > > The lift run mode is determined at runtime, so you need to specify the > > > > run.mode=production as a system property when launching jetty > > > > > (This is what happens with the maven command above: It starts jetty with > > > > this system property set) > > > > > If you happen to run jetty on a Debian based Linux you can accomplish > > > > this by: > > > > > echo "JAVA_OPTIONS=-Drun.mode=production" >>/etc/default/jetty6 > > > > > /Jeppe -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: Building war for production mode.
Hi, I'm a Lift newbie so I don't know if my way is the "right" way but here goes: I generated my app using the archetype lift-archetype-basic in order to get the database configuration stuff to Boot.scala. Then i created two files src/main/webapp/WEB-INF/classes/props/default.props and production.default.props. When developing I want to use an in memory database so I added: db.driver = org.apache.derby.jdbc.EmbeddedDriver db.url = jdbc:derby:my_database_name;create=true to default.props. I want to use MySQL on the "production" server so I added: db.driver = com.mysql.jdbc.Driver db.url = jdbc:mysql://localhost:3306/my_database_name db.user = my_user db.password = my_pass to production.default.props. On the "production" server I user Tomcat with -Drun.mode=production. I hope you get some ideas about my configuration. Leo On Nov 28, 11:02 am, "Neil.Lv" wrote: > Now the lift app runs in the production mode, > > ### > put the "JAVA_OPTIONS=-Drun.mode=production" on the top, and it can > workd. > ### > > But it will create the database in the jetty's folder > /home/jetty6/derby.log > /home/jetty6/lift_example > > It can's find the jdbc:mysql ? (It the development mode it can find > the jdbc:mysql driver) > > I don't know what's the problem with it . > > Thanks for any help! > > Cheers, > Neil > > On Nov 28, 3:48 pm, "Neil.Lv" wrote: > > > I have the same issue, is add this statement into /home/jetty6/bin/ > > jetty.sh > > > ### > > echo "JAVA_OPTIONS=-Drun.mode=production" >> /home/jetty6/bin/ > > jetty.sh > > ### > > > then restart the jetty server, but it alwasy show the Development > > Mode information > > "The requested page was not defined in your SiteMap, so access was > > blocked" > > > The server is CentOS 5.3 > > > Cheers, > > Neil > > > On Nov 27, 7:13 pm, Jeppe Nejsum Madsen wrote: > > > > Marcin Jurczuk writes: > > > > Hello, > > > > > I'm trying to first test deploy of my app :) > > > > > I created package (mvn package), uploaded created war as root.war in > > > > webapp folder of jetty server and when running app it looks that lift > > > > app is running in development mode (no 404 is showed but: > > > > "The requested page was not defined in your SiteMap, so access was > > > > blocked. (This message is displayed in development mode only" > > > > > How inform maven that I'm building "production" package ? > > > > I tried mvn -Drun.mode=production package - no effect ? > > > > You don't build for deployment, it is the same war (modulus any compiler > > > settings or other build steps you've specified) > > > > The lift run mode is determined at runtime, so you need to specify the > > > run.mode=production as a system property when launching jetty > > > > (This is what happens with the maven command above: It starts jetty with > > > this system property set) > > > > If you happen to run jetty on a Debian based Linux you can accomplish > > > this by: > > > > echo "JAVA_OPTIONS=-Drun.mode=production" >>/etc/default/jetty6 > > > > /Jeppe -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: Building war for production mode.
Now the lift app runs in the production mode, ### put the "JAVA_OPTIONS=-Drun.mode=production" on the top, and it can workd. ### But it will create the database in the jetty's folder /home/jetty6/derby.log /home/jetty6/lift_example It can's find the jdbc:mysql ? (It the development mode it can find the jdbc:mysql driver) I don't know what's the problem with it . Thanks for any help! Cheers, Neil On Nov 28, 3:48 pm, "Neil.Lv" wrote: > I have the same issue, is add this statement into /home/jetty6/bin/ > jetty.sh > > ### > echo "JAVA_OPTIONS=-Drun.mode=production" >> /home/jetty6/bin/ > jetty.sh > ### > > then restart the jetty server, but it alwasy show the Development > Mode information > "The requested page was not defined in your SiteMap, so access was > blocked" > > The server is CentOS 5.3 > > Cheers, > Neil > > On Nov 27, 7:13 pm, Jeppe Nejsum Madsen wrote: > > > Marcin Jurczuk writes: > > > Hello, > > > > I'm trying to first test deploy of my app :) > > > > I created package (mvn package), uploaded created war as root.war in > > > webapp folder of jetty server and when running app it looks that lift > > > app is running in development mode (no 404 is showed but: > > > "The requested page was not defined in your SiteMap, so access was > > > blocked. (This message is displayed in development mode only" > > > > How inform maven that I'm building "production" package ? > > > I tried mvn -Drun.mode=production package - no effect ? > > > You don't build for deployment, it is the same war (modulus any compiler > > settings or other build steps you've specified) > > > The lift run mode is determined at runtime, so you need to specify the > > run.mode=production as a system property when launching jetty > > > (This is what happens with the maven command above: It starts jetty with > > this system property set) > > > If you happen to run jetty on a Debian based Linux you can accomplish > > this by: > > > echo "JAVA_OPTIONS=-Drun.mode=production" >>/etc/default/jetty6 > > > /Jeppe -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: Building war for production mode.
Now the lift app runs in the production mode, ### put the "JAVA_OPTIONS=-Drun.mode=production" on the top, and it can workd. ### But it will create the database in the jetty's folder /home/jetty6/derby.log /home/jetty6/lift_example It can's find the jdbc:mysql ? (It the development mode it can find the jdbc:mysql driver) I don't know what's the problem with it . Thanks for any help! Cheers, Neil On Nov 28, 3:48 pm, "Neil.Lv" wrote: > I have the same issue, is add this statement into /home/jetty6/bin/ > jetty.sh > > ### > echo "JAVA_OPTIONS=-Drun.mode=production" >> /home/jetty6/bin/ > jetty.sh > ### > > then restart the jetty server, but it alwasy show the Development > Mode information > "The requested page was not defined in your SiteMap, so access was > blocked" > > The server is CentOS 5.3 > > Cheers, > Neil > > On Nov 27, 7:13 pm, Jeppe Nejsum Madsen wrote: > > > Marcin Jurczuk writes: > > > Hello, > > > > I'm trying to first test deploy of my app :) > > > > I created package (mvn package), uploaded created war as root.war in > > > webapp folder of jetty server and when running app it looks that lift > > > app is running in development mode (no 404 is showed but: > > > "The requested page was not defined in your SiteMap, so access was > > > blocked. (This message is displayed in development mode only" > > > > How inform maven that I'm building "production" package ? > > > I tried mvn -Drun.mode=production package - no effect ? > > > You don't build for deployment, it is the same war (modulus any compiler > > settings or other build steps you've specified) > > > The lift run mode is determined at runtime, so you need to specify the > > run.mode=production as a system property when launching jetty > > > (This is what happens with the maven command above: It starts jetty with > > this system property set) > > > If you happen to run jetty on a Debian based Linux you can accomplish > > this by: > > > echo "JAVA_OPTIONS=-Drun.mode=production" >>/etc/default/jetty6 > > > /Jeppe -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: Building war for production mode.
I have the same issue, is add this statement into /home/jetty6/bin/ jetty.sh ### echo "JAVA_OPTIONS=-Drun.mode=production" >> /home/jetty6/bin/ jetty.sh ### then restart the jetty server, but it alwasy show the Development Mode information "The requested page was not defined in your SiteMap, so access was blocked" The server is CentOS 5.3 Cheers, Neil On Nov 27, 7:13 pm, Jeppe Nejsum Madsen wrote: > Marcin Jurczuk writes: > > Hello, > > > I'm trying to first test deploy of my app :) > > > I created package (mvn package), uploaded created war as root.war in > > webapp folder of jetty server and when running app it looks that lift > > app is running in development mode (no 404 is showed but: > > "The requested page was not defined in your SiteMap, so access was > > blocked. (This message is displayed in development mode only" > > > How inform maven that I'm building "production" package ? > > I tried mvn -Drun.mode=production package - no effect ? > > You don't build for deployment, it is the same war (modulus any compiler > settings or other build steps you've specified) > > The lift run mode is determined at runtime, so you need to specify the > run.mode=production as a system property when launching jetty > > (This is what happens with the maven command above: It starts jetty with > this system property set) > > If you happen to run jetty on a Debian based Linux you can accomplish > this by: > > echo "JAVA_OPTIONS=-Drun.mode=production" >>/etc/default/jetty6 > > /Jeppe -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.