Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix forked mode by splitting grails-plugin-tomcat and grails-tomcat i…

…nto separate projects to resolve classpath issues
  • Loading branch information...
commit be8d7d348c8f4e215c7ce072527714fdf7f9af57 1 parent 1e2ab8b
@graemerocher graemerocher authored
Showing with 11 additions and 31 deletions.
  1. +1 −0  grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/fork/ForkedGrailsProcess.groovy
  2. +1 −0  grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/resolve/DependencyManagerConfigurer.groovy
  3. +0 −1  grails-plugin-tomcat/.gitignore
  4. +1 −29 grails-plugin-tomcat/build.gradle
  5. 0  ...in-tomcat → grails-tomcat}/src/main/groovy/org/grails/plugins/tomcat/InlineExplodedTomcatServer.groovy
  6. 0  {grails-plugin-tomcat → grails-tomcat}/src/main/groovy/org/grails/plugins/tomcat/IsolatedTomcat.java
  7. 0  ...lugin-tomcat → grails-tomcat}/src/main/groovy/org/grails/plugins/tomcat/IsolatedWarTomcatServer.groovy
  8. 0  ...gin-tomcat → grails-tomcat}/src/main/groovy/org/grails/plugins/tomcat/ParentDelegatingClassLoader.java
  9. 0  {grails-plugin-tomcat → grails-tomcat}/src/main/groovy/org/grails/plugins/tomcat/TomcatKillSwitch.java
  10. 0  {grails-plugin-tomcat → grails-tomcat}/src/main/groovy/org/grails/plugins/tomcat/TomcatLoader.groovy
  11. 0  {grails-plugin-tomcat → grails-tomcat}/src/main/groovy/org/grails/plugins/tomcat/TomcatServer.groovy
  12. +1 −1  ...ls-plugin-tomcat → grails-tomcat}/src/main/groovy/org/grails/plugins/tomcat/TomcatServerFactory.groovy
  13. +6 −0 ...lugin-tomcat → grails-tomcat}/src/main/groovy/org/grails/plugins/tomcat/fork/ForkedTomcatServer.groovy
  14. +1 −0  settings.gradle
View
1  ...-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/fork/ForkedGrailsProcess.groovy
@@ -158,6 +158,7 @@ abstract class ForkedGrailsProcess {
return null
}
+ @CompileStatic
public static List<File> buildMinimalIsolatedClasspath(BuildSettings buildSettings) {
List<File> buildDependencies = []
View
1  ...rap/src/main/groovy/org/codehaus/groovy/grails/resolve/DependencyManagerConfigurer.groovy
@@ -52,6 +52,7 @@ class DependencyManagerConfigurer {
private static GroovyClassLoader configureAetherClassLoader(File grailsHome) {
def lc = new LoaderConfiguration()
lc.setRequireMain(false)
+ System.setProperty("grails.home", grailsHome.canonicalPath)
System.setProperty("org.slf4j.simpleLogger.defaultLogLevel", "warn");
new File(grailsHome, "conf/aether-starter.conf").withInputStream { InputStream it ->
lc.configure(it)
View
1  grails-plugin-tomcat/.gitignore
@@ -1 +0,0 @@
-bin/
View
30 grails-plugin-tomcat/build.gradle
@@ -1,33 +1,5 @@
-def tomcatVersion = "7.0.30"
-configurations {
- optional
-}
dependencies {
- // Ant
- compile "org.apache.ant:ant:${antVersion}"
- compile "jline:jline:$jlineVersion", {
- ext.notInPom = true
- }
- compile "org.fusesource.jansi:jansi:$jansiVersion", {
- ext.notInPom = true
- }
-
-
- compile "org.apache.tomcat.embed:tomcat-embed-core:$tomcatVersion"
- compile "org.apache.tomcat.embed:tomcat-embed-logging-log4j:$tomcatVersion"
- runtime "org.apache.tomcat.embed:tomcat-embed-logging-juli:$tomcatVersion"
-
- runtime "org.apache.tomcat:tomcat-catalina-ant:$tomcatVersion"
- runtime "org.apache.tomcat.embed:tomcat-embed-jasper:$tomcatVersion"
- runtime "org.eclipse.jdt.core.compiler:ecj:3.7.2"
- optional project(":grails-core"),
- project(":grails-web")
-}
-sourceSets {
- main {
- compileClasspath += files(configurations.optional)
- }
+ compile project(":grails-tomcat"),project(":grails-core")
}
-javadoc.classpath += files(configurations.optional)
View
0  .../tomcat/InlineExplodedTomcatServer.groovy → .../tomcat/InlineExplodedTomcatServer.groovy
File renamed without changes
View
0  ...grails/plugins/tomcat/IsolatedTomcat.java → ...grails/plugins/tomcat/IsolatedTomcat.java
File renamed without changes
View
0  ...ins/tomcat/IsolatedWarTomcatServer.groovy → ...ins/tomcat/IsolatedWarTomcatServer.groovy
File renamed without changes
View
0  ...s/tomcat/ParentDelegatingClassLoader.java → ...s/tomcat/ParentDelegatingClassLoader.java
File renamed without changes
View
0  ...ails/plugins/tomcat/TomcatKillSwitch.java → ...ails/plugins/tomcat/TomcatKillSwitch.java
File renamed without changes
View
0  ...grails/plugins/tomcat/TomcatLoader.groovy → ...grails/plugins/tomcat/TomcatLoader.groovy
File renamed without changes
View
0  ...grails/plugins/tomcat/TomcatServer.groovy → ...grails/plugins/tomcat/TomcatServer.groovy
File renamed without changes
View
2  ...plugins/tomcat/TomcatServerFactory.groovy → ...plugins/tomcat/TomcatServerFactory.groovy
@@ -79,7 +79,7 @@ class TomcatServerFactory implements EmbeddableServerFactory,BuildSettingsAware
@CompileStatic
private List<File> buildMinimalIsolatedClasspath() {
List<File> buildDependencies = ForkedGrailsProcess.buildMinimalIsolatedClasspath(buildSettings)
- final tomcatJars = IsolatedWarTomcatServer.findTomcatJars(buildSettings)
+ final tomcatJars = ForkedTomcatServer.findTomcatJars(buildSettings)
buildDependencies.addAll(tomcatJars.findAll { File f -> !f.name.contains('juli')})
return buildDependencies
}
View
6 ...ins/tomcat/fork/ForkedTomcatServer.groovy → ...ins/tomcat/fork/ForkedTomcatServer.groovy
@@ -57,6 +57,12 @@ class ForkedTomcatServer extends ForkedGrailsProcess implements EmbeddableServer
}
@CompileStatic
+ public static Collection<File> findTomcatJars(BuildSettings buildSettings) {
+ return buildSettings.buildDependencies.findAll { File it -> it.name.contains("tomcat") && !it.name.contains("grails-plugin-tomcat") } +
+ buildSettings.providedDependencies.findAll { File it -> it.name.contains("tomcat") && !it.name.contains("grails-plugin-tomcat") }
+ }
+
+ @CompileStatic
def run() {
TomcatExecutionContext ec = executionContext
def buildSettings = new BuildSettings(ec.grailsHome, ec.baseDir)
View
1  settings.gradle
@@ -13,6 +13,7 @@ include 'grails-bootstrap',
'grails-resources',
'grails-scripts',
'grails-logging',
+ 'grails-tomcat',
'grails-wrapper',
// Plugins
Please sign in to comment.
Something went wrong with that request. Please try again.