0
私はモジュールとサブモジュールからなるgradleプロジェクトを持っています。なぜgradleは空のアーカイブを作成しますか?
| build.gradle (1)
|- common
| build.gradle (2)
|- webutils
| build.gradle (3)
|- spring
| build.gradle
|- security
| build.gradle
であるbuild.gradle
(1)
dependencies {
compile project(':common'), project(':common:webutils')
compile project(':spring'), project(':spring:security')
}
これはbuild.gradle
(2)
dependencies {
compile project(':common:webutils')
}
これはbuild.gradle
(3)
dependencies {
compile("javax.servlet:javax.servlet-api:${javaxServletApiVersion}")
testCompile("javax.servlet:javax.servlet-api:${javaxServletApiVersion}")
testCompile("org.springframework:spring-test:${springVersion}")
testCompile("junit:junit:${junitVersion}")
}
私はしようとビルドするそれは次のjar procdues ./gradlew clean build
と瓶:
- /build/libs/libs-0.0.1-SNAPSHOT.jarを
- 共通/構築/ libsに/共通-0.0.1-SNAPSHOT.jarに
- 共通/ webutils /構築/ LIBS/webutils-0.0.1-SNAPSHOT.jarに
Iは
- (3)(2) に含めることを期待
- (2)、(3)(目線(2)
" zip.vim version v27 " Browsing zipfile common-0.0.1-SNAPSHOT.jar " Select a file with cursor and press ENTER META-INF/ META-INF/MANIFEST.MF
目線(1)
" zip.vim version v27 " Browsing zipfile libs-0.0.1-SNAPSHOT.jar " Select a file with cursor and press ENTER META-INF/ META-INF/MANIFEST.MF ~
目線(1)
3を含むされるように)
" zip.vim version v27
" Browsing zipfile webutils-0.0.1-SNAPSHOT.jar
" Select a file with cursor and press ENTER
META-INF/
META-INF/MANIFEST.MF
com/
com/domain/
com/domain/api/
com/domain/api/common/
com/domain/api/common/webutils/
com/domain/api/common/webutils/URLUtils.class
com/domain/api/common/webutils/RandomUtils.class
~
- なぜ私の瓶(1)と(2)は空ですか?
- (3)の
compile
とtestCompile
の依存関係はどこにありますか? documentationcompile
によると:時間依存性にtestCompile
をコンパイルします:テスト
ありがとう@ngreen。 https://plugins.gradle.org/plugin/com.github.johnrengelman.shadowで提供されている設定でシャドープラグインを追加しようとしましたが、まだ何も追加されていません。また、 'compile project( ':common:webutils')'を使うのは、実際には "Compile time dependencies"を意味すると思いました。 – BigDong
これは、空のjarファイルの 'MANIFEST.MF'の内容です(行は1つしかありません)。' Manifest-Version:1.0' – BigDong