-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HHH-18644 - New and improved hibernate-maven-plugin
- Loading branch information
Showing
39 changed files
with
310 additions
and
1,024 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,71 +33,6 @@ java { | |
withSourcesJar() | ||
} | ||
|
||
publishing { | ||
publications { | ||
// main publication | ||
publishedArtifacts { | ||
from components.java | ||
} | ||
|
||
// relocation for the published artifacts based on the old groupId | ||
relocationPom( MavenPublication ) { | ||
pom { | ||
name = project.name + ' - relocation' | ||
groupId = 'org.hibernate' | ||
artifactId = project.name | ||
version = project.version | ||
|
||
description = project.description | ||
url = 'https://hibernate.org/orm' | ||
|
||
organization { | ||
name = 'Hibernate.org' | ||
url = 'https://hibernate.org' | ||
} | ||
|
||
licenses { | ||
license { | ||
name = 'GNU Library General Public License v2.1 or later' | ||
url = 'https://www.opensource.org/licenses/LGPL-2.1' | ||
comments = 'See discussion at https://hibernate.org/community/license/ for more details.' | ||
distribution = 'repo' | ||
} | ||
} | ||
|
||
scm { | ||
url = 'https://github.com/hibernate/hibernate-orm' | ||
connection = 'scm:git:https://github.com/hibernate/hibernate-orm.git' | ||
developerConnection = 'scm:git:[email protected]:hibernate/hibernate-orm.git' | ||
} | ||
|
||
developers { | ||
developer { | ||
id = 'hibernate-team' | ||
name = 'The Hibernate Development Team' | ||
organization = 'Hibernate.org' | ||
organizationUrl = 'https://hibernate.org' | ||
} | ||
} | ||
|
||
issueManagement { | ||
system = 'jira' | ||
url = 'https://hibernate.atlassian.net/browse/HHH' | ||
} | ||
|
||
distributionManagement { | ||
relocation { | ||
groupId = 'org.hibernate.orm' | ||
artifactId = project.name | ||
version = project.version | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
var signingKey = resolveSigningKey() | ||
var signingPassword = findSigningProperty( "signingPassword" ) | ||
|
||
|
@@ -237,7 +172,6 @@ tasks.release.dependsOn tasks.test, tasks.publishToSonatype | |
tasks.preVerifyRelease.dependsOn build | ||
tasks.preVerifyRelease.dependsOn generateMetadataFileForPublishedArtifactsPublication | ||
tasks.preVerifyRelease.dependsOn generatePomFileForPublishedArtifactsPublication | ||
tasks.preVerifyRelease.dependsOn generatePomFileForRelocationPomPublication | ||
|
||
tasks.publishToSonatype.mustRunAfter test | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
apply from: rootProject.file( 'gradle/published-java-module.gradle' ) | ||
|
||
publishing { | ||
publications { | ||
// main publication | ||
publishedArtifacts { | ||
from components.java | ||
} | ||
|
||
// relocation for the published artifacts based on the old groupId | ||
relocationPom( MavenPublication ) { | ||
pom { | ||
name = project.name + ' - relocation' | ||
groupId = 'org.hibernate' | ||
artifactId = project.name | ||
version = project.version | ||
|
||
description = project.description | ||
url = 'https://hibernate.org/orm' | ||
|
||
organization { | ||
name = 'Hibernate.org' | ||
url = 'https://hibernate.org' | ||
} | ||
|
||
licenses { | ||
license { | ||
name = 'GNU Library General Public License v2.1 or later' | ||
url = 'https://www.opensource.org/licenses/LGPL-2.1' | ||
comments = 'See discussion at https://hibernate.org/community/license/ for more details.' | ||
distribution = 'repo' | ||
} | ||
} | ||
|
||
scm { | ||
url = 'https://github.com/hibernate/hibernate-orm' | ||
connection = 'scm:git:https://github.com/hibernate/hibernate-orm.git' | ||
developerConnection = 'scm:git:[email protected]:hibernate/hibernate-orm.git' | ||
} | ||
|
||
developers { | ||
developer { | ||
id = 'hibernate-team' | ||
name = 'The Hibernate Development Team' | ||
organization = 'Hibernate.org' | ||
organizationUrl = 'https://hibernate.org' | ||
} | ||
} | ||
|
||
issueManagement { | ||
system = 'jira' | ||
url = 'https://hibernate.atlassian.net/browse/HHH' | ||
} | ||
|
||
distributionManagement { | ||
relocation { | ||
groupId = 'org.hibernate.orm' | ||
artifactId = project.name | ||
version = project.version | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks.preVerifyRelease.dependsOn generatePomFileForRelocationPomPublication |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...l-build-plugins/src/main/java/org/hibernate/build/maven/embedder/MavenEmbedderConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.hibernate.build.maven.embedder; | ||
|
||
import org.gradle.api.Project; | ||
import org.gradle.api.file.DirectoryProperty; | ||
|
||
import javax.inject.Inject; | ||
|
||
/** | ||
* Gradle DSL extension for configuring the {@linkplain MavenEmbedderPlugin maven-embedder plugin} | ||
* | ||
* @author Steve Ebersole | ||
*/ | ||
public class MavenEmbedderConfig { | ||
private DirectoryProperty localRepositoryDirectory; | ||
|
||
@Inject | ||
public MavenEmbedderConfig(Project project) { | ||
localRepositoryDirectory = project.getObjects().directoryProperty(); | ||
localRepositoryDirectory.convention( project.getLayout().getBuildDirectory().dir( "maven-embedder/maven-local" ) ); | ||
} | ||
|
||
public DirectoryProperty getLocalRepositoryDirectory() { | ||
return localRepositoryDirectory; | ||
} | ||
|
||
public void setLocalRepositoryDirectory(DirectoryProperty localRepositoryDirectory) { | ||
this.localRepositoryDirectory = localRepositoryDirectory; | ||
} | ||
} |
Oops, something went wrong.