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

jgit extension produces warnings with Maven 3.9.0 #2080

Closed
Bananeweizen opened this issue Feb 9, 2023 · 4 comments · Fixed by #2685
Closed

jgit extension produces warnings with Maven 3.9.0 #2080

Bananeweizen opened this issue Feb 9, 2023 · 4 comments · Fixed by #2685

Comments

@Bananeweizen
Copy link
Contributor

Maven 3.9.0 seems to validate entries in the configuration blocks against the declared parameters of a mojo. I've found some deprecated/removed config entries in other plugins that way. Unfortunately Tycho throws warnings simply because of not declared parameters in the jgit timestamp provider. The code of that plugin just XML-parses the configuration block instead of defining any parameters.

[INFO] ------------------< com.etas.common:com.etas.commons >------------------
[INFO] Building com.etas.commons 5.6.5-SNAPSHOT                          [2/51]
[INFO]   from ..\..\plugins\com.etas.commons\pom.xml
[INFO] ---------------------------[ eclipse-plugin ]---------------------------
[WARNING] Parameter 'jgit.dirtyWorkingTree' is unknown for plugin 'tycho-packaging-plugin:2.7.5:build-qualifier (default-build-qualifier)'
[WARNING] Parameter 'jgit.ignore' is unknown for plugin 'tycho-packaging-plugin:2.7.5:build-qualifier (default-build-qualifier)'
[WARNING] Parameter 'jgit.dirtyWorkingTree' is unknown for plugin 'tycho-packaging-plugin:2.7.5:validate-id (default-validate-id)'
[WARNING] Parameter 'jgit.ignore' is unknown for plugin 'tycho-packaging-plugin:2.7.5:validate-id (default-validate-id)'
[WARNING] Parameter 'jgit.dirtyWorkingTree' is unknown for plugin 'tycho-packaging-plugin:2.7.5:validate-version (default-validate-version)'
[WARNING] Parameter 'jgit.ignore' is unknown for plugin 'tycho-packaging-plugin:2.7.5:validate-version (default-validate-version)'
[WARNING] Parameter 'jgit.dirtyWorkingTree' is unknown for plugin 'tycho-packaging-plugin:2.7.5:update-consumer-pom (default-update-consumer-pom)'
[WARNING] Parameter 'jgit.ignore' is unknown for plugin 'tycho-packaging-plugin:2.7.5:update-consumer-pom (default-update-consumer-pom)'
[WARNING] Parameter 'jgit.dirtyWorkingTree' is unknown for plugin 'tycho-packaging-plugin:2.7.5:package-plugin (default-package-plugin)'
[WARNING] Parameter 'jgit.ignore' is unknown for plugin 'tycho-packaging-plugin:2.7.5:package-plugin (default-package-plugin)'

To reproduce, any configuration block like in the example here will be sufficient: https://wiki.eclipse.org/Tycho/Reproducible_Version_Qualifiers
I'm not sure where exactly the warning is raised, and whether there is something to disable this new feature.

@laeubi
Copy link
Member

laeubi commented Feb 10, 2023

Tycho currently not support maven 3.9x
Also as jgit is an extension, we can't effectively declare its parameters here, I have already evaluated some alternatives but have not yet had the time to work on it.

@laeubi laeubi changed the title Warnings with Maven 3.9.0 jgit extension produces warnings with Maven 3.9.0 Feb 10, 2023
@laeubi laeubi added this to the 4.0 milestone Feb 10, 2023
@laeubi
Copy link
Member

laeubi commented Feb 10, 2023

See also:

@Bananeweizen
Copy link
Contributor Author

Honestly, does the jgit timestamp provider really have to be an extension of the default provider? Can't we make that 2 alternative implementations, and let people user either default or jgit? That way both could have their own configs, people would not be confused with dependencies, the POM would look much cleaner. And since 4.0 is a breaking change anyway, this would be fine to do now.
Code sharing between them would be as simple as before, given they live in the same repo.

@laeubi
Copy link
Member

laeubi commented Feb 10, 2023

Currently it is an extension of tycho-packaging-plugin (because otherwise the tycho-packaging-plugin can't "see" other plugins due to maven design)... but I recently generalized the concept of of Plugins contributing extensions by using the org.eclipse.tycho.helper.PluginRealmHelper that tricks maven a bit in this regard... so if you like give it a try it will include the following steps:

  1. Create a tycho-jgit-plugin
  2. Create a JGitTimeStampProviderMojo
  3. Implement a BuildTimestampProvider that reads the config from the mojo by checking the maven project (there will soon be a new helper to even simplify that)
  4. Adjust places where BuildTimestampProvider is used to use the PluginRealmHelper
  5. Add a release note and adjust integrationtests and examples, possibly clean up things (e.g. MojoExecution might not be required anymore as the config do not longer come from the tycho-packaging-plugin)

If you need any further help let me know.

@laeubi laeubi removed this from the 4.0 milestone May 31, 2023
laeubi added a commit to laeubi/tycho that referenced this issue Jul 30, 2023
Maven 3.9 complains of "missing" parameters even if we need them for the
jgit provider.

This adds two dummy parameters so maven is happy again.

Fix eclipse-tycho#2080
laeubi added a commit that referenced this issue Jul 31, 2023
Maven 3.9 complains of "missing" parameters even if we need them for the
jgit provider.

This adds two dummy parameters so maven is happy again.

Fix #2080
github-actions bot pushed a commit that referenced this issue Jul 31, 2023
Maven 3.9 complains of "missing" parameters even if we need them for the
jgit provider.

This adds two dummy parameters so maven is happy again.

Fix #2080

(cherry picked from commit 0ffb59a)
laeubi added a commit that referenced this issue Jul 31, 2023
Maven 3.9 complains of "missing" parameters even if we need them for the
jgit provider.

This adds two dummy parameters so maven is happy again.

Fix #2080

(cherry picked from commit 0ffb59a)
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

Successfully merging a pull request may close this issue.

2 participants