HHH-5693 Revert back to a single compile, but without -s option

When using the two compile steps the package-info.class are getting corrupted. For this reason I am switching back to a single compile, but without the -s option to avoid the problem on Mac. As a result the meta model classes are generated in target/classes/test. On the other hand the build script is simpler, because it relies on more defaults.
This commit is contained in:
Hardy Ferentschik 2010-11-01 17:50:40 +01:00
parent 7b24b764f0
commit 2a7b091da9
1 changed files with 0 additions and 38 deletions

View File

@ -2,16 +2,6 @@ import org.apache.tools.ant.filters.*
apply plugin: 'java'
// not needed if we rename the directories to match the sourceSet name
sourceSets {
test {
// resources inherently exclude sources
resources {
setSrcDirs( ['src/test/java','src/test/resources'] )
}
}
}
dependencies {
shrinkwrapVersion = '1.0.0-alpha-6'
@ -31,30 +21,6 @@ dependencies {
testRuntime( libraries.validator )
}
procTargetDirName = buildDirName + "/generated-src/jpamodelgen"
procTargetDir = dir( procTargetDirName )
// in theory it metamodel generation and compilation should be possible in a single compilation,
// but this fails on Mac. Hence, to separate compilations. One to generate the meta model classes
// and one to compile everything
task generateMetaModel(type: Compile) {
classpath = compileTestJava.classpath
source = compileTestJava.source
destinationDir = compileTestJava.destinationDir
configure( options ) {
compilerArgs = ["-proc:only", "-s", "$procTargetDir.dir.absolutePath"]
}
}
generateMetaModel.dependsOn procTargetDir
compileTestJava {
configure( options ) {
compilerArgs = [ "-s", "$procTargetDir.dir.absolutePath" ]
}
source += files(procTargetDir.dir)
}
compileTestJava.dependsOn generateMetaModel
bundlesTargetDirName = "$buildDirName/bundles"
bundlesTargetDir = dir( bundlesTargetDirName )
task copyBundleResources (type: Copy) {
@ -74,10 +40,6 @@ copyBundleResources.dependsOn bundlesTargetDir
// make sure that the bundles for the packaged test (PackagingTestCase) are copied as well
processTestResources.dependsOn copyBundleResources
ideaModule {
testSourceDirs.add( file( procTargetDirName ) )
}
ideaModule.dependsOn procTargetDir