This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://github.com/grails/grails-core/releases/download/v2.5.0/grails-2.5.0.zip && unzip grails-2.5.0.zip && export GRAILS_HOME=`pwd`/grails-2.5.0 && export PATH=$GRAILS_HOME/bin:$PATH && grails create-app testapp && cd testapp && grails run-app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sourceSets { | |
main { | |
groovy { | |
srcDirs += 'src/main/java' | |
} | |
java { | |
srcDirs = [] | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FAILURE: Build failed with an exception. | |
* What went wrong: | |
A problem occurred configuring project ':java-custom-artifacts-using-plugin'. | |
> Could not resolve all dependencies for configuration ':java-custom-artifacts-using-plugin:classpath'. | |
> Could not find com.acme.gradle:plugin-custom-artifacts:1.0-SNAPSHOT. | |
Searched in the following locations: | |
file:/Users/jeff/.m2/repository/com/acme/gradle/plugin-custom-artifacts/1.0-SNAPSHOT/maven-metadata.xml | |
file:/Users/jeff/.m2/repository/com/acme/gradle/plugin-custom-artifacts/1.0-SNAPSHOT/plugin-custom-artifacts-1.0-SNAPSHOT.pom | |
file:/Users/jeff/.m2/repository/com/acme/gradle/plugin-custom-artifacts/1.0-SNAPSHOT/plugin-custom-artifacts-1.0-SNAPSHOT.jar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object localObject1; | |
String str1; | |
if ((args.get("firstName") == null ? 1 : 0) != 0) | |
{ | |
localObject1 = null; | |
this.firstName = ((String)ShortTypeHandling.castToString(localObject1)); | |
} | |
else | |
{ | |
str1 = (String)ShortTypeHandling.castToString(args.get("firstName")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div { | |
width: 280px; | |
height: 280px; | |
background-image: url(http://images.mentalfloss.com/sites/default/files/styles/article_640x430/public/bill_ted1.jpg); | |
-webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 66%, 0% 100%); | |
clip-path: polygon(0% 0%, 100% 0%, 100% 66%, 0% 100%); | |
} | |
/* Center the demo */ | |
html, body { height: 100%; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ grails create-app whatisit && cd whatisit && grails create-domain-class demo.Foo && ./gradlew cG && javap -classpath build/classes/main demo.Foo|grep "class demo.Foo" | |
public class demo.Foo implements org.grails.datastore.mapping.dirty.checking.DirtyCheckable, org.grails.datastore.gorm.GormEntity<demo.Foo>, grails.artefact.DomainClass, grails.web.databinding.WebDataBinding, grails.gorm.Entity<demo.Foo>, org.grails.datastore.mapping.dirty.checking.DirtyCheckable$Trait$FieldHelper, org.grails.datastore.gorm.GormValidateable$Trait$FieldHelper, groovy.lang.GroovyObject { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def x = [:].with { | |
a = 8 | |
b = 2 | |
c = a / b | |
delegate | |
} | |
Or... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ $ groovysh | |
Groovy Shell (2.4.5, JVM: 1.7.0_79) | |
Type ':help' or ':h' for help. | |
------------------------------------------------------------------------------- | |
groovy:000> sdf = new java.text.SimpleDateFormat('MM/dd/yyyy') | |
===> java.text.SimpleDateFormat@7c669100 | |
groovy:000> sdf.parse('05/16/20166') | |
===> Fri May 16 00:00:00 CDT 20166 | |
groovy:000> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Error Fatal error during compilation org.apache.tools.ant.BuildException: java.lang.NoSuchMethodError: org.grails.data | |
store.mapping.reflect.ReflectionUtils.isGetter(Ljava/lang/String;[Ljava/lang/Class;)Z (NOTE: Stack trace has been filter | |
ed. Use --verbose to see entire trace.) | |
java.lang.NoSuchMethodError: org.grails.datastore.mapping.reflect.ReflectionUtils.isGetter(Ljava/lang/String;[Ljava/lang | |
/Class;)Z | |
at org.grails.datastore.gorm.query.transform.DetachedCriteriaTransformer.isGetter(DetachedCriteriaTransformer.ja | |
va:1335) | |
at org.grails.datastore.gorm.query.transform.DetachedCriteriaTransformer.populatePropertiesForClassNode(Detached | |
CriteriaTransformer.java:529) | |
at org.grails.datastore.gorm.query.transform.DetachedCriteriaTransformer.getPropertyNames(DetachedCriteriaTransf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ERROR org.hibernate.property.access.spi.GetterMethodImpl - HHH000122: IllegalArgumentException in class: demo.Person, getter method of property: id | |
ERROR org.springframework.boot.SpringApplication - Application startup failed | |
org.springframework.orm.hibernate5.HibernateSystemException: IllegalArgumentException occurred calling getter of demo.Person.id; nested exception is org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of demo.Person.id | |
at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:296) | |
at org.grails.orm.hibernate.GrailsHibernateTemplate.convertHibernateAccessException(GrailsHibernateTemplate.java:661) | |
at org.grails.orm.hibernate.GrailsHibernateTemplate.doExecute(GrailsHibernateTemplate.java:247) | |
at org.grails.orm.hibernate.GrailsHibernateTemplate.execute(GrailsHibernateTemplate.java:187) | |
at org.grails.orm.hibernate.GrailsHibernateTemplate.execute(GrailsHibernateTemplate.java:110) | |
at org.grails.o |