Skip to content

Instantly share code, notes, and snippets.

View jitpack-io's full-sized avatar

JitPack.io jitpack-io

View GitHub Profile
plugins {
id 'pl.allegro.tech.build.axion-release' version '1.2.3'
id 'java'
id 'maven'
}
scmVersion {
tag {
prefix = ''
serialize = {config, version -> "$version-RELEASE"}
@jitpack-io
jitpack-io / gist:87cc559e3a71459758eb
Last active September 16, 2015 08:09 — forked from reiz/gist:6203767
Creating a MavenProject from an ArtifactInfo inside a maven plugin.
protected MavenProject buildProjectModel(ArtifactInfo artifactInfo) throws Exception {
try {
ProjectBuildingRequest configuration = new DefaultProjectBuildingRequest();
configuration.setLocalRepository( localRepository );
configuration.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL );
configuration.setProcessPlugins( false );
configuration.setRepositoryMerging( ProjectBuildingRequest.RepositoryMerging.REQUEST_DOMINANT );
Properties properties = new Properties( );
for ( String key : session.getSystemProperties( ).keySet() ){
properties.put( key, session.getSystemProperties().get(key) );