Gradle deploy artifacts to a maven repository inside a local directory -


what gradle's equivalent of maven's:

<distributionmanagement>     <repository>         <id>internal.repo</id>         <name>temporary staging repository</name>         <url>file://${project.build.directory}/mvn-repo</url>     </repository> </distributionmanagement>  <build>  <plugins>     <plugin>         <artifactid>maven-deploy-plugin</artifactid>         <version>2.8.1</version>         <configuration>                <altdeploymentrepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altdeploymentrepository>         </configuration>     </plugin>  </plugins> </build> 

i have tried:

apply plugin: 'maven'  uploadarchives {     repositories {         mavendeployer {             repository(url: "file:///tmp/mvn-repo")         }     } } 

but throws:

[ant:null] error reading settings file '/private/var/folders/kh/kh+cubljeeswzotqvrx-bu+++ti/-tmp-/gradle_empty_settings7564764539012703872.xml' - ignoring. error was: /private/var/folders/kh/kh+cubljeeswzotqvrx-bu+++ti/-tmp-/gradle_empty_settings7564764539012703872.xml (no such file or directory) 

the project working on git://github.com/springsource/spring-data-rest.git branch 1.0.0.release, project's build.gradle.

complete gradle output:

gradle uploadarchives groovy configuration has been deprecated , scheduled removed in gradle 2.0. typically, usages of 'groovy' can replaced 'compile'. in cases, may necessary additionally configure 'groovyclasspath' property of groovycompile , groovydoc tasks. :uploadarchives [ant:null] error reading settings file '/private/var/folders/kh/kh+cubljeeswzotqvrx-bu+++ti/-tmp-/gradle_empty_settings396071803108301794.xml' - ignoring. error was: /private/var/folders/kh/kh+cubljeeswzotqvrx-bu+++ti/-tmp-/gradle_empty_settings396071803108301794.xml (no such file or directory) :spring-data-rest-core:compilejava up-to-date :spring-data-rest-core:compilegroovy up-to-date :spring-data-rest-core:processresources up-to-date :spring-data-rest-core:classes up-to-date :spring-data-rest-core:jar up-to-date :spring-data-rest-core:javadoc up-to-date :spring-data-rest-core:javadocjar up-to-date :spring-data-rest-core:sourcesjar up-to-date :spring-data-rest-core:uploadarchives :spring-data-rest-repository:compilejava up-to-date :spring-data-rest-repository:compilegroovy up-to-date :spring-data-rest-repository:processresources up-to-date :spring-data-rest-repository:classes up-to-date :spring-data-rest-repository:jar up-to-date :spring-data-rest-repository:javadoc up-to-date :spring-data-rest-repository:javadocjar up-to-date :spring-data-rest-repository:sourcesjar up-to-date :spring-data-rest-repository:uploadarchives :spring-data-rest-webmvc:compilejava up-to-date :spring-data-rest-webmvc:compilegroovy up-to-date :spring-data-rest-webmvc:processresources up-to-date :spring-data-rest-webmvc:classes up-to-date :spring-data-rest-webmvc:jar up-to-date :spring-data-rest-webmvc:javadoc up-to-date :spring-data-rest-webmvc:javadocjar up-to-date :spring-data-rest-webmvc:sourcesjar up-to-date :spring-data-rest-webmvc:uploadarchives 

i use gradle 1.12.

if trying deploy locally (e.g. ~/.m2) need:

apply plugin: 'maven'  uploadarchives {     repositories {         mavendeployer {             mavenlocal()         }     } } 

i haven't tried using repository in other default believe can either set repository location in ~/.m2/settings.xml:

<settings xmlns="http://maven.apache.org/settings/1.0.0"   xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"   xsi:schemalocation="http://maven.apache.org/settings/1.0.0   http://maven.apache.org/xsd/settings-1.0.0.xsd">   <localrepository>/tmp/mvn_repo</localrepository>   ... </settings> 

or can set url in gradle build file:

maven {      url uri('/tmp/mvn_repo') }  

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -