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

Add dependency check mojo #4595

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,38 @@ All of the following variants to specify a version are now possible:
</target>
```

## new `check-dependencies` mojo

When using version ranges there is a certain risk that one actually uses some methods from never release and it goes unnoticed.

There is now a new `tycho-baseline:dependencies mojo` that analyze the compiled class files for used method references and compares them to
the individual artifacts that match the version range. To find these versions it uses the maven metadata stored in P2 as well as
the eclipse-repository index to find possible candidates.

If any problems are found, these are written by default to `target/versionProblems.txt` but one can also enable to update the version ranges
according to the discovered problems, a configuration for this might look like this:

```xml
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-baseline-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<id>checkit</id>
<goals>
<goal>check-dependencies</goal>
</goals>
<configuration>
<applySuggestions>true</applySuggestions>
</configuration>
</execution>
</executions>
</plugin
```

Because this can be a time consuming task to fetch all matching versions it is best placed inside a profile that is enabled on demand.

## new `update-manifest` mojo

It is recommended to use as the lower bound the dependency the code was
Expand Down
14 changes: 14 additions & 0 deletions tycho-baseline-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,27 @@
<artifactId>asciitable</artifactId>
<version>0.3.2</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.7.1</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.ecore</artifactId>
<version>2.38.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-metadata</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
Expand Down
Loading
Loading