apupier commented on code in PR #26838:
URL: https://github.com/apache/camel/pull/26838#discussion_r4092284390
##########
.github/workflows/dep-check.yml:
##########
@@ -159,9 +160,35 @@ jobs:
# EndpointRouteBuilderLoaderSupport.java against an empty
target/classes directory.
# An empty stub installed here lets any downstream module that
declares
# camel-endpointdsl-support as a dependency resolve it during
graph construction.
+ # • camel-core:test-jar: camel-management, camel-main, and several
components declare
+ # camel-core:test-jar (classifier=tests) as a test-scope
dependency. pilot:dependencies
+ # 0.4.0 resolves all declared artifacts before analysing —
including test-scope ones —
+ # even when -Dpilot.skipTestScope=true is set. The test-jar is
only produced at the
+ # 'package' phase, so it is never present in a clean CI
checkout. An empty stub
+ # satisfies pilot's resolution step; its contents are irrelevant
because test-scope
+ # analysis is skipped entirely.
VERSION=$(mvn help:evaluate -Dexpression=project.version -q
-DforceStdout)
mkdir -p /tmp/stub-classes
jar cf /tmp/stub.jar -C /tmp/stub-classes .
+ # Install camel-core:test-jar stub (classifier=tests).
+ # Uses a separate install-file invocation because the main loop
below handles plain JARs only.
+ cat > /tmp/stub-core-tests.pom << EOF
+ <project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-core</artifactId>
+ <version>${VERSION}</version>
+ </project>
+ EOF
+ mvn install:install-file \
+ -Dfile=/tmp/stub.jar \
+ -DpomFile=/tmp/stub-core-tests.pom \
+ -DgroupId=org.apache.camel \
+ -DartifactId=camel-core \
+ -Dversion="${VERSION}" \
+ -Dclassifier=tests \
+ -Dpackaging=jar \
+ --no-transfer-progress --batch-mode -q
Review Comment:
this sounds like a dirty workaround. Woudl it be possible to fix the dep
resolution or the skip of the resolution directly in the pilot maven plugin?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]