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

resolveCiFriendliesOnly parses the version of dependency in profile when it is managed by dependencyManagement #156

Closed
yangnuoyu opened this issue May 28, 2020 · 2 comments

Comments

@yangnuoyu
Copy link
Contributor

I was testing the resolveCiFriendliesOnly mode when I had a pom with in whose version was managed by of its parent pom. The results showed that the of will be parse into it when the is active. Here is the example:
In the parent pom:

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>javax.annotation-api</artifactId>
                <version>1.3.2</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

In the child pom:

    <profiles>
        <profile>
            <id>test</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>javax.annotation</groupId>
                    <artifactId>javax.annotation-api</artifactId>
                </dependency>
            </dependencies>
        </profile>
    </profiles>

What I expected is that, the flattened pom will keep the element unchanged but the result is as this:

  <profiles>
    <profile>
      <id>test</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <dependencies>
        <dependency>
          <groupId>javax.annotation</groupId>
          <artifactId>javax.annotation-api</artifactId>
          <version>1.3.2</version>
          <scope>compile</scope>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

This may be a similar problem of #103 but I do not see a similar case like this. Since resolveCiFriendliesOnly mode only resolves variables revision, sha1 and changelist and keeps everything else, I think it should be a problem.

@salehsquared
Copy link
Contributor

This issue appears to be fixed by PR #152.

@slawekjaranowski
Copy link
Member

Mentioned issue and PR are closed / merged.
I assume that is fixed.
If no - please reopen.

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

3 participants