Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cross-project-issues-dev] winning configuration for compare-version-with-baselines

Hello,

For those who have issues with baseline comparison during build.

I started from platform releng snippet from here https://github.com/eclipse/eclipse.platform.releng.aggregator/blob/master/eclipse-platform-parent/pom.xml#L543

        <plugin>
          <groupId>org.eclipse.tycho</groupId>
          <artifactId>tycho-p2-plugin</artifactId>
          <version>${tycho.version}</version>
          <configuration>
            <baselineMode>warn</baselineMode>
            <baselineReplace>all</baselineReplace>
            <baselineRepositories>
              <repository>
                <url>${comparator.repo}</url>
              </repository>
            </baselineRepositories>
            <ignoredPatterns>
              <pattern>META-INF/ECLIPSE_.RSA</pattern>
              <pattern>META-INF/ECLIPSE_.SF</pattern>
            </ignoredPatterns>
<generateDownloadStatsProperty>true</generateDownloadStatsProperty>
          </configuration>
        </plugin>

but it doesn't respect the "ignoredPatterns" value and gives me things like:

Error:  Failed to execute goal org.eclipse.tycho.extras:tycho-p2-extras-plugin:2.0.0:compare-version-with-baselines (compare-attached-artifacts-with-release) on project org.eclipse.passage.lic.floating: Baseline and reactor have same fully qualified version, but with different content
Error:  different
Error:     META-INF/ECLIPSE_.RSA: present in baseline only
Error:     META-INF/ECLIPSE_.SF: present in baseline only
Error:
Error:  -> [Help 1]

Finally I found that org.eclipse.tycho.zipcomparator.internal.ZipComparatorImpl reads the settings from another place https://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/tycho-artifactcomparator/src/main/java/org/eclipse/tycho/zipcomparator/internal/ZipComparatorImpl.java#n69 :

            Xpp3Dom pluginConfiguration = (Xpp3Dom) execution.getPlugin().getConfiguration();
            if (pluginConfiguration != null) {
                Xpp3Dom ignoredPatternsNode = pluginConfiguration.getChild("ignoredPatterns");

And after moving the settings it started to work as expected, here is what is working for me (moved configuration to the root of executing plugin)

            <plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-p2-extras-plugin</artifactId>
                <version>${tycho.version}</version>
                <executions>
                    <execution>
<id>compare-attached-artifacts-with-release</id>
                        <goals>
<goal>compare-version-with-baselines</goal>
                        </goals>
                        <configuration>
<skip>${compare-version-with-baselines.skip}</skip>
                            <baselines>
<baseline>${released.baseline}</baseline>
                            </baselines>
                            <comparator>zip</comparator>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                        <ignoredPatterns>
<pattern>META-INF/ECLIPSE_.RSA</pattern>
<pattern>META-INF/ECLIPSE_.SF</pattern>
                        </ignoredPatterns>
                </configuration>
            </plugin>


Good luck,
AF


Back to the top