|
Hi Michael,
Sounds great. I am curious if you ran into an issue I have been seeing when building Grails 2.0 via Maven. After the build completes, Grails appears to have stolen the standard input (I can type, but I cannot see what I am typing in that terminal window). There appears to be no way to get it back, other than closing the terminal window and starting over. I suspect this is being caused by the Grails Gant scripts and/or something it is doing underneath in Grails itself. Thanks, --Jonathan On Mon, Dec 5, 2011 at 3:44 PM, Michael Lawler <[hidden email]> wrote:
|
Sounds great. I am curious if you ran into an issue I have been seeing when building Grails 2.0 via Maven. After the build completes, Grails appears to have stolen the standard input (I can type, but I cannot see what I am typing in that terminal window). There appears to be no way to get it back, other than closing the terminal window and starting over. I suspect this is being caused by the Grails Gant scripts and/or something it is doing underneath in Grails itself. This is connected to the use of JLine for doing console output. I'm not sure whether the Maven plugin can activate the "--plain-output" option, but I would recommend doing so if it can. We should also look into fixing the underlying issue. If it's easily reproducible with the Maven plugin, all the better.
Peter Peter Ledbrook Grails Advocate SpringSource - A Division of VMware |
|
In reply to this post by jpearlin
Hi Jonathon,
Yes, I encountered that problem :-) I am on OSX Terminal. I noticed that the output is a bit ugly since the line prefixes coming from maven are newlined and then do not match the following grails output. Needs cleaning up. Interestingly, our thin grails wrapper doesnt have either of those problems. It does however repeat lines where the console line is being "appended to" (i.e. with dots indicating progress. But the terminal is fine afterwards. Michael On 08/12/2011, at 1:55 AM, Jonathan Pearlin wrote: Hi Michael, |
|
Hi Michael,
I will try working in the fix Peter suggested (the --plain-output) to see if that helps to clean up the output from Grails when executed via the Maven plugin (hopefully I will get to it by the end of this week/weekend). Thanks, --Jonathan On Wed, Dec 7, 2011 at 2:07 PM, Michael Lawler <[hidden email]> wrote:
|
|
All,
I made the change suggested by Peter to pass the "--plain-output" switch to Grails from the Maven plugin and it definitely changes the output. However, it does not solve the problem of the standard out disappearing after running via Maven (as Peter suggested it might not). If we feel that we should be using the plain output, let me know and I will push the change up to my github repo for the grails-maven plugin. The next step will be to do further investigation into why it is eating the standard out. Any pointers at where to start in the Grails code (i.e. where JLine gets configured for use) would be greatly appreciated. Thanks, --Jonathan On Thu, Dec 8, 2011 at 5:21 AM, Jonathan Pearlin <[hidden email]> wrote: Hi Michael, |
|
Administrator
|
The problem is almost certainly JLine's ConsoleReader and how it interacts with standard out in the context of Maven
Cheers
On Mon, Dec 12, 2011 at 4:37 PM, Jonathan Pearlin <[hidden email]> wrote: All, Graeme Rocher Grails Project Lead SpringSource - A Division of VMware http://www.springsource.com |
|
Administrator
|
In reply to this post by jpearlin
Question, do you get any prompts during the build?
On Mon, Dec 12, 2011 at 4:37 PM, Jonathan Pearlin <[hidden email]> wrote: All, Graeme Rocher Grails Project Lead SpringSource - A Division of VMware http://www.springsource.com |
|
No, because we have the --non-interactive switch being sent to Grails from Maven. I can try removing this to see if we get prompts at all.
--Jonathan On Mon, Dec 12, 2011 at 8:13 AM, Graeme Rocher <[hidden email]> wrote: Question, do you get any prompts during the build? |
|
In reply to this post by mlawler
Hi,
I have been trying to progress this myself, but I am stuck :-) I have simple Grails 2.0 example (that doesnt work) that contains: (a) a vanilla 2.0.0 grails plugin with a single domain object 'demo.Book'. the plugin can be packaged by the release plugin ('grails maven-install') to build and install a jar (binary plugin) into your local .m2 repo (b) a maven project that tests standalone GORM via a single test case that loads an application context and tries to persist and find a Book via GORM. (test case currently fails) For the test case applicationContext.xml I have tried to build an appropriate grails.xml file and provide the necessary beans for the context so that it simulates normal web app startup. I have confirmed that the domain class is loaded in GrailsApplicationFactoryBean.afterPropertiesSet() (based on explicitly listing the domain class's name in the grails.xml resource section. I get the following error: testStandaloneGorm(standalone.GormTest): Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Post-processing of the FactoryBean's object failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.codehaus.groovy.grails.orm.hibernate.ConfigurableLocalSessionFactoryBean]: Error configuring GORM dynamic behavior: No such property: domainClasses for class: org.codehaus.groovy.grails.commons.DefaultGrailsApplication; nested exception is groovy.lang.MissingPropertyException: No such property: domainClasses for class: org.codehaus.groovy.grails.commons.DefaultGrailsApplication Can anyone explain which part of grails is responsible for setting up the 'domainClasses' property on the GrailsApplication object? This is critical for my project. I am happy to build and work with a patched version of grails for a while until official support is implemented or documented. regards, Michael On 07/12/2011, at 5:53 PM, Michael Lawler wrote: > Hi (Burt?) > > Does anyone know of any success with Standalone GORM using grails 2.0? This is critical for me. > > Using the previous <gorm:sessionFactory> approach (that works fine in 1.3.7) we encounter an error that the GrailsDomainMappingClassContent is not available. > > If I try to wire one of those into the context, then it needs a GrailsApplication. I can dummy a default one of those, but it needs an ApplicationContext and I couldnt get that to work correctly. > > If I try to replicate what happens in the grails application context, using GrailsApplicationFactoryBean etc, the applicationContext initialisation fails with No such property: domainClasses for the DefaultGrailsApplication class. > > Any pointers on how I should move forward trying to get this working? > > regards, > Michael --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Hi,
Burt Beckwith has solved this for me by providing some code for a new factory that subclasses the application factory bean: package standalone; import org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean; public class InitializingGrailsApplicationFactoryBean extends GrailsApplicationFactoryBean { @Override public void afterPropertiesSet() throws Exception { super.afterPropertiesSet(); super.getObject().initialise(); } } and then change the bean class in applicationContext.xml to: <bean id="grailsApplication" class="standalone.InitializingGrailsApplicationFactoryBean"> Thanks Burt. Michael On 19/12/2011, at 2:19 PM, Michael Lawler wrote:
|
|
In reply to this post by mlawler
> Using the previous <gorm:sessionFactory> approach (that works fine in 1.3.7) we encounter an error that the GrailsDomainMappingClassContent is not available.
This sounds like an unnecessary dependency for the GORM JARs (but not necessarily for the Grails plugin). Does anyone know if it's possible to remove this dependency? Peter -- Peter Ledbrook Grails Advocate SpringSource - A Division of VMware --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Powered by Nabble | Edit this page |
