- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
什么是build/install/gradleHelloWorld-shadow
?该目录中应该包含什么内容,不应该包含什么内容?
最简单的“hello world”无法构建:
thufir@dur:~/NetBeansProjects/gradleHelloWorld$
thufir@dur:~/NetBeansProjects/gradleHelloWorld$ gradle clean runShadow
> Task :shadowJar
A problem was found with the configuration of task ':shadowJar'. Registering invalid inputs and outputs via TaskInputs and TaskOutputs methods has been deprecated and is scheduled to be removed in Gradle 5.0.
- No value has been specified for property 'mainClassName'.
The SimpleWorkResult type has been deprecated and is scheduled to be removed in Gradle 5.0. Please use WorkResults.didWork() instead.
> Task :startShadowScripts
Using TaskInputs.file() with something that doesn't resolve to a File object has been deprecated and is scheduled to be removed in Gradle 5.0. Use TaskInputs.files() instead.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':installShadowDist'.
> The specified installation directory '/home/thufir/NetBeansProjects/gradleHelloWorld/build/install/gradleHelloWorld-shadow' is neither empty nor does it contain an installation for 'gradleHelloWorld'.
If you really want to install to this directory, delete it and run the install task again.
Alternatively, choose a different installation directory.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
5 actionable tasks: 5 executed
Publishing build scan...
https://gradle.com/s/t7jbmhjz23giw
thufir@dur:~/NetBeansProjects/gradleHelloWorld$
构建文件:
plugins {
id 'com.gradle.build-scan' version '1.8'
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '2.0.1'
}
buildScan {
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
licenseAgree = 'yes'
publishAlways()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
mainClassName = 'net.bounceme.dur.gradle.hello.App'
shadowJar {
baseName = 'greeter'
classifier = null
version = null
}
repositories {
jcenter()
}
configurations {
provided
}
dependencies {
}
中止后的项目runShadow
:
thufir@dur:~/NetBeansProjects/gradleHelloWorld$
thufir@dur:~/NetBeansProjects/gradleHelloWorld$ tree
.
├── build
│ ├── classes
│ │ └── java
│ │ └── main
│ │ └── net
│ │ └── bounceme
│ │ └── dur
│ │ └── gradle
│ │ └── hello
│ │ └── App.class
│ ├── install
│ │ └── gradleHelloWorld-shadow
│ ├── libs
│ │ └── greeter.jar
│ ├── scriptsShadow
│ │ ├── gradleHelloWorld
│ │ └── gradleHelloWorld.bat
│ └── tmp
│ ├── compileJava
│ └── shadowJar
│ └── MANIFEST.MF
├── build.gradle
├── gradle
│ └── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── src
├── main
│ └── java
│ ├── dur
│ └── net
│ └── bounceme
│ └── dur
│ └── gradle
│ └── hello
│ └── App.java
└── test
└── java
29 directories, 12 files
thufir@dur:~/NetBeansProjects/gradleHelloWorld$
有问题的 /home/thufir/NetBeansProjects/gradleHelloWorld/build/install/gradleHelloWorld-shadow
目录已被 clean 删除,确定 gradle 正在构建此目录。
刚刚升级的gradle:
thufir@dur:~$
thufir@dur:~$ sdk ls gradle
==== INTERNET NOT REACHABLE! ===================================================
Some functionality is disabled or only partially available.
If this persists, please enable the offline mode:
$ sdk offline
================================================================================
--------------------------------------------------------------------------------
Offline: only showing installed gradle versions
--------------------------------------------------------------------------------
> 4.3.1
* 4.2.1
--------------------------------------------------------------------------------
* - installed
> - currently in use
--------------------------------------------------------------------------------
thufir@dur:~$
(无线网络可能有点不稳定。)
最佳答案
你的问题我不清楚,据我所知,错误消息很清楚出了什么问题。
不确定您发布的解决方法是什么,我在评论中说要运行干净,因为大概这就是插件的要求,如果有兴趣,只需检查插件的源代码即可。
无论如何。
The Shadow plugin will also configure distribution tasks when in the presence of the application plugin. The plugin will create shadowDistZip and shadowDistTar which creates Zip and Tar distributions respectively. Each distribution will contain the shadowed JAR file along with the necessary start scripts to launch the application.
此外,该插件将创建 installShadowDist 和 startShadowScripts 任务,这些任务会暂存发行版构建/安装/-shadow/所需的文件。
另一件事是 mainClassName
Just like the normal jar task, when the application plugin is applied, the shadowJar manifest will be configured to contain the Main-Class attribute with the value specified in the project’s mainClassName attribute.
runShadow
是一个 javaExec 任务,可能需要配置?
runShadow {
// classpath = sourceSets.main.runtimeClasspath
main = 'net.bounceme.dur.gradle.hello.App'
// arguments to pass to the application
// args 'appArg1'
}
When applied along with the application plugin, the runShadow task will be created for starting the application from the shadowed JAR. The runShadow task is a JavaExec task that is configured to execute java -jar myproject-all.jar. It can be configured the same as any other JavaExec task.
关于java - build/install/<project>-shadow 目录——它是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47261691/
FogBugz 有没有办法创建一个过滤器,它是: [All] [open] [cases] assigned to [Developer A] with the exception of 1 or m
我是 java hibernate 的新手,我无法理解 Projections.property 和 Projections.groupProperty 之间的区别,两者都给出相同的结果。请解释其中的
让我们再试一次。我发布这个是为了回答 2 个问题 MS Project 2007 是否需要 SharePoint(我希望没有)? 做 你喜欢 MS Project 开发团队 - 它是有用的还是 疼痛?
我们的项目结构如下: sharedlib (lib-project, containing classes, that are useful in many apps) -> main-project
我正在尝试获取有关如何将 MS Project 2010 连接到 MS Project Server 2010 的教程或分步说明。 我已经在我的服务器上安装了 Server 2008 R2(64 位)
Projections.distinct(Projections.count("objectId")) 和 Projections.countDistinct("objectId") 谁能告诉我它们之
可以在项目 “project-a” 中创建一个主题“my-topic-project-a”,这样它就可以公开可见(已完成通过将角色“pub/sub subscriber” 设置为“allUsers”)
我创建了一个简单的 Kafka 消费者,它返回 Flux对象(收到的消息),我正在尝试使用 StepVerifier 对其进行测试. 在我的测试中,我做了这样的事情: Flux flux = cons
我有一个项目,最初是在 Eclipse 中,然后我设法将它转换为 gradle,并且在 Android Studio 中一切正常。 但后来我没有在这个项目上工作一段时间,几个月后当我回到项目时,我很惊
我正在研究 CQRS/ES 架构。我们将多个异步投影并行运行到读取存储中,因为某些投影可能比其他投影慢得多,并且我们希望与写入端保持更多同步以实现更快的投影。 我试图了解有关如何生成读取模型以及这可能
第一次尝试使用 Java 持久性注释创建多对多关系。 场景:Java 类Project 包含子项目,它只是Projects 的List。没有反向(没有 super 项目)成员。所以我认为多对多关系对于
我有现有的 C 代码和现有的 Makefile,我想将其包装到 Eclipse C 项目中(使用 Eclipse 3.4 Ganymede)。代码组织如下: 主目录:/Project/Software
我有一个 Eclipse 项目,不久前我设法在 Android Studio 中工作。它使用 TouchDB 库/项目,我现在想升级到他们最新的产品 couchbase-lite-android,看起
我将项目定义为包含主干、分支、标签子目录的 SVN 目录。 在确定何时将项目拆分为两个或将多个项目合并为一个时,您使用什么标准? - 每个“项目”一个应用程序,具有用于公共(public)源和资源的共
尝试在 Visual Studio 2008 中构建解决方案时遇到此错误。这是什么意思? 最佳答案 这可能意味着文件 bin\project.dll被另一个进程(可能是另一个 Visual Studi
此宏将隐藏/关闭 VBE 主窗口: Sub VBEMainWindowHide() 'close VBE window: Application.VBE.Window.Visible
我正在寻求开发户外应用程序,但不确定 tango 平板电脑是否可以在户外使用。那里的其他深度设备往往在室外效果不佳,因为它们依赖于从设备转换的红外光,然后在它从场景中的物体反射回来后进行观察。我一直在
在标准 .csproj您可以进入属性并设置默认命名空间。如何在 .xproj 中实现这一点项目使用 project.json ? 最佳答案 使用 ASP.NET Core 1.0.1,您可以在 pro
当 Redmine 上注册的项目超过 5 个时,主页“最新项目”框中列出的项目按创建日期降序排序(最近创建的优先),将旧项目(可能更新频率更高)排除在列表之外. 有没有办法按事件从最高到最低列出前 5
我开始学习android开发,但我不知道如何将库添加到项目中。我使用安卓工作室。我创建了新项目,但项目结构中没有项目设置。 最佳答案 在“项目”窗口中右键单击您的包名称,然后选择“打开模块设置”。这应
我是一名优秀的程序员,十分优秀!