Skip to content
Draft
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
41 changes: 41 additions & 0 deletions .github/workflows/publish-manuel-stream-symbols.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Manual publish stream-symbols workaround

on:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: publish-stream-symbols
cancel-in-progress: false

jobs:
publish:
name: Publish local stream-symbols
runs-on: ubuntu-latest

steps:
- name: Checkout project sources
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: '7.4'

- name: Publish stream symbols to Nexus
env:
ORG_GRADLE_PROJECT_nexusUser: ${{ secrets.SE_NEXUS_USER }}
ORG_GRADLE_PROJECT_nexusPassword: ${{ secrets.SE_NEXUS_PASSWORD }}
run: |
gradle publishStreamSymbolsToNexus \
-Pci \
--build-cache \
--stacktrace
45 changes: 45 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,48 @@ subprojects {

evaluationDependsOnChildren()
project(":language-server").tasks.generateSysMLv2LanguageServer.dependsOn project(":language").tasks.grammarsJar

apply plugin: 'maven-publish'

def streamSymbolsVersion = '7.8.1'
def streamSymbolsJar = file("$rootDir/build/stream-symbols/stream-symbols-${streamSymbolsVersion}.jar")

tasks.register('validateStreamSymbolsJar') {
inputs.file(streamSymbolsJar)
doLast {
if (!streamSymbolsJar.isFile()) {
throw new GradleException("Missing stream-symbols artifact: ${streamSymbolsJar}")
}
}
}

publishing {
publications {
streamSymbols(MavenPublication) {
groupId = 'de.monticore'
artifactId = 'stream-symbols'
version = streamSymbolsVersion
artifact(streamSymbolsJar) {
builtBy tasks.named('validateStreamSymbolsJar')
}
pom {
name = 'stream-symbols'
description = 'Stream symbols workaround artifact for the SysML v2 7.8.x release.'
}
}
}
repositories.maven {
name = "Nexus"
credentials.username nexusUser
credentials.password nexusPassword
def releasesRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-releases/"
def snapshotsRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-snapshots/"
url = streamSymbolsVersion.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}

tasks.register('publishStreamSymbolsToNexus') {
group = 'publishing'
description = 'Publishes the local stream-symbols 7.8.1 workaround artifact to SE Nexus.'
dependsOn tasks.named('publishStreamSymbolsPublicationToNexusRepository')
}
Binary file added build/stream-symbols/stream-symbols-7.8.1.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ assertj_version = 3.21.0
junit_version = 5.8.2

# Version of published artifacts
version = 7.8.96
version = 7.8.97
2 changes: 1 addition & 1 deletion language/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ dependencies {
implementation "org.antlr:antlr4-runtime:$antlr_version"
implementation "de.monticore:monticore-runtime:$mc_version"
implementation "de.monticore:monticore-grammar:$mc_version"
implementation "de.monticore:stream-symbols:$mc_version"
implementation files("$rootDir/build/stream-symbols/stream-symbols-7.8.1.jar")
implementation "de.monticore.lang:ocl:$mc_version"
implementation "commons-cli:commons-cli:$commons_cli_version"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,12 @@ public void run(String[] args) {
}
}

// Die StreamSymbole werden manuell geladen aus
// 'build/stream-symbols/stream-symbols-7.8.1.jar' und in der
// 'language/build.gradle' Zeile 73 von 'implementation "de
// .monticore:stream-symbols:$mc_version"' auf 'implementation files
// ("$rootDir/build/stream-symbols/stream-symbols-7.8.1.jar")' gesetzt. Das
// muss nach dem fix in monticore rückgängig gemacht werden
public static void loadStreamSymbolsFromJar() {
URL streamDefUrl = SysMLv2Tool.class.getClassLoader().getResource(
"Stream.symtabdefinitionsym");
Expand Down
Loading