我正在尝试测试./gradlew installDist任务。
C:\Users\Sandeep Prajapati\Downloads\Ex_Files_Gradle_Java\Exercise Files\chapter_1\01_01\build\install\01_01\bin\01_01.bat1_01_OPTSCLASSPATH* 系统找不到指定的路径
项目结构x1c 0d1x
build.gradle文件:
plugins {
id 'java'
id 'application'
}
mainClassName = 'com.linkedinlearning.calculator.Main'
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
version = '1.0.0'
compileJava{
options.compilerArgs << '-Werror'
}
jar {
archiveBaseName = 'calculator'
}
application {
mainClass = 'com.linkedinlearning.calculator.Main'
}
enter code here
我运行的命令是/install/01_01/bin ~ ./01_01 add 1 2
1条答案
按热度按时间woobm2wo1#
jar任务archiveBaseName与rootProject名称不匹配,通过rootProject.name在settings.gradle中添加www.example.com = 'calculator'解决了该问题