我有一个java with gradle (5.2)项目,我正试图将它发布到
我的build.gradle
plugins {
id 'maven-publish'
id 'java'
id 'org.springframework.boot' version '2.2.5.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
}
group = 'com.doe&
配置根项目“制备器”时发生了问题。
> Could not resolve all files for configuration ':classpath'.
> Could not find com.github.jengelman.gradle.plugins:shadow:2.0.1.
在下列地点进行搜索:
file:/Users/lion-mane/.m2/repository/com/github/jengelman/gradle/plugins/shadow/2.0.1/shadow-2.0.1.pom
file:/U
我希望能够离线处理我的项目。所以我禁用了离线模式,按下“与gradle文件同步项目”按钮,然后启用离线模式并尝试构建。然而,每次我这样做时,我都会得到错误:
FAILURE: Build failed with an exception.
*What went wrong:
Could not determine the dependencies of task ':app:compileDebugRenderscript'.
> Could not resolve all task dependencies for configuration ':app
请注意:,尽管我的myapp-server是,但这完全是一个Gradle问题;我只提到DropWizard是一个很好的方法。
我有一个多项目的构建,我正在与Gradle一起构建:
myapp/
myapp-client/
myapp-shared/
myapp-server/
build.gradle
settings.gradle
其中settings.gradle看起来像:
include ':myapp-shared'
include ':myapp-client'
include ':myapp-serve
生成失败,类路径错误:
thufir@dur:~/NetBeansProjects/kotlinShadowJar$
thufir@dur:~/NetBeansProjects/kotlinShadowJar$ gradle clean
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'kotlinShadowJar'.
> Could not resolve all files for configurat
所以我在IntelliJ 13.1.2事件日志规则中得到了这个异常:
0: 0
java.lang.ArrayIndexOutOfBoundsException: 0
at com.android.tools.idea.gradle.service.resolve.AndroidDslContributor.processSetter(AndroidDslContributor.java:216)
at com.android.tools.idea.gradle.service.resolve.AndroidDslContributor.process(AndroidDslContributo
我想在我的项目中创建一个新任务,用我的项目的类文件和依赖项的类文件(也称为“shaded jar”或“fat jar”)创建一个jar存档。
Gradle食谱提出的解决方案修改了JavaPlugin的标准jar任务:
jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
但是,我希望保持原始jar的原样,并为着色的jar增加一个任务,即一个行为与jar任务完全相同的任务,但包括根据
from { configurations.compile.collect { it