Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/1.4.0 #172

Merged
merged 7 commits into from
May 17, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
env:
# set environment variable for release
LAS2PEER_RELEASE: "yes"
ARCHIVA_USERNAME: ${{ secrets.ARCHIVA_USERNAME }}
ARCHIVA_PASSWORD: ${{ secrets.ARCHIVA_PASSWORD }}
USERNAME: ${{ secrets.USERNAME }}
TOKEN: ${{ secrets.TOKEN }}
run: ./gradlew publish
- name: Upload artifacts on GitHub (attached to this workflow)
uses: actions/upload-artifact@v2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish artifacts as snapshot to archiva
name: Publish artifacts as snapshot to github packages

# Run workflow on publish to develop branch automatically.
# Also allow to run the workflow manually on every other branch.
Expand Down Expand Up @@ -27,8 +27,8 @@ jobs:
run: chmod +x gradlew
- name: Build with Gradle and publish as snapshot to archiva
env:
ARCHIVA_USERNAME: ${{ secrets.ARCHIVA_USERNAME }}
ARCHIVA_PASSWORD: ${{ secrets.ARCHIVA_PASSWORD }}
USERNAME: ${{ secrets.USERNAME }}
Token: ${{ secrets.TOKEN }}
run: ./gradlew publish
- name: Upload artifacts on GitHub (attached to this workflow)
uses: actions/upload-artifact@v2
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,11 @@ JavaDocs of the latest release can be found online:

Every commit to the develop branch is built by GitHub actions and will be published as a snapshot to our Archiva.
Releases are drafted from the master branch.

## Importing
From Version 1.4.0 on, las2peer-bundle is available on Maven Central. To import las2peer into your project, add the following dependency to your build file:

```groovy
implementation "io.github.rwth-acis.org.las2peer:las2peer-bundle:1.4.0"
```
As a repository, only Maven Central is required.
70 changes: 44 additions & 26 deletions bundle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def las2peerBuildNumber = "${project.property('las2peer.build.number')}"
def las2peerRelease = System.env.LAS2PEER_RELEASE != null
def las2peerVersion = las2peerRelease ? "$las2peerRevision.$las2peerBuildNumber" : "$las2peerRevision-SNAPSHOT"

group = 'i5'
group = 'io.github.rwth-acis.org.las2peer'
archivesBaseName = 'las2peer-bundle'
version = las2peerVersion
mainClassName = "i5.las2peer.tools.L2pNodeLauncher"
Expand All @@ -25,16 +25,6 @@ targetCompatibility = "${project.property('java.version')}"
repositories {
// Use maven central for resolving dependencies.
mavenCentral()

// DBIS Archiva
maven {
url "${project.property('dbis.archiva.url')}"
}

// DBIS Archiva (snapshots)
maven {
url "${project.property('dbis.archiva.url.snapshots')}"
}
}

dependencies {
Expand All @@ -57,6 +47,11 @@ jar {
}
}

java {
withJavadocJar()
withSourcesJar()
}

