2
我試過編寫一個gradle插件,並且我想將其部署到localMaven。 我寫這樣的Gradle告訴我'必須指定部署的存儲庫'
group='cn.sola.gradle'
version='1.0-SNAPSHOT'
uploadArchives {
repositories {
mavenDeployer {
mavenLocal()
}
}
}
代碼然後我運行此命令的gradle -q上傳 但gradle這個打印這樣的:
* What went wrong:
Execution failed for task ':uploadArchives'.
> Could not publish configuration 'archives'
> Must specify a repository for deployment
enter code here
但我的文件已經存在。 目錄下的文件是這樣的。
ls ~/.m2/repository/cn/sola/gradle/HelloGradlePlugin/1.0-SNAPSHOT/
HelloGradlePlugin-1.0-SNAPSHOT.jar ivy-1.0-SNAPSHOT.xml
HelloGradlePlugin-1.0-SNAPSHOT.jar.sha1 ivy-1.0-SNAPSHOT.xml.sha1
這個例外是什麼意思?是文件好嗎?
----添加信息----
:uploadArchives (Thread[main,5,main]) started.
:uploadArchives
Executing task ':uploadArchives' (up-to-date check took 0.001 secs) due to:
Task has not declared any outputs.
Publishing configuration: configuration ':archives'
Publishing to Maven repository 'MavenLocal'
Published HelloGradlePlugin.jar (cn.sola.gradle:HelloGradlePlugin:1.0-SNAPSHOT) to file:/Users/sola1tmy/.m2/repository/cn/sola/gradle/HelloGradlePlugin/1.0-SNAPSHOT/HelloGradlePlugin-1.0-SNAPSHOT.jar
Published ivy.xml (cn.sola.gradle:HelloGradlePlugin:1.0-SNAPSHOT) to file:/Users/sola1tmy/.m2/repository/cn/sola/gradle/HelloGradlePlugin/1.0-SNAPSHOT/ivy-1.0-SNAPSHOT.xml
Publishing to org.gradle.api[email protected]b46e103
:uploadArchives FAILED
:uploadArchives (Thread[main,5,main]) completed. Took 0.516 secs.