fix: Task-Typen und Export für App-Kompatibilität korrigiert
Historische Typnummern angeglichen und base_type für benutzerdefinierte Tasks ergänzt. React im Vaadin-Dev-Modus deaktiviert und Lockdatei bereinigt. Version auf 0.9.3 und Docker-Image auf wfe aktualisiert sowie Windows-Zeilenenden im Maven-Wrapper übernommen.
This commit is contained in:
1 parent
525e775d1c
commit
93ba40c476
10 files changed
+243
-1104
No files matched your search
+1
-1
@@ -3,7 +3,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
readonly SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||
readonly REGISTRY_IMAGE="registry.assecutor.org/ait"
|
||||
readonly REGISTRY_IMAGE="registry.assecutor.org/wfe"
|
||||
readonly BACKEND_DIR="${SCRIPT_DIR}"
|
||||
|
||||
usage() {
|
||||
|
||||
@@ -1,189 +1,189 @@
|
||||
<# : batch portion
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||
@REM or more contributor license agreements. See the NOTICE file
|
||||
@REM distributed with this work for additional information
|
||||
@REM regarding copyright ownership. The ASF licenses this file
|
||||
@REM to you under the Apache License, Version 2.0 (the
|
||||
@REM "License"); you may not use this file except in compliance
|
||||
@REM with the License. You may obtain a copy of the License at
|
||||
@REM
|
||||
@REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing,
|
||||
@REM software distributed under the License is distributed on an
|
||||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@REM KIND, either express or implied. See the License for the
|
||||
@REM specific language governing permissions and limitations
|
||||
@REM under the License.
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Apache Maven Wrapper startup batch script, version 3.3.4
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM MVNW_REPOURL - repo url base for downloading maven distribution
|
||||
@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
|
||||
@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0)
|
||||
@SET __MVNW_CMD__=
|
||||
@SET __MVNW_ERROR__=
|
||||
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath%
|
||||
@SET PSModulePath=
|
||||
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @(
|
||||
IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B)
|
||||
)
|
||||
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE%
|
||||
@SET __MVNW_PSMODULEP_SAVE=
|
||||
@SET __MVNW_ARG0_NAME__=
|
||||
@SET MVNW_USERNAME=
|
||||
@SET MVNW_PASSWORD=
|
||||
@IF NOT "%__MVNW_CMD__%"=="" ("%__MVNW_CMD__%" %*)
|
||||
@echo Cannot start maven from wrapper >&2 && exit /b 1
|
||||
@GOTO :EOF
|
||||
: end batch / begin powershell #>
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
if ($env:MVNW_VERBOSE -eq "true") {
|
||||
$VerbosePreference = "Continue"
|
||||
}
|
||||
|
||||
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties
|
||||
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl
|
||||
if (!$distributionUrl) {
|
||||
Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
|
||||
}
|
||||
|
||||
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) {
|
||||
"maven-mvnd-*" {
|
||||
$USE_MVND = $true
|
||||
$distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip"
|
||||
$MVN_CMD = "mvnd.cmd"
|
||||
break
|
||||
}
|
||||
default {
|
||||
$USE_MVND = $false
|
||||
$MVN_CMD = $script -replace '^mvnw','mvn'
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
# apply MVNW_REPOURL and calculate MAVEN_HOME
|
||||
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
|
||||
if ($env:MVNW_REPOURL) {
|
||||
$MVNW_REPO_PATTERN = if ($USE_MVND -eq $False) { "/org/apache/maven/" } else { "/maven/mvnd/" }
|
||||
$distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace "^.*$MVNW_REPO_PATTERN",'')"
|
||||
}
|
||||
$distributionUrlName = $distributionUrl -replace '^.*/',''
|
||||
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''
|
||||
|
||||
$MAVEN_M2_PATH = "$HOME/.m2"
|
||||
if ($env:MAVEN_USER_HOME) {
|
||||
$MAVEN_M2_PATH = "$env:MAVEN_USER_HOME"
|
||||
}
|
||||
|
||||
if (-not (Test-Path -Path $MAVEN_M2_PATH)) {
|
||||
New-Item -Path $MAVEN_M2_PATH -ItemType Directory | Out-Null
|
||||
}
|
||||
|
||||
$MAVEN_WRAPPER_DISTS = $null
|
||||
if ((Get-Item $MAVEN_M2_PATH).Target[0] -eq $null) {
|
||||
$MAVEN_WRAPPER_DISTS = "$MAVEN_M2_PATH/wrapper/dists"
|
||||
} else {
|
||||
$MAVEN_WRAPPER_DISTS = (Get-Item $MAVEN_M2_PATH).Target[0] + "/wrapper/dists"
|
||||
}
|
||||
|
||||
$MAVEN_HOME_PARENT = "$MAVEN_WRAPPER_DISTS/$distributionUrlNameMain"
|
||||
$MAVEN_HOME_NAME = ([System.Security.Cryptography.SHA256]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
|
||||
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"
|
||||
|
||||
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) {
|
||||
Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME"
|
||||
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
|
||||
exit $?
|
||||
}
|
||||
|
||||
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) {
|
||||
Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl"
|
||||
}
|
||||
|
||||
# prepare tmp dir
|
||||
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile
|
||||
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir"
|
||||
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null
|
||||
trap {
|
||||
if ($TMP_DOWNLOAD_DIR.Exists) {
|
||||
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
|
||||
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
|
||||
}
|
||||
}
|
||||
|
||||
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null
|
||||
|
||||
# Download and Install Apache Maven
|
||||
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
|
||||
Write-Verbose "Downloading from: $distributionUrl"
|
||||
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
|
||||
|
||||
$webclient = New-Object System.Net.WebClient
|
||||
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) {
|
||||
$webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD)
|
||||
}
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null
|
||||
|
||||
# If specified, validate the SHA-256 sum of the Maven distribution zip file
|
||||
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum
|
||||
if ($distributionSha256Sum) {
|
||||
if ($USE_MVND) {
|
||||
Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties."
|
||||
}
|
||||
Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash
|
||||
if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) {
|
||||
Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property."
|
||||
}
|
||||
}
|
||||
|
||||
# unzip and move
|
||||
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null
|
||||
|
||||
# Find the actual extracted directory name (handles snapshots where filename != directory name)
|
||||
$actualDistributionDir = ""
|
||||
|
||||
# First try the expected directory name (for regular distributions)
|
||||
$expectedPath = Join-Path "$TMP_DOWNLOAD_DIR" "$distributionUrlNameMain"
|
||||
$expectedMvnPath = Join-Path "$expectedPath" "bin/$MVN_CMD"
|
||||
if ((Test-Path -Path $expectedPath -PathType Container) -and (Test-Path -Path $expectedMvnPath -PathType Leaf)) {
|
||||
$actualDistributionDir = $distributionUrlNameMain
|
||||
}
|
||||
|
||||
# If not found, search for any directory with the Maven executable (for snapshots)
|
||||
if (!$actualDistributionDir) {
|
||||
Get-ChildItem -Path "$TMP_DOWNLOAD_DIR" -Directory | ForEach-Object {
|
||||
$testPath = Join-Path $_.FullName "bin/$MVN_CMD"
|
||||
if (Test-Path -Path $testPath -PathType Leaf) {
|
||||
$actualDistributionDir = $_.Name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$actualDistributionDir) {
|
||||
Write-Error "Could not find Maven distribution directory in extracted archive"
|
||||
}
|
||||
|
||||
Write-Verbose "Found extracted Maven distribution directory: $actualDistributionDir"
|
||||
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$actualDistributionDir" -NewName $MAVEN_HOME_NAME | Out-Null
|
||||
try {
|
||||
Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null
|
||||
} catch {
|
||||
if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) {
|
||||
Write-Error "fail to move MAVEN_HOME"
|
||||
}
|
||||
} finally {
|
||||
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
|
||||
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
|
||||
}
|
||||
|
||||
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
|
||||
<# : batch portion
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||
@REM or more contributor license agreements. See the NOTICE file
|
||||
@REM distributed with this work for additional information
|
||||
@REM regarding copyright ownership. The ASF licenses this file
|
||||
@REM to you under the Apache License, Version 2.0 (the
|
||||
@REM "License"); you may not use this file except in compliance
|
||||
@REM with the License. You may obtain a copy of the License at
|
||||
@REM
|
||||
@REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing,
|
||||
@REM software distributed under the License is distributed on an
|
||||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@REM KIND, either express or implied. See the License for the
|
||||
@REM specific language governing permissions and limitations
|
||||
@REM under the License.
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Apache Maven Wrapper startup batch script, version 3.3.4
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM MVNW_REPOURL - repo url base for downloading maven distribution
|
||||
@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
|
||||
@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0)
|
||||
@SET __MVNW_CMD__=
|
||||
@SET __MVNW_ERROR__=
|
||||
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath%
|
||||
@SET PSModulePath=
|
||||
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @(
|
||||
IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B)
|
||||
)
|
||||
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE%
|
||||
@SET __MVNW_PSMODULEP_SAVE=
|
||||
@SET __MVNW_ARG0_NAME__=
|
||||
@SET MVNW_USERNAME=
|
||||
@SET MVNW_PASSWORD=
|
||||
@IF NOT "%__MVNW_CMD__%"=="" ("%__MVNW_CMD__%" %*)
|
||||
@echo Cannot start maven from wrapper >&2 && exit /b 1
|
||||
@GOTO :EOF
|
||||
: end batch / begin powershell #>
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
if ($env:MVNW_VERBOSE -eq "true") {
|
||||
$VerbosePreference = "Continue"
|
||||
}
|
||||
|
||||
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties
|
||||
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl
|
||||
if (!$distributionUrl) {
|
||||
Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
|
||||
}
|
||||
|
||||
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) {
|
||||
"maven-mvnd-*" {
|
||||
$USE_MVND = $true
|
||||
$distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip"
|
||||
$MVN_CMD = "mvnd.cmd"
|
||||
break
|
||||
}
|
||||
default {
|
||||
$USE_MVND = $false
|
||||
$MVN_CMD = $script -replace '^mvnw','mvn'
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
# apply MVNW_REPOURL and calculate MAVEN_HOME
|
||||
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
|
||||
if ($env:MVNW_REPOURL) {
|
||||
$MVNW_REPO_PATTERN = if ($USE_MVND -eq $False) { "/org/apache/maven/" } else { "/maven/mvnd/" }
|
||||
$distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace "^.*$MVNW_REPO_PATTERN",'')"
|
||||
}
|
||||
$distributionUrlName = $distributionUrl -replace '^.*/',''
|
||||
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''
|
||||
|
||||
$MAVEN_M2_PATH = "$HOME/.m2"
|
||||
if ($env:MAVEN_USER_HOME) {
|
||||
$MAVEN_M2_PATH = "$env:MAVEN_USER_HOME"
|
||||
}
|
||||
|
||||
if (-not (Test-Path -Path $MAVEN_M2_PATH)) {
|
||||
New-Item -Path $MAVEN_M2_PATH -ItemType Directory | Out-Null
|
||||
}
|
||||
|
||||
$MAVEN_WRAPPER_DISTS = $null
|
||||
if ((Get-Item $MAVEN_M2_PATH).Target[0] -eq $null) {
|
||||
$MAVEN_WRAPPER_DISTS = "$MAVEN_M2_PATH/wrapper/dists"
|
||||
} else {
|
||||
$MAVEN_WRAPPER_DISTS = (Get-Item $MAVEN_M2_PATH).Target[0] + "/wrapper/dists"
|
||||
}
|
||||
|
||||
$MAVEN_HOME_PARENT = "$MAVEN_WRAPPER_DISTS/$distributionUrlNameMain"
|
||||
$MAVEN_HOME_NAME = ([System.Security.Cryptography.SHA256]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
|
||||
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"
|
||||
|
||||
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) {
|
||||
Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME"
|
||||
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
|
||||
exit $?
|
||||
}
|
||||
|
||||
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) {
|
||||
Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl"
|
||||
}
|
||||
|
||||
# prepare tmp dir
|
||||
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile
|
||||
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir"
|
||||
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null
|
||||
trap {
|
||||
if ($TMP_DOWNLOAD_DIR.Exists) {
|
||||
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
|
||||
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
|
||||
}
|
||||
}
|
||||
|
||||
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null
|
||||
|
||||
# Download and Install Apache Maven
|
||||
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
|
||||
Write-Verbose "Downloading from: $distributionUrl"
|
||||
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
|
||||
|
||||
$webclient = New-Object System.Net.WebClient
|
||||
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) {
|
||||
$webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD)
|
||||
}
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null
|
||||
|
||||
# If specified, validate the SHA-256 sum of the Maven distribution zip file
|
||||
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum
|
||||
if ($distributionSha256Sum) {
|
||||
if ($USE_MVND) {
|
||||
Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties."
|
||||
}
|
||||
Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash
|
||||
if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) {
|
||||
Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property."
|
||||
}
|
||||
}
|
||||
|
||||
# unzip and move
|
||||
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null
|
||||
|
||||
# Find the actual extracted directory name (handles snapshots where filename != directory name)
|
||||
$actualDistributionDir = ""
|
||||
|
||||
# First try the expected directory name (for regular distributions)
|
||||
$expectedPath = Join-Path "$TMP_DOWNLOAD_DIR" "$distributionUrlNameMain"
|
||||
$expectedMvnPath = Join-Path "$expectedPath" "bin/$MVN_CMD"
|
||||
if ((Test-Path -Path $expectedPath -PathType Container) -and (Test-Path -Path $expectedMvnPath -PathType Leaf)) {
|
||||
$actualDistributionDir = $distributionUrlNameMain
|
||||
}
|
||||
|
||||
# If not found, search for any directory with the Maven executable (for snapshots)
|
||||
if (!$actualDistributionDir) {
|
||||
Get-ChildItem -Path "$TMP_DOWNLOAD_DIR" -Directory | ForEach-Object {
|
||||
$testPath = Join-Path $_.FullName "bin/$MVN_CMD"
|
||||
if (Test-Path -Path $testPath -PathType Leaf) {
|
||||
$actualDistributionDir = $_.Name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$actualDistributionDir) {
|
||||
Write-Error "Could not find Maven distribution directory in extracted archive"
|
||||
}
|
||||
|
||||
Write-Verbose "Found extracted Maven distribution directory: $actualDistributionDir"
|
||||
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$actualDistributionDir" -NewName $MAVEN_HOME_NAME | Out-Null
|
||||
try {
|
||||
Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null
|
||||
} catch {
|
||||
if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) {
|
||||
Write-Error "fail to move MAVEN_HOME"
|
||||
}
|
||||
} finally {
|
||||
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
|
||||
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
|
||||
}
|
||||
|
||||
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
|
||||
Generated
-893
File diff suppressed because it is too large.
Load diff
@@ -13,7 +13,7 @@
|
||||
|
||||
<groupId>de.assecutor</groupId>
|
||||
<artifactId>tasklist-editor</artifactId>
|
||||
<version>0.9.2</version>
|
||||
<version>0.9.3</version>
|
||||
<name>TaskList Editor</name>
|
||||
<description>n8n-inspired editor for task list workflows</description>
|
||||
|
||||
|
||||
@@ -55,13 +55,17 @@ public class BlockTypeRegistry {
|
||||
List.of()
|
||||
));
|
||||
|
||||
// Die Typnummern 2–11 entsprechen der historischen Task-Typ-Belegung
|
||||
// der stadtbote-App (2 = Unterschrift, 3 = Ankunft, 4 = Fotos,
|
||||
// 5 = Barcode, 7–9 = Texteingaben, 11 = Statusauswahl). Neue, im
|
||||
// Editor eingeführte Typen werden ab 12 aufsteigend nummeriert.
|
||||
register(new BlockType(
|
||||
"ankunft-melden",
|
||||
"Ankunft melden",
|
||||
"Erfasst die Ankunft am Einsatzort (Bestätigungsschaltfläche).",
|
||||
"vaadin:map-marker",
|
||||
"#2563eb",
|
||||
1,
|
||||
3,
|
||||
1, 1,
|
||||
List.of(
|
||||
PropertyDefinition.bool("track", "GPS-Position erfassen", true),
|
||||
@@ -92,7 +96,7 @@ public class BlockTypeRegistry {
|
||||
"Nimmt eine Anzahl von Fotos auf.",
|
||||
"vaadin:camera",
|
||||
"#059669",
|
||||
3,
|
||||
4,
|
||||
1, 1,
|
||||
List.of(
|
||||
PropertyDefinition.number("min", "Mindestanzahl Fotos", 1),
|
||||
@@ -155,7 +159,7 @@ public class BlockTypeRegistry {
|
||||
"Einfache Bestätigung per Häkchen ohne weitere Eingabe.",
|
||||
"vaadin:check-square-o",
|
||||
"#16a34a",
|
||||
6,
|
||||
12,
|
||||
1, 1,
|
||||
List.of(
|
||||
PropertyDefinition.bool("opt", "Optionale Aufgabe", false),
|
||||
@@ -194,17 +198,16 @@ public class BlockTypeRegistry {
|
||||
)
|
||||
));
|
||||
|
||||
// Listen-Tasks: erfassen mehrerer gleichartiger Werte. Die Anzahl wird
|
||||
// analog zu "Fotos aufnehmen" über min/max gesteuert. Diese Typen haben
|
||||
// (noch) keinen Handler in der stadtbote-App und liegen daher oberhalb
|
||||
// des dort genutzten Bereichs (1–11).
|
||||
// Listen-Tasks: erfassen mehrerer gleichartiger Werte über
|
||||
// vordefinierte Eingabefelder. Wie alle im Editor neu eingeführten
|
||||
// Typen liegen sie oberhalb des historischen App-Bereichs (2–11).
|
||||
register(new BlockType(
|
||||
"text-liste-erfassen",
|
||||
"Liste von Texten erfassen",
|
||||
"Erfasst mehrere Texteinträge über vordefinierte Eingabefelder.",
|
||||
"vaadin:lines-list",
|
||||
"#4338ca",
|
||||
12,
|
||||
13,
|
||||
1, 1,
|
||||
List.of(
|
||||
PropertyDefinition.fieldList("fields", "Textfelder (Titel + Platzhalter)"),
|
||||
@@ -218,7 +221,7 @@ public class BlockTypeRegistry {
|
||||
"Erfasst mehrere numerische Werte über vordefinierte Eingabefelder.",
|
||||
"vaadin:list-ol",
|
||||
"#0369a1",
|
||||
13,
|
||||
14,
|
||||
1, 1,
|
||||
List.of(
|
||||
PropertyDefinition.fieldList("fields", "Zahlenfelder (Titel + Platzhalter)"),
|
||||
@@ -232,7 +235,7 @@ public class BlockTypeRegistry {
|
||||
"Lässt mehrere vordefinierte Optionen per Checkbox ankreuzen.",
|
||||
"vaadin:tasks",
|
||||
"#15803d",
|
||||
14,
|
||||
15,
|
||||
1, 1,
|
||||
List.of(
|
||||
PropertyDefinition.nameList("entries", "Name der Checkboxen"),
|
||||
@@ -266,7 +269,7 @@ public class BlockTypeRegistry {
|
||||
return Optional.ofNullable(types.get(id));
|
||||
}
|
||||
|
||||
/** Die festen Standard-Typen (Typnummer 1–8), auf denen eigene Typen aufbauen. */
|
||||
/** Die festen Standard-Typen (Typnummer < 1000), auf denen eigene Typen aufbauen. */
|
||||
public List<BlockType> baseTypes() {
|
||||
return types.values().stream()
|
||||
.filter(t -> t.taskType() >= 1 && t.taskType() < CUSTOM_TYPE_START)
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
* erscheinen.
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({"s_id", "type", "topic", "opt", "reenter", "min", "max",
|
||||
@JsonPropertyOrder({"s_id", "type", "base_type", "topic", "opt", "reenter", "min", "max",
|
||||
"max_len", "rt", "track", "txt", "task_arrival", "task_fin_work", "entries", "choices", "fields", "script"})
|
||||
public class TaskDto {
|
||||
|
||||
@@ -25,6 +25,15 @@ public class TaskDto {
|
||||
|
||||
private int type;
|
||||
|
||||
/**
|
||||
* Typnummer des Basis-Typs bei benutzerdefinierten Typen
|
||||
* ({@code type >= }{@link BlockTypeRegistry#CUSTOM_TYPE_START}); die App
|
||||
* stellt solche Tasks wie ihren Basis-Typ dar. Bei Standard-Typen
|
||||
* {@code null} und damit nicht im JSON enthalten.
|
||||
*/
|
||||
@JsonProperty("base_type")
|
||||
private Integer baseType;
|
||||
|
||||
private String topic;
|
||||
|
||||
private Boolean opt;
|
||||
@@ -47,10 +56,10 @@ public class TaskDto {
|
||||
|
||||
private List<TaskEntryDto> entries;
|
||||
|
||||
/** Auswahloptionen eines Status-Tasks (Typ 6). */
|
||||
/** Auswahloptionen eines Status-Tasks (Typ 11). */
|
||||
private List<ChoiceDto> choices;
|
||||
|
||||
/** Eingabefelder eines Listen-Text-Tasks (Typ 12). */
|
||||
/** Eingabefelder einer Text-/Zahlen-Liste (Typ 13/14). */
|
||||
private List<FieldDto> fields;
|
||||
|
||||
/** Logik-Graph eines Script-Blocks (Drawflow-Definition als JSON). */
|
||||
@@ -72,6 +81,14 @@ public class TaskDto {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getBaseType() {
|
||||
return baseType;
|
||||
}
|
||||
|
||||
public void setBaseType(Integer baseType) {
|
||||
this.baseType = baseType;
|
||||
}
|
||||
|
||||
public String getTopic() {
|
||||
return topic;
|
||||
}
|
||||
|
||||
@@ -32,9 +32,11 @@ import java.util.Set;
|
||||
public class TaskListExporter {
|
||||
|
||||
private final ObjectMapper objectMapper;
|
||||
private final BlockTypeRegistry registry;
|
||||
|
||||
public TaskListExporter(ObjectMapper objectMapper) {
|
||||
public TaskListExporter(ObjectMapper objectMapper, BlockTypeRegistry registry) {
|
||||
this.objectMapper = objectMapper;
|
||||
this.registry = registry;
|
||||
}
|
||||
|
||||
public List<TaskDto> export(String drawflowJson, Map<Integer, BlockInstance> instances) {
|
||||
@@ -225,6 +227,13 @@ public class TaskListExporter {
|
||||
private TaskDto toTask(BlockInstance instance) {
|
||||
TaskDto task = new TaskDto();
|
||||
task.setType(instance.type().taskType());
|
||||
// Benutzerdefinierte Typen verhalten sich in der App wie ihr
|
||||
// Basis-Typ; dessen Typnummer wird als base_type mit exportiert.
|
||||
if (instance.type().taskType() >= BlockTypeRegistry.CUSTOM_TYPE_START
|
||||
&& instance.type().baseTypeId() != null) {
|
||||
registry.find(instance.type().baseTypeId())
|
||||
.ifPresent(base -> task.setBaseType(base.taskType()));
|
||||
}
|
||||
String topic = instance.topic();
|
||||
task.setTopic(topic == null || topic.isBlank() ? instance.type().label() : topic);
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public class TaskListImporter {
|
||||
private Map<String, Object> valuesFor(BlockType type, TaskDto task) {
|
||||
Map<String, Object> values = new LinkedHashMap<>();
|
||||
for (PropertyDefinition def : type.properties()) {
|
||||
// Listen-Eigenschaften (Typ 12–14) werden anhand ihres
|
||||
// Listen-Eigenschaften (Typ 13–15) werden anhand ihres
|
||||
// Property-Typs in die vom Zeilen-Editor erwartete Struktur
|
||||
// (Liste aus {title}/{title,placeholder}-Maps) zurückgewandelt.
|
||||
Object value = switch (def.type()) {
|
||||
@@ -95,7 +95,7 @@ public class TaskListImporter {
|
||||
};
|
||||
}
|
||||
|
||||
/** {@code fields}-Array (Typ 12/13) zurück in Zeilen mit Titel + Platzhalter. */
|
||||
/** {@code fields}-Array (Typ 13/14) zurück in Zeilen mit Titel + Platzhalter. */
|
||||
private List<Map<String, Object>> fieldRows(TaskDto task) {
|
||||
List<Map<String, Object>> rows = new ArrayList<>();
|
||||
if (task.getFields() == null) {
|
||||
@@ -111,7 +111,7 @@ public class TaskListImporter {
|
||||
return rows;
|
||||
}
|
||||
|
||||
/** {@code entries}-Array (Typ 14) zurück in Zeilen mit Namen ({@code title}). */
|
||||
/** {@code entries}-Array (Typ 15) zurück in Zeilen mit Namen ({@code title}). */
|
||||
private List<Map<String, Object>> entryRows(TaskDto task) {
|
||||
List<Map<String, Object>> rows = new ArrayList<>();
|
||||
if (task.getEntries() == null) {
|
||||
|
||||
@@ -230,9 +230,9 @@ public class WorkflowAssistantService {
|
||||
(boolean) erlaubt erneutes Bearbeiten.
|
||||
- Listenfelder:
|
||||
* "fields": Array aus {"title": "...", "placeholder": "...", "required": true|false}
|
||||
(Text-/Zahlenlisten, Typ 12/13).
|
||||
(Text-/Zahlenlisten, Typ 13/14).
|
||||
* "entries": Array aus {"code": <fortlaufend ab 1>, "text": "...", "required": true|false}
|
||||
(Checkbox-Liste, Typ 14).
|
||||
(Checkbox-Liste, Typ 15).
|
||||
* "choices": Array aus {"txt": "...", "ret": <fortlaufend ab 1>}
|
||||
(Statusauswahl, Typ 11).
|
||||
Kennzeichne Einträge nur dann mit "required": true, wenn der Benutzer sie
|
||||
|
||||
@@ -6,6 +6,9 @@ tasklist.app-version=@project.version@
|
||||
|
||||
vaadin.launch-browser=true
|
||||
vaadin.allowed-packages=de.assecutor.tasklisteditor
|
||||
# Lit-/Router-Modus statt React (muss zum reactEnable=false im pom.xml passen,
|
||||
# damit der Dev-Modus beim IDE-Start kein React-Frontend generiert).
|
||||
vaadin.react.enable=false
|
||||
|
||||
management.endpoints.web.exposure.include=health,info
|
||||
management.endpoint.health.probes.enabled=true
|
||||
|
||||
Reference in new issue
Block a user