mein settings.gradle
Wie führe ich Build in einem Verbundprojekt rekursiv aus?
rootProject.name = 'rpf'
includeBuild('is')
includeBuild('sec') {
dependencySubstitution {
substitute module("com.xenoterracide.rpf:is:0.1.0-SNAPSHOT") with project(":is")
}
}
build.gradle
plugins {
id 'com.brightsparklabs.gradle.multi-git' version '1.3.0'
}
group 'com.xenoterracide'
version '0.1.0-SNAPSHOT'
multiGitPluginConfig {
repositoriesDir = new File('.')
repositories = [
'entity-api': '[email protected]:xenworks/entity-api.git',
'entity-jpa': '[email protected]:xenworks/entity-jpa.git',
'util': '[email protected]:xenworks/util.git',
]
}
task build {
gradle.includedBuild('sec').task(':build') // sec is not currently a separate repo
}
hier ist der Ausgang
[email protected] MINGW64 ~/IdeaProjects/rpf (master)
$ ./gradlew build --info
Initialized native services in: C:\Users\xeno\.gradle\native
The client will now receive all logging from the daemon (pid: 14968). The daemon log file: C:\Users\xeno\.gradle\daemon\4.4\daemon-14968.out.log
Starting 297th build in daemon [uptime: 3 hrs 34 mins 24.533 secs, performance: 100%, no major garbage collections]
Using 4 worker leases.
Creating new cache for fileHashes, path C:\Users\xeno\IdeaProjects\rpf\.gradle\4.4\fileHashes\fileHashes.bin, access [email protected]
Starting Build
[composite-build] Configuring build: C:\Users\xeno\IdeaProjects\rpf\is
> Configure project :is
Evaluating project ':is' using build file 'C:\Users\xeno\IdeaProjects\rpf\is\build.gradle'.
Creating new cache for metadata-1.1/results, path C:\Users\xeno\.gradle\caches\transforms-1\metadata-1.1\results.bin, access [email protected]
Creating new cache for metadata-2.36/module-metadata, path C:\Users\xeno\.gradle\caches\modules-2\metadata-2.36\module-metadata.bin, access [email protected]
Creating new cache for metadata-2.36/module-artifacts, path C:\Users\xeno\.gradle\caches\modules-2\metadata-2.36\module-artifacts.bin, access [email protected]
Creating new cache for metadata-2.36/module-versions, path C:\Users\xeno\.gradle\caches\modules-2\metadata-2.36\module-versions.bin, access org.gradle.cache.inter[email protected]
Creating new cache for metadata-2.36/module-artifact, path C:\Users\xeno\.gradle\caches\modules-2\metadata-2.36\module-artifact.bin, access [email protected]
Applying dependency management to configuration 'api' in project 'is'
Applying dependency management to configuration 'apiElements' in project 'is'
Applying dependency management to configuration 'archives' in project 'is'
Applying dependency management to configuration 'compile' in project 'is'
Applying dependency management to configuration 'compileClasspath' in project 'is'
Applying dependency management to configuration 'compileOnly' in project 'is'
Applying dependency management to configuration 'default' in project 'is'
Applying dependency management to configuration 'implementation' in project 'is'
Applying dependency management to configuration 'runtime' in project 'is'
Applying dependency management to configuration 'runtimeClasspath' in project 'is'
Applying dependency management to configuration 'runtimeElements' in project 'is'
Applying dependency management to configuration 'runtimeOnly' in project 'is'
Applying dependency management to configuration 'spotbugs' in project 'is'
Applying dependency management to configuration 'spotbugsPlugins' in project 'is'
Applying dependency management to configuration 'testCompile' in project 'is'
Applying dependency management to configuration 'testCompileClasspath' in project 'is'
Applying dependency management to configuration 'testCompileOnly' in project 'is'
Applying dependency management to configuration 'testImplementation' in project 'is'
Applying dependency management to configuration 'testRuntime' in project 'is'
Applying dependency management to configuration 'testRuntimeClasspath' in project 'is'
Applying dependency management to configuration 'testRuntimeOnly' in project 'is'
Applying dependency management to configuration 'checkstyle' in project 'is'
Registering project :is in composite build. Will substitute for module 'com.xenoterracide.rpf:is'.
Settings evaluated using settings file 'C:\Users\xeno\IdeaProjects\rpf\settings.gradle'.
Projects loaded. Root project using build file 'C:\Users\xeno\IdeaProjects\rpf\build.gradle'.
Included projects: [root project 'rpf']
> Configure project :
Evaluating root project 'rpf' using build file 'C:\Users\xeno\IdeaProjects\rpf\build.gradle'.
Found no composite build substitute for module 'com.brightsparklabs.gradle.multi-git:com.brightsparklabs.gradle.multi-git.gradle.plugin'.
Found no composite build substitute for module 'com.brightsparklabs.gradle.multi-git:com.brightsparklabs.gradle.multi-git.gradle.plugin'.
Found no composite build substitute for module 'gradle.plugin.com.brightsparklabs:gradle-multi-git'.
All projects evaluated.
Selected primary task 'build' from project :
Tasks to be executed: [task ':build']
Creating new cache for resourceHashesCache, path C:\Users\xeno\IdeaProjects\rpf\.gradle\4.4\fileHashes\resourceHashesCache.bin, access [email protected]
Invalidating in-memory cache of C:\Users\xeno\IdeaProjects\rpf\.gradle\4.4\fileHashes\resourceHashesCache.bin
Creating new cache for taskHistory, path C:\Users\xeno\IdeaProjects\rpf\.gradle\4.4\taskHistory\taskHistory.bin, access [email protected]
Creating new cache for outputFiles, path C:\Users\xeno\IdeaProjects\rpf\.gradle\buildOutputCleanup\outputFiles.bin, access [email protected]
:build (Thread[Daemon worker Thread 25,5,main]) started.
> Task :build UP-TO-DATE
Skipping task ':build' as it has no actions.
:build (Thread[Daemon worker Thread 25,5,main]) completed. Took 0.0 secs.
BUILD SUCCESSFUL in 0s
Ich glaube, ich es teilweise arbeiten bekommen haben, aber es baut noch nicht
secIch habe die BU geändert ild Aufgabe wie diese
task build {
dependsOn gradle.includedBuild('is').task(':build')
dependsOn gradle.includedBuild('sec').task(':build')
}
zu schauen und hier ist der Ausgang, das Problem scheint offensichtlich, aus irgendeinem Grunde denkt, dass es es :sec:is
sein sollte und nicht nur :is
, aber ich habe nicht herausgefunden, wie man die
[email protected] MINGW64 ~/IdeaProjects/rpf (master)
$ ./gradlew build --info
Initialized native services in: C:\Users\xeno\.gradle\native
The client will now receive all logging from the daemon (pid: 14968). The daemon log file: C:\Users\xeno\.gradle\daemon\4.4\daemon-14968.out.log
Starting 364th build in daemon [uptime: 4 hrs 4 mins 32.226 secs, performance: 99%, no major garbage collections]
Using 4 worker leases.
Creating new cache for fileHashes, path C:\Users\xeno\IdeaProjects\rpf\.gradle\4.4\fileHashes\fileHashes.bin, access [email protected]
Starting Build
[composite-build] Configuring build: C:\Users\xeno\IdeaProjects\rpf\is
> Configure project :is
Evaluating project ':is' using build file 'C:\Users\xeno\IdeaProjects\rpf\is\build.gradle'.
Creating new cache for metadata-1.1/results, path C:\Users\xeno\.gradle\caches\transforms-1\metadata-1.1\results.bin, access [email protected]
Creating new cache for metadata-2.36/module-metadata, path C:\Users\xeno\.gradle\caches\modules-2\metadata-2.36\module-metadata.bin, access [email protected]
Creating new cache for metadata-2.36/module-artifacts, path C:\Users\xeno\.gradle\caches\modules-2\metadata-2.36\module-artifacts.bin, access [email protected]
Creating new cache for metadata-2.36/module-versions, path C:\Users\xeno\.gradle\caches\modules-2\metadata-2.36\module-versions.bin, access [email protected]
Creating new cache for metadata-2.36/module-artifact, path C:\Users\xeno\.gradle\caches\modules-2\metadata-2.36\module-artifact.bin, access [email protected]
Applying dependency management to configuration 'api' in project 'is'
Applying dependency management to configuration 'apiElements' in project 'is'
Applying dependency management to configuration 'archives' in project 'is'
Applying dependency management to configuration 'compile' in project 'is'
Applying dependency management to configuration 'compileClasspath' in project 'is'
Applying dependency management to configuration 'compileOnly' in project 'is'
Applying dependency management to configuration 'default' in project 'is'
Applying dependency management to configuration 'implementation' in project 'is'
Applying dependency management to configuration 'runtime' in project 'is'
Applying dependency management to configuration 'runtimeClasspath' in project 'is'
Applying dependency management to configuration 'runtimeElements' in project 'is'
Applying dependency management to configuration 'runtimeOnly' in project 'is'
Applying dependency management to configuration 'spotbugs' in project 'is'
Applying dependency management to configuration 'spotbugsPlugins' in project 'is'
Applying dependency management to configuration 'testCompile' in project 'is'
Applying dependency management to configuration 'testCompileClasspath' in project 'is'
Applying dependency management to configuration 'testCompileOnly' in project 'is'
Applying dependency management to configuration 'testImplementation' in project 'is'
Applying dependency management to configuration 'testRuntime' in project 'is'
Applying dependency management to configuration 'testRuntimeClasspath' in project 'is'
Applying dependency management to configuration 'testRuntimeOnly' in project 'is'
Applying dependency management to configuration 'checkstyle' in project 'is'
Registering project :is in composite build. Will substitute for module 'com.xenoterracide.rpf:is'.
Settings evaluated using settings file 'C:\Users\xeno\IdeaProjects\rpf\settings.gradle'.
Projects loaded. Root project using build file 'C:\Users\xeno\IdeaProjects\rpf\build.gradle'.
Included projects: [root project 'rpf']
> Configure project :
Evaluating root project 'rpf' using build file 'C:\Users\xeno\IdeaProjects\rpf\build.gradle'.
Found no composite build substitute for module 'com.brightsparklabs.gradle.multi-git:com.brightsparklabs.gradle.multi-git.gradle.plugin'.
Found no composite build substitute for module 'com.brightsparklabs.gradle.multi-git:com.brightsparklabs.gradle.multi-git.gradle.plugin'.
Found no composite build substitute for module 'gradle.plugin.com.brightsparklabs:gradle-multi-git'.
All projects evaluated.
Selected primary task 'build' from project :
> Configure project :sec
Evaluating project ':sec' using build file 'C:\Users\xeno\IdeaProjects\rpf\sec\build.gradle'.
Found no composite build substitute for module 'com.github.spotbugs:com.github.spotbugs.gradle.plugin'.
Found no composite build substitute for module 'io.spring.gradle:dependency-management-plugin'.
Found no composite build substitute for module 'com.github.spotbugs:com.github.spotbugs.gradle.plugin'.
Found no composite build substitute for module 'gradle.plugin.com.github.spotbugs:gradlePlugin'.
Found no composite build substitute for module 'com.github.spotbugs:spotbugs'.
Found no composite build substitute for module 'org.ow2.asm:asm'.
Found no composite build substitute for module 'org.ow2.asm:asm-analysis'.
Found no composite build substitute for module 'org.ow2.asm:asm-commons'.
Found no composite build substitute for module 'org.ow2.asm:asm-tree'.
Found no composite build substitute for module 'org.ow2.asm:asm-util'.
Found no composite build substitute for module 'org.ow2.asm:asm-xml'.
Found no composite build substitute for module 'org.apache.bcel:bcel'.
Found no composite build substitute for module 'net.jcip:jcip-annotations'.
Found no composite build substitute for module 'dom4j:dom4j'.
Found no composite build substitute for module 'jaxen:jaxen'.
Found no composite build substitute for module 'commons-lang:commons-lang'.
Found no composite build substitute for module 'com.google.code.findbugs:jFormatString'.
Found no composite build substitute for module 'com.github.spotbugs:spotbugs-annotations'.
Found no composite build substitute for module 'xml-apis:xml-apis'.
Found no composite build substitute for module 'com.google.code.findbugs:jsr305'.
Applying dependency management to configuration 'api' in project 'sec'
Applying dependency management to configuration 'apiElements' in project 'sec'
Applying dependency management to configuration 'archives' in project 'sec'
Applying dependency management to configuration 'compile' in project 'sec'
Applying dependency management to configuration 'compileClasspath' in project 'sec'
Applying dependency management to configuration 'compileOnly' in project 'sec'
Applying dependency management to configuration 'default' in project 'sec'
Applying dependency management to configuration 'implementation' in project 'sec'
Applying dependency management to configuration 'runtime' in project 'sec'
Applying dependency management to configuration 'runtimeClasspath' in project 'sec'
Applying dependency management to configuration 'runtimeElements' in project 'sec'
Applying dependency management to configuration 'runtimeOnly' in project 'sec'
Applying dependency management to configuration 'spotbugs' in project 'sec'
Applying dependency management to configuration 'spotbugsPlugins' in project 'sec'
Applying dependency management to configuration 'testCompile' in project 'sec'
Applying dependency management to configuration 'testCompileClasspath' in project 'sec'
Applying dependency management to configuration 'testCompileOnly' in project 'sec'
Applying dependency management to configuration 'testImplementation' in project 'sec'
Applying dependency management to configuration 'testRuntime' in project 'sec'
Applying dependency management to configuration 'testRuntimeClasspath' in project 'sec'
Applying dependency management to configuration 'testRuntimeOnly' in project 'sec'
Applying dependency management to configuration 'checkstyle' in project 'sec'
Selected primary task ':build' from project :
Creating new cache for annotation-processors, path C:\Users\xeno\IdeaProjects\rpf\sec\.gradle\4.4\fileContent\annotation-processors.bin, access [email protected]
Resolving global dependency management for project 'sec'
Found no composite build substitute for module 'com.xenoterracide:bom'.
Found no composite build substitute for module 'io.spring.platform:platform-bom'.
Found no composite build substitute for module 'org.springframework.boot:spring-boot-starter-parent'.
Found no composite build substitute for module 'org.springframework.boot:spring-boot-dependencies'.
Found no composite build substitute for module 'com.fasterxml.jackson:jackson-bom'.
Found no composite build substitute for module 'com.fasterxml.jackson:jackson-parent'.
Found no composite build substitute for module 'com.fasterxml:oss-parent'.
Found no composite build substitute for module 'org.apache.logging.log4j:log4j-bom'.
Found no composite build substitute for module 'org.apache:apache'.
Found no composite build substitute for module 'org.springframework:spring-framework-bom'.
Found no composite build substitute for module 'org.springframework.data:spring-data-releasetrain'.
Found no composite build substitute for module 'org.springframework.data.build:spring-data-build'.
Found no composite build substitute for module 'org.springframework.integration:spring-integration-bom'.
Found no composite build substitute for module 'org.springframework.security:spring-security-bom'.
Found no composite build substitute for module 'org.springframework:spring-web'.
Found no composite build substitute for module 'org.springframework.boot:spring-boot-starter-data-rest'.
Found no composite build substitute for module 'org.eclipse.persistence:javax.persistence'.
Found no composite build substitute for module 'javax.validation:validation-api'.
Found no composite build substitute for module 'org.hibernate:hibernate-validator'.
Found no composite build substitute for module 'org.springframework:spring-core'.
Found no composite build substitute for module 'org.springframework:spring-context'.
Found no composite build substitute for module 'org.springframework.boot:spring-boot-starter-security'.
Found no composite build substitute for module 'org.springframework.data:spring-data-commons'.
Found no composite build substitute for module 'org.springframework.data:spring-data-jpa'.
Found no composite build substitute for module 'org.springframework.security:spring-security-acl'.
Found no composite build substitute for module 'org.springframework:spring-tx'.
Found no composite build substitute for module 'com.xenoterracide:entity-api'.
Found no composite build substitute for module 'com.xenoterracide:entity-jpa'.
Found project 'project :is' as substitute for module 'com.xenoterracide.rpf:is'.
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':sec:compileJava'.
> Could not resolve all dependencies for configuration ':sec:detachedConfiguration15'.
> project :sec:is was not found.
hier ist, wie ich festgelegt, dass Projekte Abhängigkeit der
dependencies {
compileOnly 'org.springframework:spring-web'
compileOnly 'org.springframework.boot:spring-boot-starter-data-rest'
compileOnly 'org.eclipse.persistence:javax.persistence'
implementation 'javax.validation:validation-api'
implementation 'org.hibernate:hibernate-validator'
implementation 'org.springframework:spring-core'
implementation 'org.springframework:spring-context'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.data:spring-data-commons'
implementation 'org.springframework.data:spring-data-jpa'
implementation 'org.springframework.security:spring-security-acl'
implementation 'org.springframework:spring-tx'
implementation 'com.xenoterracide:entity-api:0.1.0-SNAPSHOT'
implementation 'com.xenoterracide:entity-jpa:0.1.0-SNAPSHOT'
implementation 'com.xenoterracide.rpf:is:0.1.0-SNAPSHOT'
testRuntimeOnly 'com.h2database:h2'
testRuntimeOnly 'org.apache.tomcat.embed:tomcat-embed-el'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa'
testImplementation 'org.apache.commons:commons-lang3'
testImplementation 'nl.jqno.equalsverifier:equalsverifier'
}
wie bekomme ich gradle die Build-Task successf laufen ully für seine zusammengesetzten Builds?
@tkruse da es nicht so einfach ist, dieses "minimal" zu haben, weil es sehr komplex ist ... hier ist der Quellcode für ein minimales https://bitbucket.org/account/user/xenworks/projects/GCPD – xenoterracide
Ich frage nur, dass Sie die 3 minimalen build.gradle-Dateien und settings.gradle-Dateien von bitbucket nach hier kopieren. – tkruse