gradle 내부망 주소로 변경
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -20,9 +20,20 @@ configurations {
|
||||
}
|
||||
}
|
||||
|
||||
//repositories {
|
||||
// mavenCentral()
|
||||
// maven { url "https://repo.osgeo.org/repository/release/" }
|
||||
//}
|
||||
|
||||
def repoUrl = System.getProperty("org.gradle.project.repoUrl")
|
||||
?: System.getenv("ORG_GRADLE_PROJECT_repoUrl")
|
||||
?: "http://172.16.4.56:18100/repository/maven-public/"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url "https://repo.osgeo.org/repository/release/" }
|
||||
maven {
|
||||
url = uri(repoUrl)
|
||||
allowInsecureProtocol = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -650,7 +650,7 @@ code + .copy-button {
|
||||
<script type="text/javascript">
|
||||
function configurationCacheProblems() { return (
|
||||
// begin-report-data
|
||||
{"diagnostics":[{"locations":[{}],"problem":[{"text":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 10.0."}],"contextualLabel":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated.","documentationLink":"https://docs.gradle.org/8.14.3/userguide/upgrading_version_8.html#groovy_space_assignment_syntax","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"properties-should-be-assigned-using-the-propname-value-syntax-setting-a-property-via-the-gradle-generated-propname-value-or-propname-value-syntax-in-groovy-dsl","displayName":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"solutions":[[{"text":"Use assignment ('url = <value>') instead."}]]},{"locations":[{"path":"C:\\workspace\\kamco-cd-cron\\label\\label-to-review\\src\\main\\java\\com\\kamco\\cd\\kamcoback\\common\\utils\\zip\\JsonStreamingFileProcessor.java"},{"taskPath":":compileJava"}],"problem":[{"text":"Some input files use or override a deprecated API."}],"severity":"ADVICE","problemDetails":[{"text":"Note: Some input files use or override a deprecated API."}],"contextualLabel":"Some input files use or override a deprecated API.","problemId":[{"name":"java","displayName":"Java compilation"},{"name":"compilation","displayName":"Compilation"},{"name":"compiler.note.deprecated.plural","displayName":"Some input files use or override a deprecated API."}]},{"locations":[{"path":"C:\\workspace\\kamco-cd-cron\\label\\label-to-review\\src\\main\\java\\com\\kamco\\cd\\kamcoback\\common\\utils\\zip\\JsonStreamingFileProcessor.java"},{"taskPath":":compileJava"}],"problem":[{"text":"Recompile with -Xlint:deprecation for details."}],"severity":"ADVICE","problemDetails":[{"text":"Note: Recompile with -Xlint:deprecation for details."}],"contextualLabel":"Recompile with -Xlint:deprecation for details.","problemId":[{"name":"java","displayName":"Java compilation"},{"name":"compilation","displayName":"Compilation"},{"name":"compiler.note.deprecated.recompile","displayName":"Recompile with -Xlint:deprecation for details."}]},{"locations":[{"path":"C:\\workspace\\kamco-cd-cron\\label\\label-to-review\\src\\main\\java\\com\\kamco\\cd\\kamcoback\\common\\utils\\enums\\Enums.java"},{"taskPath":":compileJava"}],"problem":[{"text":"Some input files use unchecked or unsafe operations."}],"severity":"ADVICE","problemDetails":[{"text":"Note: Some input files use unchecked or unsafe operations."}],"contextualLabel":"Some input files use unchecked or unsafe operations.","problemId":[{"name":"java","displayName":"Java compilation"},{"name":"compilation","displayName":"Compilation"},{"name":"compiler.note.unchecked.plural","displayName":"Some input files use unchecked or unsafe operations."}]},{"locations":[{"path":"C:\\workspace\\kamco-cd-cron\\label\\label-to-review\\src\\main\\java\\com\\kamco\\cd\\kamcoback\\common\\utils\\enums\\Enums.java"},{"taskPath":":compileJava"}],"problem":[{"text":"Recompile with -Xlint:unchecked for details."}],"severity":"ADVICE","problemDetails":[{"text":"Note: Recompile with -Xlint:unchecked for details."}],"contextualLabel":"Recompile with -Xlint:unchecked for details.","problemId":[{"name":"java","displayName":"Java compilation"},{"name":"compilation","displayName":"Compilation"},{"name":"compiler.note.unchecked.recompile","displayName":"Recompile with -Xlint:unchecked for details."}]}],"problemsReport":{"totalProblemCount":5,"buildName":"kamco-label-to-review","requestedTasks":"clean build","documentationLink":"https://docs.gradle.org/8.14.3/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
|
||||
{"diagnostics":[{"locations":[{"path":"C:\\workspace\\kamco-cd-cron\\label\\label-to-review\\src\\main\\java\\com\\kamco\\cd\\kamcoback\\common\\utils\\zip\\JsonStreamingFileProcessor.java"},{"taskPath":":compileJava"}],"problem":[{"text":"Some input files use or override a deprecated API."}],"severity":"ADVICE","problemDetails":[{"text":"Note: Some input files use or override a deprecated API."}],"contextualLabel":"Some input files use or override a deprecated API.","problemId":[{"name":"java","displayName":"Java compilation"},{"name":"compilation","displayName":"Compilation"},{"name":"compiler.note.deprecated.plural","displayName":"Some input files use or override a deprecated API."}]},{"locations":[{"path":"C:\\workspace\\kamco-cd-cron\\label\\label-to-review\\src\\main\\java\\com\\kamco\\cd\\kamcoback\\common\\utils\\zip\\JsonStreamingFileProcessor.java"},{"taskPath":":compileJava"}],"problem":[{"text":"Recompile with -Xlint:deprecation for details."}],"severity":"ADVICE","problemDetails":[{"text":"Note: Recompile with -Xlint:deprecation for details."}],"contextualLabel":"Recompile with -Xlint:deprecation for details.","problemId":[{"name":"java","displayName":"Java compilation"},{"name":"compilation","displayName":"Compilation"},{"name":"compiler.note.deprecated.recompile","displayName":"Recompile with -Xlint:deprecation for details."}]},{"locations":[{"path":"C:\\workspace\\kamco-cd-cron\\label\\label-to-review\\src\\main\\java\\com\\kamco\\cd\\kamcoback\\common\\utils\\enums\\Enums.java"},{"taskPath":":compileJava"}],"problem":[{"text":"Some input files use unchecked or unsafe operations."}],"severity":"ADVICE","problemDetails":[{"text":"Note: Some input files use unchecked or unsafe operations."}],"contextualLabel":"Some input files use unchecked or unsafe operations.","problemId":[{"name":"java","displayName":"Java compilation"},{"name":"compilation","displayName":"Compilation"},{"name":"compiler.note.unchecked.plural","displayName":"Some input files use unchecked or unsafe operations."}]},{"locations":[{"path":"C:\\workspace\\kamco-cd-cron\\label\\label-to-review\\src\\main\\java\\com\\kamco\\cd\\kamcoback\\common\\utils\\enums\\Enums.java"},{"taskPath":":compileJava"}],"problem":[{"text":"Recompile with -Xlint:unchecked for details."}],"severity":"ADVICE","problemDetails":[{"text":"Note: Recompile with -Xlint:unchecked for details."}],"contextualLabel":"Recompile with -Xlint:unchecked for details.","problemId":[{"name":"java","displayName":"Java compilation"},{"name":"compilation","displayName":"Compilation"},{"name":"compiler.note.unchecked.recompile","displayName":"Recompile with -Xlint:unchecked for details."}]}],"problemsReport":{"totalProblemCount":4,"buildName":"kamco-label-to-review","requestedTasks":"clean bootJar","documentationLink":"https://docs.gradle.org/8.14.3/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
|
||||
// end-report-data
|
||||
);}
|
||||
</script>
|
||||
|
||||
Binary file not shown.
@@ -1 +0,0 @@
|
||||
1
|
||||
@@ -1,6 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
#distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
distributionUrl=http\://172.16.4.56:18100/repository/gradle-distributions/gradle-8.14.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
293
label/label-to-review/make_seed_bundle_succ.sh
Normal file
293
label/label-to-review/make_seed_bundle_succ.sh
Normal file
@@ -0,0 +1,293 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
OUTDIR="${OUTDIR:-offline-seed}"
|
||||
M2OUT="$OUTDIR/m2repo"
|
||||
LOGDIR="$OUTDIR/logs"
|
||||
|
||||
ARTIFACT_URLS="$OUTDIR/artifact-urls.txt"
|
||||
FAILED_URLS="$OUTDIR/failed-urls.txt"
|
||||
REAL_FAILED_URLS="$OUTDIR/real-failed-urls.txt"
|
||||
IGNORED_FAILED_URLS="$OUTDIR/ignored-failed-urls.txt"
|
||||
MISSING_URLS="$OUTDIR/missing-from-nexus.txt"
|
||||
REAL_MISSING_URLS="$OUTDIR/real-missing-from-nexus.txt"
|
||||
RETRY_URLS="$OUTDIR/retry-source-urls.txt"
|
||||
REPO_CANDIDATES="$OUTDIR/repository-candidates.txt"
|
||||
REPO_HINTS="$OUTDIR/repository-hints.txt"
|
||||
|
||||
mkdir -p "$M2OUT" "$LOGDIR"
|
||||
: > "$FAILED_URLS"
|
||||
: > "$REAL_FAILED_URLS"
|
||||
: > "$IGNORED_FAILED_URLS"
|
||||
: > "$MISSING_URLS"
|
||||
: > "$REAL_MISSING_URLS"
|
||||
: > "$RETRY_URLS"
|
||||
: > "$REPO_CANDIDATES"
|
||||
: > "$REPO_HINTS"
|
||||
|
||||
GRADLE_CMD=(./gradlew --no-daemon)
|
||||
|
||||
SPRING_BOOT_PLUGIN_VERSION="${SPRING_BOOT_PLUGIN_VERSION:-3.5.7}"
|
||||
DEPENDENCY_MGMT_PLUGIN_VERSION="${DEPENDENCY_MGMT_PLUGIN_VERSION:-1.1.7}"
|
||||
SPOTLESS_PLUGIN_VERSION="${SPOTLESS_PLUGIN_VERSION:-6.25.0}"
|
||||
QUERYDSL_VERSION="${QUERYDSL_VERSION:-5.0.0}"
|
||||
|
||||
MAVEN_CENTRAL_BASE="${MAVEN_CENTRAL_BASE:-https://repo1.maven.org/maven2}"
|
||||
GRADLE_PLUGIN_PORTAL_MAVEN_BASE="${GRADLE_PLUGIN_PORTAL_MAVEN_BASE:-https://plugins.gradle.org/m2}"
|
||||
OSGEO_RELEASE_BASE="${OSGEO_RELEASE_BASE:-https://repo.osgeo.org/repository/release}"
|
||||
|
||||
echo "[1/8] Running Gradle to trigger resolves..."
|
||||
"${GRADLE_CMD[@]}" \
|
||||
clean compileJava testClasses spotlessCheck build \
|
||||
-x test \
|
||||
--refresh-dependencies \
|
||||
--debug \
|
||||
2>&1 | tee "$LOGDIR/gradle-debug.log" || true
|
||||
|
||||
echo "[2/8] Extracting resolved artifact URLs from Gradle debug log..."
|
||||
grep -Eo 'https?://[^ ]+\.(pom|jar|module|aar|sha1|md5)(\?[^ ]+)?' "$LOGDIR/gradle-debug.log" \
|
||||
| sed -E 's/\?.*$//' \
|
||||
| sort -u \
|
||||
> "$ARTIFACT_URLS"
|
||||
|
||||
echo " - URLs from log: $(wc -l < "$ARTIFACT_URLS")"
|
||||
|
||||
echo "[3/8] Appending known required artifacts..."
|
||||
cat >> "$ARTIFACT_URLS" <<EOF
|
||||
# Spring Boot Gradle plugin marker + implementation
|
||||
${MAVEN_CENTRAL_BASE}/org/springframework/boot/org.springframework.boot.gradle.plugin/${SPRING_BOOT_PLUGIN_VERSION}/org.springframework.boot.gradle.plugin-${SPRING_BOOT_PLUGIN_VERSION}.pom
|
||||
${MAVEN_CENTRAL_BASE}/org/springframework/boot/spring-boot-gradle-plugin/${SPRING_BOOT_PLUGIN_VERSION}/spring-boot-gradle-plugin-${SPRING_BOOT_PLUGIN_VERSION}.pom
|
||||
${MAVEN_CENTRAL_BASE}/org/springframework/boot/spring-boot-gradle-plugin/${SPRING_BOOT_PLUGIN_VERSION}/spring-boot-gradle-plugin-${SPRING_BOOT_PLUGIN_VERSION}.module
|
||||
${MAVEN_CENTRAL_BASE}/org/springframework/boot/spring-boot-gradle-plugin/${SPRING_BOOT_PLUGIN_VERSION}/spring-boot-gradle-plugin-${SPRING_BOOT_PLUGIN_VERSION}.jar
|
||||
|
||||
# Dependency management Gradle plugin marker + implementation
|
||||
${GRADLE_PLUGIN_PORTAL_MAVEN_BASE}/io/spring/dependency-management/io.spring.dependency-management.gradle.plugin/${DEPENDENCY_MGMT_PLUGIN_VERSION}/io.spring.dependency-management.gradle.plugin-${DEPENDENCY_MGMT_PLUGIN_VERSION}.pom
|
||||
${GRADLE_PLUGIN_PORTAL_MAVEN_BASE}/io/spring/gradle/dependency-management-plugin/${DEPENDENCY_MGMT_PLUGIN_VERSION}/dependency-management-plugin-${DEPENDENCY_MGMT_PLUGIN_VERSION}.pom
|
||||
${GRADLE_PLUGIN_PORTAL_MAVEN_BASE}/io/spring/gradle/dependency-management-plugin/${DEPENDENCY_MGMT_PLUGIN_VERSION}/dependency-management-plugin-${DEPENDENCY_MGMT_PLUGIN_VERSION}.module
|
||||
${GRADLE_PLUGIN_PORTAL_MAVEN_BASE}/io/spring/gradle/dependency-management-plugin/${DEPENDENCY_MGMT_PLUGIN_VERSION}/dependency-management-plugin-${DEPENDENCY_MGMT_PLUGIN_VERSION}.jar
|
||||
|
||||
# Spotless Gradle plugin marker + implementation
|
||||
${GRADLE_PLUGIN_PORTAL_MAVEN_BASE}/com/diffplug/spotless/com.diffplug.spotless.gradle.plugin/${SPOTLESS_PLUGIN_VERSION}/com.diffplug.spotless.gradle.plugin-${SPOTLESS_PLUGIN_VERSION}.pom
|
||||
${GRADLE_PLUGIN_PORTAL_MAVEN_BASE}/com/diffplug/spotless/spotless-plugin-gradle/${SPOTLESS_PLUGIN_VERSION}/spotless-plugin-gradle-${SPOTLESS_PLUGIN_VERSION}.pom
|
||||
${GRADLE_PLUGIN_PORTAL_MAVEN_BASE}/com/diffplug/spotless/spotless-plugin-gradle/${SPOTLESS_PLUGIN_VERSION}/spotless-plugin-gradle-${SPOTLESS_PLUGIN_VERSION}.module
|
||||
${GRADLE_PLUGIN_PORTAL_MAVEN_BASE}/com/diffplug/spotless/spotless-plugin-gradle/${SPOTLESS_PLUGIN_VERSION}/spotless-plugin-gradle-${SPOTLESS_PLUGIN_VERSION}.jar
|
||||
|
||||
# Querydsl jakarta classifier artifacts
|
||||
${MAVEN_CENTRAL_BASE}/com/querydsl/querydsl-apt/${QUERYDSL_VERSION}/querydsl-apt-${QUERYDSL_VERSION}.pom
|
||||
${MAVEN_CENTRAL_BASE}/com/querydsl/querydsl-apt/${QUERYDSL_VERSION}/querydsl-apt-${QUERYDSL_VERSION}.jar
|
||||
${MAVEN_CENTRAL_BASE}/com/querydsl/querydsl-apt/${QUERYDSL_VERSION}/querydsl-apt-${QUERYDSL_VERSION}-jakarta.jar
|
||||
${MAVEN_CENTRAL_BASE}/com/querydsl/querydsl-jpa/${QUERYDSL_VERSION}/querydsl-jpa-${QUERYDSL_VERSION}.pom
|
||||
${MAVEN_CENTRAL_BASE}/com/querydsl/querydsl-jpa/${QUERYDSL_VERSION}/querydsl-jpa-${QUERYDSL_VERSION}.jar
|
||||
${MAVEN_CENTRAL_BASE}/com/querydsl/querydsl-jpa/${QUERYDSL_VERSION}/querydsl-jpa-${QUERYDSL_VERSION}-jakarta.jar
|
||||
${MAVEN_CENTRAL_BASE}/com/querydsl/querydsl-jpa-codegen/${QUERYDSL_VERSION}/querydsl-jpa-codegen-${QUERYDSL_VERSION}.pom
|
||||
${MAVEN_CENTRAL_BASE}/com/querydsl/querydsl-jpa-codegen/${QUERYDSL_VERSION}/querydsl-jpa-codegen-${QUERYDSL_VERSION}.jar
|
||||
${MAVEN_CENTRAL_BASE}/com/querydsl/querydsl-jpa-codegen/${QUERYDSL_VERSION}/querydsl-jpa-codegen-${QUERYDSL_VERSION}-jakarta.jar
|
||||
EOF
|
||||
|
||||
grep -vE '^\s*#|^\s*$' "$ARTIFACT_URLS" | sort -u > "$ARTIFACT_URLS.tmp"
|
||||
mv "$ARTIFACT_URLS.tmp" "$ARTIFACT_URLS"
|
||||
echo " - URLs after manual append: $(wc -l < "$ARTIFACT_URLS")"
|
||||
|
||||
to_relative_path() {
|
||||
local url="$1"
|
||||
|
||||
if [[ "$url" == *"/maven2/"* ]]; then
|
||||
printf '%s\n' "${url#*/maven2/}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ "$url" == *"/m2/"* ]]; then
|
||||
printf '%s\n' "${url#*/m2/}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ "$url" =~ ^https?://[^/]+/repository/[^/]+/(.+)$ ]]; then
|
||||
printf '%s\n' "${BASH_REMATCH[1]}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
is_ignorable_url() {
|
||||
local url="$1"
|
||||
|
||||
case "$url" in
|
||||
*/org.springframework.boot.gradle.plugin-*.jar)
|
||||
return 0
|
||||
;;
|
||||
*/org.springframework.boot.gradle.plugin-*.module)
|
||||
return 0
|
||||
;;
|
||||
*/io.spring.dependency-management.gradle.plugin-*.jar)
|
||||
return 0
|
||||
;;
|
||||
*/io.spring.dependency-management.gradle.plugin-*.module)
|
||||
return 0
|
||||
;;
|
||||
*/com.diffplug.spotless.gradle.plugin-*.jar)
|
||||
return 0
|
||||
;;
|
||||
*/com.diffplug.spotless.gradle.plugin-*.module)
|
||||
return 0
|
||||
;;
|
||||
*/com/querydsl/querydsl-apt/*/querydsl-apt-*.module)
|
||||
return 0
|
||||
;;
|
||||
*/com/querydsl/querydsl-jpa/*/querydsl-jpa-*.module)
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
map_upstream_url() {
|
||||
local url="$1"
|
||||
local rel
|
||||
|
||||
if ! rel="$(to_relative_path "$url")"; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
case "$rel" in
|
||||
org/geotools/*|it/geosolutions/*|javax/media/*)
|
||||
printf '%s/%s\n' "$OSGEO_RELEASE_BASE" "$rel"
|
||||
;;
|
||||
io/spring/dependency-management/*|io/spring/gradle/dependency-management-plugin/*)
|
||||
printf '%s/%s\n' "$GRADLE_PLUGIN_PORTAL_MAVEN_BASE" "$rel"
|
||||
;;
|
||||
com/diffplug/spotless/*)
|
||||
printf '%s/%s\n' "$GRADLE_PLUGIN_PORTAL_MAVEN_BASE" "$rel"
|
||||
;;
|
||||
*)
|
||||
printf '%s/%s\n' "$MAVEN_CENTRAL_BASE" "$rel"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
echo "[4/8] Collecting artifacts that were missing in Nexus during Gradle resolve..."
|
||||
grep 'Resource missing\.' "$LOGDIR/gradle-debug.log" \
|
||||
| sed -nE 's#.*\[HTTP (HEAD|GET): (https?://[^]]+)\]#\2#p' \
|
||||
| sort -u \
|
||||
> "$MISSING_URLS" || true
|
||||
|
||||
while IFS= read -r url; do
|
||||
[[ -z "$url" ]] && continue
|
||||
if is_ignorable_url "$url"; then
|
||||
printf '%s\n' "$url" >> "$IGNORED_FAILED_URLS"
|
||||
continue
|
||||
fi
|
||||
printf '%s\n' "$url" >> "$REAL_MISSING_URLS"
|
||||
mapped="$(map_upstream_url "$url" || true)"
|
||||
if [[ -n "${mapped:-}" ]] && ! is_ignorable_url "$mapped"; then
|
||||
printf '%s\n' "$mapped" >> "$RETRY_URLS"
|
||||
printf '%s\n' "${mapped%/*}" >> "$REPO_HINTS"
|
||||
fi
|
||||
done < "$MISSING_URLS"
|
||||
|
||||
sort -u "$REAL_MISSING_URLS" -o "$REAL_MISSING_URLS"
|
||||
sort -u "$IGNORED_FAILED_URLS" -o "$IGNORED_FAILED_URLS"
|
||||
sort -u "$RETRY_URLS" -o "$RETRY_URLS"
|
||||
sort -u "$REPO_HINTS" -o "$REPO_HINTS"
|
||||
|
||||
cat "$RETRY_URLS" >> "$ARTIFACT_URLS"
|
||||
sort -u "$ARTIFACT_URLS" -o "$ARTIFACT_URLS"
|
||||
|
||||
echo " - Missing URLs in Nexus log: $(wc -l < "$MISSING_URLS")"
|
||||
echo " - Real missing URLs: $(wc -l < "$REAL_MISSING_URLS")"
|
||||
echo " - Ignored missing URLs: $(wc -l < "$IGNORED_FAILED_URLS")"
|
||||
|
||||
download_one() {
|
||||
local url="$1"
|
||||
local rel
|
||||
|
||||
if is_ignorable_url "$url"; then
|
||||
printf '%s\n' "$url" >> "$IGNORED_FAILED_URLS"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if ! rel="$(to_relative_path "$url")"; then
|
||||
echo " - [SKIP] unknown URL form: $url"
|
||||
return 0
|
||||
fi
|
||||
|
||||
local dest="$M2OUT/$rel"
|
||||
mkdir -p "$(dirname "$dest")"
|
||||
|
||||
if [[ -f "$dest" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo " - [GET] $rel"
|
||||
if ! curl -fSL "$url" -o "$dest"; then
|
||||
echo "$url" >> "$FAILED_URLS"
|
||||
rm -f "$dest" 2>/dev/null || true
|
||||
if is_ignorable_url "$url"; then
|
||||
printf '%s\n' "$url" >> "$IGNORED_FAILED_URLS"
|
||||
else
|
||||
printf '%s\n' "$url" >> "$REAL_FAILED_URLS"
|
||||
echo " !! failed: $url"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
export -f to_relative_path
|
||||
export -f is_ignorable_url
|
||||
export -f download_one
|
||||
export M2OUT FAILED_URLS REAL_FAILED_URLS IGNORED_FAILED_URLS
|
||||
|
||||
echo "[5/8] Downloading artifacts into m2 layout..."
|
||||
while IFS= read -r url; do
|
||||
[[ -z "$url" ]] && continue
|
||||
download_one "$url"
|
||||
done < "$ARTIFACT_URLS"
|
||||
|
||||
sort -u "$FAILED_URLS" -o "$FAILED_URLS"
|
||||
sort -u "$REAL_FAILED_URLS" -o "$REAL_FAILED_URLS"
|
||||
sort -u "$IGNORED_FAILED_URLS" -o "$IGNORED_FAILED_URLS"
|
||||
|
||||
echo "[6/8] Extracting repository candidates declared inside downloaded POMs..."
|
||||
while IFS= read -r -d '' pom; do
|
||||
awk -v pom="$pom" '
|
||||
/<repository>/ { in_repo=1; id=""; url=""; next }
|
||||
/<\/repository>/ {
|
||||
if (in_repo && url != "" && url !~ /^file:/) {
|
||||
print url "\t" pom "\t" id
|
||||
}
|
||||
in_repo=0
|
||||
id=""
|
||||
url=""
|
||||
next
|
||||
}
|
||||
in_repo {
|
||||
if (match($0, /<id>([^<]+)<\/id>/, m)) {
|
||||
id=m[1]
|
||||
}
|
||||
if (match($0, /<url>([^<]+)<\/url>/, m)) {
|
||||
url=m[1]
|
||||
}
|
||||
}
|
||||
' "$pom"
|
||||
done < <(find "$M2OUT" -type f -name '*.pom' -print0) \
|
||||
| sort -u \
|
||||
> "$REPO_CANDIDATES"
|
||||
|
||||
echo " - POM repository candidates: $(wc -l < "$REPO_CANDIDATES")"
|
||||
|
||||
echo "[7/8] Packing seed bundle..."
|
||||
tar -czf "$OUTDIR/m2repo-seed.tgz" -C "$OUTDIR" m2repo
|
||||
ls -lh "$OUTDIR/m2repo-seed.tgz"
|
||||
|
||||
echo "[8/8] Summary"
|
||||
echo " seed bundle : $OUTDIR/m2repo-seed.tgz"
|
||||
echo " artifact URLs : $ARTIFACT_URLS"
|
||||
echo " raw missing : $MISSING_URLS"
|
||||
echo " real missing : $REAL_MISSING_URLS"
|
||||
echo " raw failed : $FAILED_URLS"
|
||||
echo " real failed : $REAL_FAILED_URLS"
|
||||
echo " ignored failed : $IGNORED_FAILED_URLS"
|
||||
echo " retry source URLs : $RETRY_URLS"
|
||||
echo " repository hints : $REPO_HINTS"
|
||||
echo " POM repo candidates : $REPO_CANDIDATES"
|
||||
98
label/label-to-review/offline_upload_to_nexus.sh
Normal file
98
label/label-to-review/offline_upload_to_nexus.sh
Normal file
@@ -0,0 +1,98 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# ====== 여기만 네 환경에 맞게 ======
|
||||
NEXUS="http://localhost:18100" # 또는 http://localhost:18100 http://172.16.4.56:18100
|
||||
REPO="maven-releases" # 가능하면 seed 전용 repo로 바꿔라 (maven-seed)
|
||||
USER="admin"
|
||||
PASS="Kamco2026!" # 실제 비번
|
||||
# ===================================
|
||||
|
||||
# 압축 풀기
|
||||
rm -rf m2repo offline-seed/m2repo
|
||||
tar -xzf m2repo-seed.tgz
|
||||
|
||||
ROOT="./m2repo"
|
||||
[ -d "$ROOT" ] || ROOT="./offline-seed/m2repo"
|
||||
[ -d "$ROOT" ] || { echo "m2repo not found"; exit 1; }
|
||||
|
||||
LOGDIR="./upload-logs"
|
||||
mkdir -p "$LOGDIR"
|
||||
OKLOG="$LOGDIR/ok.txt"
|
||||
FAILLOG="$LOGDIR/fail.txt"
|
||||
RESP="$LOGDIR/resp.tmp"
|
||||
LIST="$LOGDIR/version_dirs.txt"
|
||||
: > "$OKLOG"
|
||||
: > "$FAILLOG"
|
||||
|
||||
# 핵심: "버전 디렉토리(끝이 숫자/버전)"만 잡기 = m2repo/**/<artifact>/<version>
|
||||
# depth 고정 대신: 'pom/jar/module'이 존재하는 디렉토리만 수집
|
||||
find "$ROOT" -type f \( -name "*.pom" -o -name "*.jar" -o -name "*.module" \) -print0 \
|
||||
| xargs -0 -n1 dirname \
|
||||
| sort -u > "$LIST"
|
||||
|
||||
count="$(wc -l < "$LIST" | tr -d ' ')"
|
||||
echo "Version dirs = $count"
|
||||
[ "$count" -gt 0 ] || { echo "No version dirs found"; exit 1; }
|
||||
|
||||
upload_dir() {
|
||||
local verDir="$1"
|
||||
local rel="${verDir#${ROOT}/}"
|
||||
|
||||
# rel = group/path/artifact/version
|
||||
local groupPath artifact version groupId
|
||||
groupPath="$(echo "$rel" | awk -F/ '{for(i=1;i<=NF-2;i++) printf (i==NF-2? $i : $i "/")}')"
|
||||
artifact="$(echo "$rel" | awk -F/ '{print $(NF-1)}')"
|
||||
version="$(echo "$rel" | awk -F/ '{print $NF}')"
|
||||
groupId="${groupPath//\//.}"
|
||||
|
||||
local pom jar mod
|
||||
pom="$(ls -1 "$verDir"/*.pom 2>/dev/null | head -n 1 || true)"
|
||||
jar="$(ls -1 "$verDir"/*.jar 2>/dev/null | head -n 1 || true)"
|
||||
mod="$(ls -1 "$verDir"/*.module 2>/dev/null | head -n 1 || true)"
|
||||
|
||||
[ -z "$pom" ] && [ -z "$jar" ] && return 0
|
||||
|
||||
echo "UPLOAD: $groupId:$artifact:$version"
|
||||
|
||||
args=(
|
||||
-sS -u "$USER:$PASS"
|
||||
-X POST "$NEXUS/service/rest/v1/components?repository=$REPO"
|
||||
-F "maven2.groupId=$groupId"
|
||||
-F "maven2.artifactId=$artifact"
|
||||
-F "maven2.version=$version"
|
||||
)
|
||||
|
||||
n=1
|
||||
if [ -n "$pom" ]; then
|
||||
args+=( -F "maven2.asset${n}=@${pom}" -F "maven2.asset${n}.extension=pom" ); n=$((n+1))
|
||||
fi
|
||||
if [ -n "$jar" ]; then
|
||||
args+=( -F "maven2.asset${n}=@${jar}" -F "maven2.asset${n}.extension=jar" ); n=$((n+1))
|
||||
fi
|
||||
if [ -n "$mod" ]; then
|
||||
args+=( -F "maven2.asset${n}=@${mod}" -F "maven2.asset${n}.extension=module" ); n=$((n+1))
|
||||
fi
|
||||
|
||||
http_code="$(curl -w "%{http_code}" -o "$RESP" "${args[@]}" || true)"
|
||||
if [ "$http_code" = "204" ] || [ "$http_code" = "201" ]; then
|
||||
echo "$groupId:$artifact:$version" >> "$OKLOG"
|
||||
return 0
|
||||
else
|
||||
echo "FAIL $http_code $groupId:$artifact:$version" >> "$FAILLOG"
|
||||
sed -e 's/\r$//' "$RESP" >> "$FAILLOG" || true
|
||||
echo >> "$FAILLOG"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
fails=0
|
||||
while IFS= read -r d; do
|
||||
if ! upload_dir "$d"; then
|
||||
fails=$((fails+1))
|
||||
fi
|
||||
done < "$LIST"
|
||||
|
||||
echo "DONE. ok=$(wc -l < "$OKLOG" | tr -d ' ') fail=$fails"
|
||||
echo "OKLOG : $OKLOG"
|
||||
echo "FAILLOG: $FAILLOG"
|
||||
@@ -1,6 +1,16 @@
|
||||
pluginManagement {
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.jvm' version '2.2.20'
|
||||
// plugins {
|
||||
// id 'org.jetbrains.kotlin.jvm' version '2.2.20'
|
||||
// }
|
||||
repositories {
|
||||
maven {
|
||||
url = uri(
|
||||
System.getProperty("org.gradle.project.repoUrl")
|
||||
?: System.getenv("ORG_GRADLE_PROJECT_repoUrl")
|
||||
?: "http://172.16.4.56:18100/repository/maven-public/"
|
||||
)
|
||||
allowInsecureProtocol = true
|
||||
}
|
||||
}
|
||||
}
|
||||
rootProject.name = 'kamco-label-to-review'
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -646,7 +646,7 @@ code + .copy-button {
|
||||
<script type="text/javascript">
|
||||
function configurationCacheProblems() { return (
|
||||
// begin-report-data
|
||||
{"diagnostics":[{"locations":[{"path":"C:\\workspace\\kamco-cd-cron\\label\\review-to-geojson\\build.gradle","line":26}],"problem":[{"text":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 10."}],"contextualLabel":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated.","documentationLink":"https://docs.gradle.org/9.3.1/userguide/upgrading_version_8.html#groovy_space_assignment_syntax","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"properties-should-be-assigned-using-the-propname-value-syntax-setting-a-property-via-the-gradle-generated-propname-value-or-propname-value-syntax-in-groovy-dsl","displayName":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"solutions":[[{"text":"Use assignment ('url = <value>') instead."}]]}],"problemsReport":{"totalProblemCount":1,"buildName":"TrainingDataReview","requestedTasks":"clean build","documentationLink":"https://docs.gradle.org/9.3.1/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
|
||||
{"diagnostics":[{"locations":[{"path":"C:\\workspace\\kamco-cd-cron\\label\\review-to-geojson\\build.gradle","line":26}],"problem":[{"text":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 10."}],"contextualLabel":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated.","documentationLink":"https://docs.gradle.org/9.3.1/userguide/upgrading_version_8.html#groovy_space_assignment_syntax","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"properties-should-be-assigned-using-the-propname-value-syntax-setting-a-property-via-the-gradle-generated-propname-value-or-propname-value-syntax-in-groovy-dsl","displayName":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"solutions":[[{"text":"Use assignment ('url = <value>') instead."}]]}],"problemsReport":{"totalProblemCount":1,"buildName":"TrainingDataReview","requestedTasks":"clean compileJava testClasses spotlessCheck build","documentationLink":"https://docs.gradle.org/9.3.1/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
|
||||
// end-report-data
|
||||
);}
|
||||
</script>
|
||||
|
||||
Binary file not shown.
100
label/review-to-geojson/make_seed_bundle.sh
Normal file
100
label/review-to-geojson/make_seed_bundle.sh
Normal file
@@ -0,0 +1,100 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# ===== 설정 =====
|
||||
OUTDIR="${OUTDIR:-offline-seed}"
|
||||
M2OUT="$OUTDIR/m2repo"
|
||||
LOGDIR="$OUTDIR/logs"
|
||||
mkdir -p "$M2OUT" "$LOGDIR"
|
||||
|
||||
# Gradle이 실제로 사용하는 repo (build.gradle과 동일하게 유지)
|
||||
# - 네 build.gradle은 mavenCentral + osgeo release 를 사용
|
||||
# - seed를 만들 땐 이 repo들이 열려 있어야 함
|
||||
GRADLE_CMD=(./gradlew --no-daemon)
|
||||
|
||||
# ===== 0) 깨끗하게 시작(선택) =====
|
||||
# 너무 오래된 캐시 오염 방지용. 필요 없으면 주석 처리.
|
||||
# rm -rf "${GRADLE_USER_HOME:-$HOME/.gradle}/caches/modules-2"
|
||||
|
||||
# ===== 1) 필요한 task로 "resolve를 전부" 트리거 =====
|
||||
# - spotlessCheck 포함 (google-java-format 받게)
|
||||
# - testClasses 포함 (test deps + bom/parent 받게)
|
||||
# - build 포함 (네 build는 spotlessCheck에 dependsOn)
|
||||
# - 단, test 실행은 제외
|
||||
echo "[1/4] Running Gradle to trigger ALL resolves..."
|
||||
"${GRADLE_CMD[@]}" \
|
||||
clean compileJava testClasses spotlessCheck build \
|
||||
-x test \
|
||||
--refresh-dependencies \
|
||||
--debug \
|
||||
2>&1 | tee "$LOGDIR/gradle-debug.log"
|
||||
|
||||
# ===== 2) debug 로그에서 실제 접근한 Maven artifact URL 추출 =====
|
||||
# Gradle은 내부적으로 "resource: <url>" 같은 형태로 찍는 경우가 많아서
|
||||
# http/https URL 중 Maven2 레이아웃에 해당하는 확장자만 뽑는다.
|
||||
echo "[2/4] Extracting artifact URLs from Gradle debug log..."
|
||||
|
||||
grep -Eo 'https?://[^ ]+\.(pom|jar|module|aar|sha1|md5)(\?[^ ]+)?' "$LOGDIR/gradle-debug.log" \
|
||||
| sed -E 's/\?.*$//' \
|
||||
| sort -u \
|
||||
> "$OUTDIR/artifact-urls.txt"
|
||||
|
||||
echo " - URLs: $(wc -l < "$OUTDIR/artifact-urls.txt")"
|
||||
echo " - saved: $OUTDIR/artifact-urls.txt"
|
||||
|
||||
# ===== 3) URL들을 m2 레이아웃으로 다운로드 =====
|
||||
# URL 형태가 .../repository/maven-public/... 이거나 MavenCentral/osgeo 일 수 있음
|
||||
# 공통점: Maven2 레이아웃(/groupId/artifactId/version/...)을 그대로 가지고 있음
|
||||
echo "[3/4] Downloading artifacts into m2 layout..."
|
||||
|
||||
download_one() {
|
||||
local url="$1"
|
||||
# Maven2 레이아웃에서 groupId부터의 상대경로를 잡는다.
|
||||
# 케이스:
|
||||
# - https://repo1.maven.org/maven2/<path>
|
||||
# - https://repo.osgeo.org/repository/release/<path>
|
||||
# - http://.../repository/maven-public/<path>
|
||||
local rel
|
||||
|
||||
if [[ "$url" == *"/maven2/"* ]]; then
|
||||
rel="${url#*/maven2/}"
|
||||
elif [[ "$url" == *"/repository/"*"/"*"/"* ]]; then
|
||||
# /repository/<repo-name>/ 이후를 상대경로로
|
||||
rel="$(echo "$url" | sed -E 's#^https?://[^/]+/repository/[^/]+/##')"
|
||||
else
|
||||
# 알 수 없는 형태면 스킵(대부분 없음)
|
||||
echo " - [SKIP] unknown url form: $url"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# 저장 경로
|
||||
local dest="$M2OUT/$rel"
|
||||
mkdir -p "$(dirname "$dest")"
|
||||
|
||||
if [[ -f "$dest" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo " - [GET] $rel"
|
||||
curl -fSL "$url" -o "$dest" || {
|
||||
# sha1/md5 같은 건 서버에 없을 수 있음 → 무시
|
||||
echo " !! failed: $url"
|
||||
rm -f "$dest" 2>/dev/null || true
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
export -f download_one
|
||||
export M2OUT
|
||||
|
||||
# 순차 다운로드(안정성). 병렬 원하면 xargs -P로 바꿀 수 있음.
|
||||
while IFS= read -r url; do
|
||||
[[ -z "$url" ]] && continue
|
||||
download_one "$url"
|
||||
done < "$OUTDIR/artifact-urls.txt"
|
||||
|
||||
# ===== 4) tgz 생성 =====
|
||||
echo "[4/4] Packing seed..."
|
||||
tar -czf "$OUTDIR/m2repo-seed.tgz" -C "$OUTDIR" m2repo
|
||||
ls -lh "$OUTDIR/m2repo-seed.tgz"
|
||||
echo "OK: $OUTDIR/m2repo-seed.tgz"
|
||||
Reference in New Issue
Block a user