Skip to content

Instantly share code, notes, and snippets.

View martin-mfg's full-sized avatar

martin-mfg

  • Germany
  • 05:43 (UTC +02:00)
View GitHub Profile
@martin-mfg
martin-mfg / maven-deployer.groovy
Last active April 25, 2019 12:57 — forked from jakub-bochenski/maven-deployer.groovy
A pom.xml to batch deploy artifacts which are put under local repository folder structure to a repository. Modify the setting in <deploy.basefolder> and <distributionManagement> before use. Run `mvn install` to deploy.This file is created base on StackOverflow answer: http://stackoverflow.com/a/3304212/94148 Referenced by http://aleung.github.co…
def layout = session.lookup('org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout');
def repoFactory = session.lookup('org.apache.maven.artifact.repository.ArtifactRepositoryFactory');
def repository = repoFactory.createDeploymentArtifactRepository(
project.distributionManagement.repository.id,
project.distributionManagement.repository.url,
layout, true );
def snapshotRepository = repoFactory.createDeploymentArtifactRepository(
project.distributionManagement.snapshotRepository.id,