Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog
## Unreleased
### Breaking Changes
- Changes in Maven coordinates of Besu artifacts to avoid possible collisions with other libraries when packaging plugins [#8589](https://github.com/hyperledger/besu/pull/8589)

### Upcoming Breaking Changes
### Additions and Improvements
#### Fusaka Devnet
Expand Down
15 changes: 15 additions & 0 deletions acceptance-tests/dsl/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
apply plugin: 'java-library'

jar {
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
'Specification-Version': project.version,
'Implementation-Title': archiveBaseName,
'Implementation-Version': calculateVersion(),
'Commit-Hash': getGitCommitDetails(40).hash
)
}
}

dependencies {
implementation project(':besu')
implementation project(':config')
Expand Down
2 changes: 1 addition & 1 deletion besu/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
14 changes: 12 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ task checkMavenCoordinateCollisions {
if (coordinate.toString().startsWith("org") && coordinates.containsKey(coordinate)) {
throw new GradleException("Duplicate maven coordinates detected, ${coordinate} is used by " +
"both ${coordinates[coordinate]} and ${it.path}.\n" +
"Please add a `publishing` script block to one or both subprojects.")
"Prefer automatic artifactId creation or if not possible disambiguate manually.")
}
coordinates[coordinate] = it.path
}
Expand Down Expand Up @@ -491,7 +491,7 @@ subprojects {
dependencies { testImplementation sourceSets.testSupport.output }

task testSupportJar(type: Jar) {
archiveBaseName = "${project.name}-support-test"
archiveBaseName = calculateArtifactId(project) + '-support-test'
archiveClassifier = 'test-support'
from sourceSets.testSupport.output
}
Expand Down Expand Up @@ -545,6 +545,7 @@ subprojects {
publications {
mavenJava(MavenPublication) {
groupId "org.hyperledger.besu.internal"
artifactId calculateArtifactId(project)
version "${project.version}"
if (sourceSetIsPopulated("main")) {
from components.java
Expand Down Expand Up @@ -1014,6 +1015,15 @@ def calculateVersion() {
}
}

def calculateArtifactId(configuringProject) {
def currentProject = configuringProject
def projectNames = [currentProject.name]
while((currentProject = currentProject.getParent()) != null) {
projectNames << currentProject.name
}
return projectNames.reverse().join('-')
}

def getGitCommitDetails(length = 8) {
try {
def gitFolder = "$projectDir/.git/"
Expand Down
2 changes: 1 addition & 1 deletion config/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-config'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
2 changes: 1 addition & 1 deletion consensus/clique/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
plugins { id 'java' }

jar {
archiveBaseName = 'besu-clique'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
4 changes: 2 additions & 2 deletions consensus/common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-consensus-common'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down Expand Up @@ -68,7 +68,7 @@ dependencies {

configurations { testArtifacts }
task testJar (type: Jar) {
archiveBaseName = "${project.name}-test"
archiveBaseName = calculateArtifactId(project) + '-test'
from sourceSets.test.output
}

Expand Down
2 changes: 1 addition & 1 deletion consensus/ibft/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-ibft'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
2 changes: 1 addition & 1 deletion consensus/ibftlegacy/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-ibftlegacy'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
2 changes: 1 addition & 1 deletion consensus/merge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-merge'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
2 changes: 1 addition & 1 deletion consensus/qbft-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-qbft-core'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
2 changes: 1 addition & 1 deletion consensus/qbft/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-qbft'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
2 changes: 1 addition & 1 deletion crypto/algorithms/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-crypto'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
2 changes: 1 addition & 1 deletion crypto/services/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-crypto-services'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
3 changes: 1 addition & 2 deletions datatypes/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-datatypes'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down Expand Up @@ -49,7 +49,6 @@ publishing {
publications {
mavenJava(MavenPublication) {
groupId 'org.hyperledger.besu'
artifactId 'besu-datatypes'
pom {
name = 'Besu Datatypes'
description = 'Cross-module datatypes'
Expand Down
2 changes: 1 addition & 1 deletion ethereum/api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-api'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
2 changes: 1 addition & 1 deletion ethereum/blockcreation/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-blockcreation'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
4 changes: 2 additions & 2 deletions ethereum/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-core'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down Expand Up @@ -124,7 +124,7 @@ dependencies {

configurations { testArtifacts }
task testJar(type: Jar) {
archiveBaseName = "${project.name}-test"
archiveBaseName = calculateArtifactId(project) + '-test'
from sourceSets.test.output
}

Expand Down
4 changes: 2 additions & 2 deletions ethereum/eth/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-eth'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand All @@ -30,7 +30,7 @@ jar {

configurations { testArtifacts }
task testJar(type: Jar) {
archiveBaseName = "${project.name}-test"
archiveBaseName = calculateArtifactId(project)+ '-test'
from sourceSets.test.output
}

Expand Down
2 changes: 1 addition & 1 deletion ethereum/ethstats/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-ethereum-ethstats'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
2 changes: 1 addition & 1 deletion ethereum/evmtool/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ apply plugin: 'application'
apply plugin: 'idea'

jar {
archiveBaseName = 'besu-evmtool'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
2 changes: 1 addition & 1 deletion ethereum/mock-p2p/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-mock-p2p'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
2 changes: 1 addition & 1 deletion ethereum/p2p/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-p2p'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
2 changes: 1 addition & 1 deletion ethereum/permissioning/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-permissioning'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
14 changes: 14 additions & 0 deletions ethereum/referencetests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@
* SPDX-License-Identifier: Apache-2.0
*/

apply plugin: 'java-library'

jar {
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
'Specification-Version': project.version,
'Implementation-Title': archiveBaseName,
'Implementation-Version': calculateVersion(),
'Commit-Hash': getGitCommitDetails(40).hash
)
}
}

def blockchainReferenceTests = tasks.register("blockchainReferenceTests") {
final referenceTestsPath = 'src/reference-test/external-resources/BlockchainTests'
Expand Down
2 changes: 1 addition & 1 deletion ethereum/rlp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-ethereum-rlp'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
2 changes: 1 addition & 1 deletion ethereum/stratum/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-ethereum-stratum'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
2 changes: 1 addition & 1 deletion ethereum/trie/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-trie'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
2 changes: 1 addition & 1 deletion ethereum/verkletrie/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-verkletrie'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
2 changes: 1 addition & 1 deletion evm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ apply plugin: 'java-library'
apply plugin: 'idea'

jar {
archiveBaseName = 'besu-evm'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand Down
9 changes: 1 addition & 8 deletions metrics/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apply plugin: 'java-library'

jar {
archiveBaseName = 'besu-metrics-core'
archiveBaseName = calculateArtifactId(project)
manifest {
attributes(
'Specification-Title': archiveBaseName,
Expand All @@ -28,13 +28,6 @@ jar {
}
}

publishing {
publications {
mavenJava(MavenPublication) { artifactId 'metrics-core' }
}
}


dependencies {
implementation project(':plugin-api')
api 'org.slf4j:slf4j-api'
Expand Down
Loading
Loading