// las2peer bundle jar
shadowJar {
// remove the "-all" at the end of the artifact / file name
Expand All @@ -70,34 +65,57 @@ clean.doLast {
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/rwth-acis/las2peer")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
publications {
bundle(MavenPublication) {
gpr(MavenPublication) {
from components.java
artifact shadowJar
pom {
artifactId "las2peer-bundle"
packaging "jar"
name = 'las2peer-bundle'
artifactId = 'las2peer-bundle'
description = 'A bundle for the las2peer project'
url = 'https://las2peer.org/'
packaging = 'jar'
licenses {
license {
name = 'MIT License'
url = 'https://github.com/rwth-acis/las2peer?tab=License-1-ov-file#readme'
distribution = 'repo'
}
}
developers {
developer {
name = 'rwth-acis'
email= '[email protected]'
organization = 'rwth-acis'
organizationUrl = 'https://las2peer.org/'
}
}
scm {
connection = 'scm:git:git://github.com/rwth-acis/las2peer.git'
developerConnection = 'scm:git:ssh://[email protected]:rwth-acis/las2peer.git'
url = 'https://github.com/rwth-acis/las2peer'
}
}

// fix pom file by removing dependencies node
pom.withXml {
def packagingNode = asNode().appendNode('packaging', 'jar')

Node pomNode = asNode()
pomNode.remove(pomNode.get("dependencies"))
}
}
}

repositories {
maven {
if (las2peerRelease) url = "${project.property('dbis.archiva.url')}"
else url = "${project.property('dbis.archiva.url.snapshots')}"

credentials {
username = System.env.ARCHIVA_USERNAME
password = System.env.ARCHIVA_PASSWORD
}
}
}
}

// disable module metadata publication
Expand Down
72 changes: 44 additions & 28 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def las2peerBuildNumber = "${project.property('las2peer.build.number')}"
def las2peerRelease = System.env.LAS2PEER_RELEASE != null
def las2peerVersion = las2peerRelease ? "$las2peerRevision.$las2peerBuildNumber" : "$las2peerRevision-SNAPSHOT"

group = 'i5'
group = 'io.github.rwth-acis.org.las2peer'
archivesBaseName = 'las2peer'
version = las2peerVersion
mainClassName = "i5.las2peer.tools.L2pNodeLauncher"
Expand All @@ -22,15 +22,6 @@ repositories {
// Use maven central for resolving dependencies.
mavenCentral()

// DBIS Archiva
maven {
url "${project.property('dbis.archiva.url')}"
}

// DBIS Archiva (snapshots)
maven {
url "${project.property('dbis.archiva.url.snapshots')}"
}
}

compileJava {
Expand Down Expand Up @@ -60,7 +51,10 @@ dependencies {
implementation "junit:junit:${project.property('junit.version')}"
testImplementation "org.mockito:mockito-all:1.9.5"

api "FreePastry:FreePastry:3.1.0"
//use local jars
implementation fileTree(dir: '../jars', include: '*.jar')

//api "FreePastry:FreePastry:3.1.0"
api "xpp3:xpp3:1.1.4c" // FreePastry dependency
//api "javax.xml.parsers:jaxp-api:1.4.5"

Expand All @@ -70,7 +64,7 @@ dependencies {
exclude module: "xml-apis"
}
api "commons-logging:commons-logging:1.2"
api "net:sbbi-upnplib:1.0.4"
//implementation group: 'net.sbbi', name: 'sbbi-upnplib', version: '1.0.4'

// Web3j for Ethereum node interaction
api("ch.qos.logback:logback-core:1.2.3") {
Expand All @@ -90,7 +84,7 @@ tasks.withType(Jar) {

jar {
manifest {
attributes("Main-Class": "i5.las2peer.tools.L2pNodeLauncher",
attributes("Main-Class": "i5.las2peer.tools.L2pNodeLauncher",
"Implementation-Version": las2peerVersion,
"Class-Path": configurations.runtimeClasspath.files.collect { it.getName() }.join(" "))
}
Expand Down Expand Up @@ -196,7 +190,7 @@ task jar_test1_1_1(type: Jar) {
archiveFileName = "i5.las2peer.classLoaders.testPackage1-1.0.jar"
from sourceSets.testHelp.output
include "i5/las2peer/classLoaders/testPackage1/**/*"

manifest {
attributes "Library-SymbolicName": "i5.las2peer.classLoaders.testPackage1"
attributes "Library-Version": "1.0"
Expand Down Expand Up @@ -311,25 +305,47 @@ publishing.publications.all {
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/rwth-acis/las2peer")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
publications {
core(MavenPublication) {
gpr(MavenPublication) {
from components.java
pom {
artifactId "las2peer"
packaging "jar"
name = 'las2peer'
artifactId = 'las2peer'
description = 'The las2peer core.'
url = 'https://las2peer.org/'
packaging = 'jar'
licenses {
license {
name = 'MIT License'
url = 'https://github.com/rwth-acis/las2peer?tab=License-1-ov-file#readme'
distribution = 'repo'
}
}
developers {
developer {
name = 'rwth-acis'
email= '[email protected]'
organization = 'rwth-acis'
organizationUrl = 'https://las2peer.org/'
}
}
scm {
connection = 'scm:git:git://github.com/rwth-acis/las2peer.git'
developerConnection = 'scm:git:ssh://[email protected]:rwth-acis/las2peer.git'
url = 'https://github.com/rwth-acis/las2peer'
}
}
}
}

repositories {
maven {
if (las2peerRelease) url = "${project.property('dbis.archiva.url')}"
else url = "${project.property('dbis.archiva.url.snapshots')}"

credentials {
username = System.env.ARCHIVA_USERNAME
password = System.env.ARCHIVA_PASSWORD
}
}
}
}
Expand Down
Binary file added jars/FreePastry-3.1.0.jar
Binary file not shown.
Binary file added jars/sbbi-upnplib-1.0.4.jar
Binary file not shown.
61 changes: 37 additions & 24 deletions restmapper/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def las2peerBuildNumber = "${project.property('las2peer.build.number')}"
def las2peerRelease = System.env.LAS2PEER_RELEASE != null
def las2peerVersion = las2peerRelease ? "$las2peerRevision.$las2peerBuildNumber" : "$las2peerRevision-SNAPSHOT"

group = 'i5'
group = 'io.github.rwth-acis.org.las2peer'
archivesBaseName = 'las2peer-rest-mapper'
version = las2peerVersion
sourceCompatibility = "${project.property('java.version')}"
Expand All @@ -21,15 +21,6 @@ repositories {
// Use maven central for resolving dependencies.
mavenCentral()

// DBIS Archiva
maven {
url "${project.property('dbis.archiva.url')}"
}

// DBIS Archiva (snapshots)
maven {
url "${project.property('dbis.archiva.url.snapshots')}"
}
}

compileJava {
Expand Down Expand Up @@ -106,25 +97,47 @@ publishing.publications.all {
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/rwth-acis/las2peer")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
publications {
restmapper(MavenPublication) {
gpr(MavenPublication) {
from components.java
pom {
artifactId "las2peer-rest-mapper"
packaging "jar"
name = 'las2peer-rest-mapper'
artifactId = 'las2peer-restmapper'
description = 'The restmapper component of the las2peer project'
url = 'https://las2peer.org/'
packaging = 'jar'
licenses {
license {
name = 'MIT License'
url = 'https://github.com/rwth-acis/las2peer?tab=License-1-ov-file#readme'
distribution = 'repo'
}
}
developers {
developer {
name = 'rwth-acis'
email= '[email protected]'
organization = 'rwth-acis'
organizationUrl = 'https://las2peer.org/'
}
}
scm {
connection = 'scm:git:git://github.com/rwth-acis/las2peer.git'
developerConnection = 'scm:git:ssh://[email protected]:rwth-acis/las2peer.git'
url = 'https://github.com/rwth-acis/las2peer'
}
}
}
}

repositories {
maven {
if (las2peerRelease) url = "${project.property('dbis.archiva.url')}"
else url = "${project.property('dbis.archiva.url.snapshots')}"

credentials {
username = System.env.ARCHIVA_USERNAME
password = System.env.ARCHIVA_PASSWORD
}
}
}
}
Expand Down
Loading
Loading