Bug 507700 - Pomless should support .test plugins as well or make it configurable
Summary: Pomless should support .test plugins as well or make it configurable
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Christoph Laeubrich CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2016-11-17 14:02 EST by Jens Kuebler CLA
Modified: 2021-04-28 16:51 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Kuebler CLA 2016-11-17 14:02:49 EST
Currently the .tests suffix is supported for test plugins. It would be nice if this in configurable or does span to plugins ending with .test as well
Comment 1 Jan Sievers CLA 2016-11-18 02:59:28 EST
regarding configuration of the pomless extension, there is a limitation in maven core, details see bug 492819

As long as it can't be configured, just rename your test plugins to end with ".tests" if you want to use pomless. test plugins should be dependency leaves i.e. no other plugin should depend on a test plugin so the rename should be trivial.
Comment 2 Jens Kuebler CLA 2016-11-18 05:01:46 EST
I agree that renaming is a viable solution but
I have looked at the source and it is rather a minor extension to add .test as well for the time being as it is such a common case.

For us changing the id would unfortunately amount to hundreds of plugins that would have to be renamed potentially breaking tests that were somehow relying on the id.
Comment 3 Eclipse Genie CLA 2018-02-07 06:26:23 EST
New Gerrit change created: https://git.eclipse.org/r/116842
Comment 4 Ralph Gerbig CLA 2018-02-07 06:29:26 EST
I uploaded a patch which could solve the issue. 

https://git.eclipse.org/r/#/c/116842/

This currently checks the ending of a plugin id. It could, however, be extended to also check regex.
Comment 5 Jan Sievers CLA 2018-02-08 04:30:14 EST
(In reply to Ralph Gerbig from comment #4)
> I uploaded a patch which could solve the issue. 
> 
> https://git.eclipse.org/r/#/c/116842/
> 
> This currently checks the ending of a plugin id. It could, however, be
> extended to also check regex.

simply allowing ".test" in addition to ".tests" is much easier and pragmatic I think. Making it generally configurable boils down to maven core bug

https://issues.apache.org/jira/browse/MNG-5897

and I would not like to work around this in Tycho code.
Comment 6 Ralph Gerbig CLA 2018-02-14 10:51:36 EST
Allowing ".test" and ".tests" will declare plug-ins as test plug-ins which have not been test plug-ins before the change. Will this break existing builds?
Comment 7 Jan Sievers CLA 2018-02-19 03:59:16 EST
(In reply to Ralph Gerbig from comment #6)
> Allowing ".test" and ".tests" will declare plug-ins as test plug-ins which
> have not been test plug-ins before the change. Will this break existing
> builds?

yes it's an incompatible change and should be announced in the release notes.

the worst thing that could happen due to this change is that you have a plugin ending in .test and you don't want it to be of packaging type eclipse-test-plugin

then you can either 

- use a different plugin suffix (neither .test nor .tests )
- use explicit pom.xml for this plugin (don't use pomless)
Comment 8 Ralph Gerbig CLA 2018-02-19 06:46:33 EST
We are going to rename our plug-ins to ".tests". This is better than introducing a incompatible change.
Comment 9 Christoph Laeubrich CLA 2019-08-23 14:11:18 EDT
.test and .tests will soon be supported, as mentioned this does not makes more problem as the current guess, but it should be extended in the future, maybe together with https://bugs.eclipse.org/bugs/show_bug.cgi?id=532575 we could even made this configurable by e.g. adding a property to builds.properties:

tycho.testplugin = true/false

that overrides default behaviour
Comment 10 Eclipse Genie CLA 2019-08-26 08:10:15 EDT
New Gerrit change created: https://git.eclipse.org/r/148339
Comment 11 Christoph Laeubrich CLA 2019-08-26 08:12:05 EDT
Additionally to support test/tests suffix one can define the property:

tycho.pomless.testbundle=true/false

in build.properties to override the default behavior.
Comment 13 Mickael Istria CLA 2019-08-26 09:36:16 EDT
I think this deserve a note in the release notes.
Comment 14 Christoph Laeubrich CLA 2019-08-26 09:47:09 EDT
done: https://wiki.eclipse.org/Tycho/Release_Notes/1.5#Pomless_Build