Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target platform "system_property" feature doesn't work for update sites with addIUTargetRepositoryReferences #3040

Closed
kysmith-csg opened this issue Nov 14, 2023 · 4 comments

Comments

@kysmith-csg
Copy link
Contributor

I have in my target definition file an update site defined as

    <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
        <repository location="https://download.eclipse.org/releases/${system_property:eclipse.version}"/
        <unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
    </location>

where eclipse.version is defined in .mvn/maven.config as -Declipse.version=2023-09. This works fine during target resolution and the build will succeed.

In the same reactor build, I have an update site project that has the following property set:

            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-p2-repository-plugin</artifactId>
                <version>${tycho.version}</version>
                <configuration>
                    <addIUTargetRepositoryReferences>true</addIUTargetRepositoryReferences>
                </configuration>
            </plugin>

If I have the location site defined with the ${system_property:eclipse.version}, the build will now fail because I guess this mojo doesn't resolve the properties and just uses the url literally.

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-repository-plugin:4.0.4:assemble-repository (default-assemble-repository) on project com.example.my-project: Execution default-assemble-repository of goal org.eclipse.tycho:tycho-p2-repository-plugin:4.0.4:assemble-repository failed: Illegal character in path at index 39: https://download.eclipse.org/releases/${system_property:eclipse.version}

@laeubi
Copy link
Member

laeubi commented Nov 15, 2023

@kysmith-csg thats an interesting case indeed, do you like to try providing a PR for that (at best
with an integration-test to demonstrate the issue)?

We should already have an abstraction about the variable resolving itself but if you have any problems let me know.

@kysmith-csg
Copy link
Contributor Author

#3042

@laeubi
Copy link
Member

laeubi commented Nov 21, 2023

I assume this is fixed now.

@kysmith-csg Can youtry the current tycho snapshot build if you still see any issues?

@laeubi laeubi closed this as completed Nov 21, 2023
@kysmith-csg
Copy link
Contributor Author

It does work now with the latest 4.0.5-SNAPSHOT now, thanks.

content.xml in my eclipse-repository project

  <references size='4'>
    <repository uri='https://download.eclipse.org/releases/2023-09' url='https://download.eclipse.org/releases/2023-09' type='1' options='1'/>

target-platform.target

  4     <locations>
  5         <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
  6             <repository location="https://download.eclipse.org/releases/${system_property:eclipse.version}"/>

maven.config

-Declipse.version=2023-09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants