I’m a newbie to Gradle and use it on a first project. What I don’t get is the difference between the task ‘install’ and the task ‘uploadArchives’ assuming that both are task from the maven plugin… Here is my gradle.build:
apply plugin: 'eclipse'
apply from: 'file:///g:/Development/Netkernel/gradle-commons/netkernel-libs.gradle' // NetKernel libs
apply plugin: 'maven'
apply plugin: 'java'
//Define the project group in which built modules are stored in the repository.
project.group = 'nkse-panel-security'
//Provide this buildscript with repositories and dependencies to obtain the netkernel plugin
buildscript {
repositories {
mavenCentral()
maven { url "file:///G:/Maven/m2/repository/"
}
}
}
// This task puts the resulting jar files into a local maven repository
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file:///G:/Maven/m2/repository/")
}
}
}
//The repository where we'll get the deployed modules from
repositories {
maven {
url "file:///G:/Maven/m2/repository/"
}
}
dependencies {
compile libraries.netkernel_core
compile libraries.netkernel_modules_core
}
The file c:\Users\Stefan.m2\settings.xml has the entry
<localRepository>G:/Maven/m2/repository</localRepository><\code>
<code>gradle install
results in the jar put at the correct location (‘G:\Maven\m2\repository’) and the pom file created.
gradle uploadArchives
results in the jar put in the correct location and unwanted in ‘c:\Users\Stefan.m2\repository’, the pom file created and checksum files (md5, sha1).
But how can I achieve my desired result: Only correct location (‘G:\Maven\m2\repository’) and checksum files?
Thanks in advance, Stefan
------------------------------------------------------------ Gradle 2.3 ------------------------------------------------------------
Build time:
2015-02-16 05:09:33 UTC Build number: none Revision:
586be72bf6e3df1ee7676d1f2a3afd9157341274
Groovy:
2.3.9 Ant:
Apache Ant™ version 1.9.3 compiled on December 23 2013 JVM:
1.8.0_31 (Oracle Corporation 25.31-b07) OS:
Windows 7 6.1 amd64