Conversation
…perty
Use build-helper-maven-plugin's regex-property goal to set buildUrl property
natively in Maven by replacing backslashes with forward slashes. This handles
Windows path separators cross-platform without needing external scripts.
- Update build-helper-maven-plugin from 3.0.0 to 3.6.0
- Add regex-property execution in initialize phase to normalize buildUrl
- Change default property from file:/${user.dir} to
file://${maven.multiModuleProjectDirectory} which properly points to the
root project directory (where .mvn/ lives)
- Remove -DbuildUrl overrides from CI workflows
Agent-Logs-Url: https://github.com/eclipse-rcptt/org.eclipse.rcptt/sessions/0345c90f-0fc8-4641-a53b-bf27683b9cfd
Co-authored-by: basilevs <650857+basilevs@users.noreply.github.com>
|
@copilot the build fails on Windows: |
… component error On Windows, file://C:/path is invalid because C: is parsed as the URI authority. Fixed by using file:/// (3 slashes) in the regex-property value. Added a second regex-property execution to collapse file://// to file:/// on Linux where the path already starts with /. Agent-Logs-Url: https://github.com/eclipse-rcptt/org.eclipse.rcptt/sessions/db3d2482-3789-48f4-ae44-a6666fb80e91 Co-authored-by: basilevs <650857+basilevs@users.noreply.github.com>
... Fixed in bd1c952. The issue was that |
|
@copilot |
|
@copilot Why are backslashes not processed? |
The build-helper-maven-plugin regex-property runs during 'initialize' phase, but Tycho reads p2 repository URLs during 'afterProjectsRead' (before any lifecycle phase). The regex-property fix was never applied before Tycho consumed the property value. Fix: Use OS-activated Maven profiles resolved during POM construction: - unix-build-url: file:// + /path = file:///path (valid) - windows-build-url: file:/// + C:/path = file:///C:/path (valid) Keep the regex-property execution as a safety net for backslash normalization for consumers that run after the initialize phase. Agent-Logs-Url: https://github.com/eclipse-rcptt/org.eclipse.rcptt/sessions/e5c72614-5989-44aa-b281-279bc3b492bf Co-authored-by: basilevs <650857+basilevs@users.noreply.github.com>
... Fixed in e784de6. The root cause was that The new approach uses OS-activated Maven profiles that are resolved during POM construction (before Tycho):
Both produce valid file URIs with empty authority (3 slashes after |
... That log is from bd1c952, which used two
This was already fixed in e784de6, which uses OS-activated profiles instead. Profiles are resolved during POM construction (before Tycho), so the Could you test with the latest commit e784de6? |
|
Verified e784de6 manually by launching |
buildUrlwas defined asfile:/${user.dir}which produces invalid file URIs on Windows (backslashes in URLs), requiring external scripts to pass-DbuildUrl=file://\pwd`` as a workaround.Changes
file:/${user.dir}tofile://${maven.multiModuleProjectDirectory}— uses Maven's built-in root directory property (anchored to.mvn/location), consistent across all submodulesbuildUrlprefix before Tycho reads p2 repository URLs:unix-build-url(activated on Unix/macOS): usesfile://prefix — combined with the leading/from absolute paths, producesfile:///path(valid 3-slash URI)windows-build-url(activated on Windows): usesfile:///prefix — combined with the drive letter, producesfile:///C:/path(valid 3-slash URI with empty authority)build-helper-maven-pluginregex-propertyexecution ininitializephase replaces\with/as a safety net for consumers running after the initialize phasebuild-helper-maven-pluginfrom 3.0.0 to 3.6.0-DbuildUrl=file://\pwd`` from workflow commands since the property is now self-containedWhy profiles instead of regex-property alone?
Tycho reads p2 repository URLs during
afterProjectsRead, which runs before any Maven lifecycle phase (includinginitialize). Plugin-based property normalization viabuild-helper-maven-pluginruns too late. OS-activated profiles are resolved during POM construction, ensuring the correct URI prefix is available when Tycho processes repository definitions.On Linux,
maven.multiModuleProjectDirectorystarts with/sofile://+/pathyields a validfile:///path. On Windows,file:///+C:/pathyields a validfile:///C:/pathwith empty authority.