Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.codehaus.groovy.grails.compiler
[Groovy] Class GrailsProjectCompiler

    java.lang.Object
      org.codehaus.groovy.grails.compiler.GrailsProjectCompiler

    class GrailsProjectCompiler
    extends java.lang.Object

Encapsulates the compilation logic required for a Grails application.

Authors:
  Graeme Rocher

Since:
  2.0

Field Summary
`static java.util.List` | `EXCLUDED_PATHS`

Property Summary
`java.lang.String` | `basedir`
`BuildSettings` | `buildSettings`
`java.lang.ClassLoader` | `classLoader`
`java.lang.Object` | `commonClasspath`
`java.lang.Object` | `compileClasspath`
`java.util.List` | `compilerExtensions`
`java.lang.String` | `encoding`
`boolean` | `isPluginProject`
`java.util.Map` | `javaOptions`
`PluginBuildSettings` | `pluginSettings`
`java.lang.Object` | `runtimeClasspath`
`java.util.List` | `srcDirectories`
`java.lang.String` | `srcdir`
`java.io.File` | `targetClassesDir`
`java.io.File` | `targetPluginClassesDir`
`java.lang.Object` | `testClasspath`
`boolean` | `verbose`

Constructor Summary
`GrailsProjectCompiler(PluginBuildSettings pluginBuildSettings, java.lang.ClassLoader rootLoader = Thread.currentThread()` Constructs a new GrailsProjectCompiler instance for the given PluginBuildSettings and optional classloader

Method Summary
`void` | `compile()` Compiles project sources using the target directory passed by PluginBuildSettings
`void` | `compile(java.lang.Object targetDir)` Compiles project sources to the given target directory
`void` | `compileAll()` Compiles plugin and normal sources
`void` | `compileGroovyPages(java.lang.String grailsAppName, java.lang.Object classesDir = targetClassesDir)` Compiles GSP pages for the given application name to the (optional) target directory
`protected java.lang.Object` | `compilePluginDescriptor(java.io.File descriptor, java.io.File classesDir)` Compiles a given plugin descriptor file - *GrailsPlugin.groovy.
`void` | `compilePlugins()`
`void` | `compilePlugins(java.lang.Object targetDir)` Compiles plugin sources files to the given target directory
`void` | `configureClasspath()` Configures the Grails classpath, should be called prior to any call to compile(Object)
`groovy.util.AntBuilder` | `getAnt()`
`java.util.List` | `getExtraDependencies()` Extra dependencies defined by the 'grails.compiler.dependencies' config option in BuildConfig
`java.util.List` | `getJarFiles()` Obtains all JAR files for the project that aren't declared via BuildConfig
`void` | `setAnt(groovy.util.AntBuilder ant)`

Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Field Detail

### EXCLUDED_PATHS

    public static final java.util.List EXCLUDED_PATHS

Property Detail

### basedir

    java.lang.String basedir

### buildSettings

    BuildSettings buildSettings

### classLoader

    java.lang.ClassLoader classLoader

### commonClasspath

    java.lang.Object commonClasspath

### compileClasspath

    java.lang.Object compileClasspath

### compilerExtensions

    java.util.List compilerExtensions

### encoding

    java.lang.String encoding

### isPluginProject

    boolean isPluginProject

### javaOptions

    java.util.Map javaOptions

### pluginSettings

    PluginBuildSettings pluginSettings

### runtimeClasspath

    java.lang.Object runtimeClasspath

### srcDirectories

    java.util.List srcDirectories

### srcdir

    java.lang.String srcdir

### targetClassesDir

    java.io.File targetClassesDir

### targetPluginClassesDir

    java.io.File targetPluginClassesDir

### testClasspath

    java.lang.Object testClasspath

### verbose

    boolean verbose

Constructor Detail

### GrailsProjectCompiler

    GrailsProjectCompiler(PluginBuildSettings pluginBuildSettings, java.lang.ClassLoader rootLoader = Thread.currentThread()

  Constructs a new GrailsProjectCompiler instance for the given PluginBuildSettings and optional classloader
  Parameters:
    `pluginBuildSettings` - The PluginBuildSettings
    `rootLoader` - The ClassLoader

Method Detail

### compile

    void compile()

  Compiles project sources using the target directory passed by PluginBuildSettings

### compile

    void compile(java.lang.Object targetDir)

  Compiles project sources to the given target directory
  Parameters:
    `targetDir` - The target directory to compile to

### compileAll

    void compileAll()

  Compiles plugin and normal sources

### compileGroovyPages

    void compileGroovyPages(java.lang.String grailsAppName, java.lang.Object classesDir = targetClassesDir)

  Compiles GSP pages for the given application name to the (optional) target directory
  Parameters:
    `grailsAppName` - The app name
    `classesDir` - The optional classes dir, defaults to one provided by PluginBuildSettings in constructor

### compilePluginDescriptor

    protected java.lang.Object compilePluginDescriptor(java.io.File descriptor, java.io.File classesDir)

  Compiles a given plugin descriptor file - *GrailsPlugin.groovy.

### compilePlugins

    void compilePlugins()

### compilePlugins

    void compilePlugins(java.lang.Object targetDir)

  Compiles plugin sources files to the given target directory
  Parameters:
    `targetDir` - The target directory to compile to

### configureClasspath

    void configureClasspath()

  Configures the Grails classpath, should be called prior to any call to compile(Object)

### getAnt

    groovy.util.AntBuilder getAnt()

### getExtraDependencies

    java.util.List getExtraDependencies()

  Extra dependencies defined by the 'grails.compiler.dependencies' config option in BuildConfig
  Returns:

### getJarFiles

    java.util.List getJarFiles()

  Obtains all JAR files for the project that aren't declared via BuildConfig
  Returns:
    A list of JAR files

### setAnt

    void setAnt(groovy.util.AntBuilder ant)

Groovy Documentation