[jira] [Commented] (SUREFIRE-1266) Specifying groups shouldn't require junit on classpath if no test classes

2022-04-01 Thread Ciprian Ciubotariu (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17515787#comment-17515787
 ] 

Ciprian Ciubotariu commented on SUREFIRE-1266:
--

[~tibordigana] I noticed the resolution here got to won't fix so i assumed the 
maintainers rejected it

> Specifying groups shouldn't require junit on classpath if no test classes
> -
>
> Key: SUREFIRE-1266
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1266
> Project: Maven Surefire
>  Issue Type: Improvement
>Affects Versions: 2.19.1
> Environment: Windows 7, Oracle JDK 1.8.0_40, Maven 3.3.3
>Reporter: Anders Hammar
>Priority: Major
>
> Test framework: junit 4.8+
> I have a scenario where we want to configure the groups parameter in a parent 
> so that it doesn't have to be specified in all modules. However, not all 
> modules have test classes and therefore no dependency on junit is specified 
> in those projects. What then happens is that m-surefire-p fails with:
> {quote}
> groups/excludedGroups require TestNG or JUnit48+ on project test classpath
> {quote}
> This can be worked around by specifying skipTests on those projects, but it's 
> a bit cumbersome.
> It would be nice if surefire could detect that there are no test classes 
> (src/test/main is empty) and therefore the project should just be ignored. 
> However, I guess there could be test classes in a dependency so that might 
> not be as easy.
> Possibly the solution could be to not fail the surefire execution if 
> groups/excludedGroups is set but TestNG or JUnit 4.8+ is not on the 
> classpath, but issue a warning message and ignoring it?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-1266) Specifying groups shouldn't require junit on classpath if no test classes

2022-03-31 Thread Tibor Digana (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17515620#comment-17515620
 ] 

Tibor Digana commented on SUREFIRE-1266:


[~cipi]
Why you closed it?
Now we are free because there is a pending Release Vote on the mailing list.
I have noticed your ticket in the email.

> Specifying groups shouldn't require junit on classpath if no test classes
> -
>
> Key: SUREFIRE-1266
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1266
> Project: Maven Surefire
>  Issue Type: Improvement
>Affects Versions: 2.19.1
> Environment: Windows 7, Oracle JDK 1.8.0_40, Maven 3.3.3
>Reporter: Anders Hammar
>Priority: Major
>
> Test framework: junit 4.8+
> I have a scenario where we want to configure the groups parameter in a parent 
> so that it doesn't have to be specified in all modules. However, not all 
> modules have test classes and therefore no dependency on junit is specified 
> in those projects. What then happens is that m-surefire-p fails with:
> {quote}
> groups/excludedGroups require TestNG or JUnit48+ on project test classpath
> {quote}
> This can be worked around by specifying skipTests on those projects, but it's 
> a bit cumbersome.
> It would be nice if surefire could detect that there are no test classes 
> (src/test/main is empty) and therefore the project should just be ignored. 
> However, I guess there could be test classes in a dependency so that might 
> not be as easy.
> Possibly the solution could be to not fail the surefire execution if 
> groups/excludedGroups is set but TestNG or JUnit 4.8+ is not on the 
> classpath, but issue a warning message and ignoring it?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-1266) Specifying groups shouldn't require junit on classpath if no test classes

2022-03-31 Thread Ciprian Ciubotariu (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17515616#comment-17515616
 ] 

Ciprian Ciubotariu commented on SUREFIRE-1266:
--

Closed the PR following the won't fix resolution here

> Specifying groups shouldn't require junit on classpath if no test classes
> -
>
> Key: SUREFIRE-1266
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1266
> Project: Maven Surefire
>  Issue Type: Improvement
>Affects Versions: 2.19.1
> Environment: Windows 7, Oracle JDK 1.8.0_40, Maven 3.3.3
>Reporter: Anders Hammar
>Priority: Major
>
> Test framework: junit 4.8+
> I have a scenario where we want to configure the groups parameter in a parent 
> so that it doesn't have to be specified in all modules. However, not all 
> modules have test classes and therefore no dependency on junit is specified 
> in those projects. What then happens is that m-surefire-p fails with:
> {quote}
> groups/excludedGroups require TestNG or JUnit48+ on project test classpath
> {quote}
> This can be worked around by specifying skipTests on those projects, but it's 
> a bit cumbersome.
> It would be nice if surefire could detect that there are no test classes 
> (src/test/main is empty) and therefore the project should just be ignored. 
> However, I guess there could be test classes in a dependency so that might 
> not be as easy.
> Possibly the solution could be to not fail the surefire execution if 
> groups/excludedGroups is set but TestNG or JUnit 4.8+ is not on the 
> classpath, but issue a warning message and ignoring it?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-1266) Specifying groups shouldn't require junit on classpath if no test classes

2021-11-13 Thread Ciprian Ciubotariu (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17443192#comment-17443192
 ] 

Ciprian Ciubotariu commented on SUREFIRE-1266:
--

[~slawekjaranowski] can you please point to the new Jira issue, so I can 
monitor when the fix goes in?

> Specifying groups shouldn't require junit on classpath if no test classes
> -
>
> Key: SUREFIRE-1266
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1266
> Project: Maven Surefire
>  Issue Type: Improvement
>Affects Versions: 2.19.1
> Environment: Windows 7, Oracle JDK 1.8.0_40, Maven 3.3.3
>Reporter: Anders Hammar
>Priority: Major
>
> Test framework: junit 4.8+
> I have a scenario where we want to configure the groups parameter in a parent 
> so that it doesn't have to be specified in all modules. However, not all 
> modules have test classes and therefore no dependency on junit is specified 
> in those projects. What then happens is that m-surefire-p fails with:
> {quote}
> groups/excludedGroups require TestNG or JUnit48+ on project test classpath
> {quote}
> This can be worked around by specifying skipTests on those projects, but it's 
> a bit cumbersome.
> It would be nice if surefire could detect that there are no test classes 
> (src/test/main is empty) and therefore the project should just be ignored. 
> However, I guess there could be test classes in a dependency so that might 
> not be as easy.
> Possibly the solution could be to not fail the surefire execution if 
> groups/excludedGroups is set but TestNG or JUnit 4.8+ is not on the 
> classpath, but issue a warning message and ignoring it?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-1266) Specifying groups shouldn't require junit on classpath if no test classes

2021-11-13 Thread Slawomir Jaranowski (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17443171#comment-17443171
 ] 

Slawomir Jaranowski commented on SUREFIRE-1266:
---

Why closed with won't fix ...

I will try resolve this issue in another way - maybe more generic.

We have method 
{{org.apache.maven.plugin.surefire.AbstractSurefireMojo#createProviders}} which 
detect providers (such test framework is available on project classpath), 
I will run this method first and when have empty provider list don't do any 
other action such searching test classes and so on ...
 

> Specifying groups shouldn't require junit on classpath if no test classes
> -
>
> Key: SUREFIRE-1266
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1266
> Project: Maven Surefire
>  Issue Type: Improvement
>Affects Versions: 2.19.1
> Environment: Windows 7, Oracle JDK 1.8.0_40, Maven 3.3.3
>Reporter: Anders Hammar
>Priority: Major
>
> Test framework: junit 4.8+
> I have a scenario where we want to configure the groups parameter in a parent 
> so that it doesn't have to be specified in all modules. However, not all 
> modules have test classes and therefore no dependency on junit is specified 
> in those projects. What then happens is that m-surefire-p fails with:
> {quote}
> groups/excludedGroups require TestNG or JUnit48+ on project test classpath
> {quote}
> This can be worked around by specifying skipTests on those projects, but it's 
> a bit cumbersome.
> It would be nice if surefire could detect that there are no test classes 
> (src/test/main is empty) and therefore the project should just be ignored. 
> However, I guess there could be test classes in a dependency so that might 
> not be as easy.
> Possibly the solution could be to not fail the surefire execution if 
> groups/excludedGroups is set but TestNG or JUnit 4.8+ is not on the 
> classpath, but issue a warning message and ignoring it?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-1266) Specifying groups shouldn't require junit on classpath if no test classes

2021-08-21 Thread Ciprian Ciubotariu (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17402698#comment-17402698
 ] 

Ciprian Ciubotariu commented on SUREFIRE-1266:
--

I have created github PR https://github.com/apache/maven-surefire/pull/388  - 
please instruct me if you want me to open a new issue on this subject.

> Specifying groups shouldn't require junit on classpath if no test classes
> -
>
> Key: SUREFIRE-1266
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1266
> Project: Maven Surefire
>  Issue Type: Improvement
>Affects Versions: 2.19.1
> Environment: Windows 7, Oracle JDK 1.8.0_40, Maven 3.3.3
>Reporter: Anders Hammar
>Priority: Major
>
> Test framework: junit 4.8+
> I have a scenario where we want to configure the groups parameter in a parent 
> so that it doesn't have to be specified in all modules. However, not all 
> modules have test classes and therefore no dependency on junit is specified 
> in those projects. What then happens is that m-surefire-p fails with:
> {quote}
> groups/excludedGroups require TestNG or JUnit48+ on project test classpath
> {quote}
> This can be worked around by specifying skipTests on those projects, but it's 
> a bit cumbersome.
> It would be nice if surefire could detect that there are no test classes 
> (src/test/main is empty) and therefore the project should just be ignored. 
> However, I guess there could be test classes in a dependency so that might 
> not be as easy.
> Possibly the solution could be to not fail the surefire execution if 
> groups/excludedGroups is set but TestNG or JUnit 4.8+ is not on the 
> classpath, but issue a warning message and ignoring it?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1266) Specifying groups shouldn't require junit on classpath if no test classes

2021-08-21 Thread Ciprian Ciubotariu (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17402696#comment-17402696
 ] 

Ciprian Ciubotariu commented on SUREFIRE-1266:
--

I have hit this situation too, exactly as described by the author of this 
ticket. I have prepared a fix for it, together with a demo project. I think 
this is worth including in the plugin, for the following reasons:

1. It follows the principle of least surprise, since it matches the same 
expectation that surefire promotes when groups are disabled, i.e it skips 
projects that don't have any tests, thus they don't have a junit dependency.
2. It eliminates the imposition of an unneeded policy over our code, i.e adding 
a dependency that won't be used anyway if the project does not have any tests. 
Given the code, this is the result of an abstraction leak, due to the way 
surefire verifies parameters before deciding if the project does have any 
tests, or if those tests require junit/test-ng.

The existing code does check that the test directory does exist, and disabled 
the verification of the junit dependency if the folder is missing. Annoyingly, 
IDEs tend to create empty test directories that linger within the project, and 
getting teams of people to neatly remove them seems like a low value use of 
time.

I will continue on with the pull request

> Specifying groups shouldn't require junit on classpath if no test classes
> -
>
> Key: SUREFIRE-1266
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1266
> Project: Maven Surefire
>  Issue Type: Improvement
>Affects Versions: 2.19.1
> Environment: Windows 7, Oracle JDK 1.8.0_40, Maven 3.3.3
>Reporter: Anders Hammar
>Priority: Major
>
> Test framework: junit 4.8+
> I have a scenario where we want to configure the groups parameter in a parent 
> so that it doesn't have to be specified in all modules. However, not all 
> modules have test classes and therefore no dependency on junit is specified 
> in those projects. What then happens is that m-surefire-p fails with:
> {quote}
> groups/excludedGroups require TestNG or JUnit48+ on project test classpath
> {quote}
> This can be worked around by specifying skipTests on those projects, but it's 
> a bit cumbersome.
> It would be nice if surefire could detect that there are no test classes 
> (src/test/main is empty) and therefore the project should just be ignored. 
> However, I guess there could be test classes in a dependency so that might 
> not be as easy.
> Possibly the solution could be to not fail the surefire execution if 
> groups/excludedGroups is set but TestNG or JUnit 4.8+ is not on the 
> classpath, but issue a warning message and ignoring it?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1266) Specifying groups shouldn't require junit on classpath if no test classes

2016-08-14 Thread Tibor Digana (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15420268#comment-15420268
 ] 

Tibor Digana commented on SUREFIRE-1266:


[~afloom]
You can open PR in github, but the solution proposal should be
If _testClassesDirectory_ does not exist or is empty AND other-classpath is 
empty THEN skip plugin.
The _other-classpath_ is integesting, see this 
http://maven.apache.org/surefire/maven-surefire-plugin/examples/configuring-classpath.html
See _AbstractSurefireMojo.java_ but I am not sure if this is so easy to do.

> Specifying groups shouldn't require junit on classpath if no test classes
> -
>
> Key: SUREFIRE-1266
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1266
> Project: Maven Surefire
>  Issue Type: Improvement
>Affects Versions: 2.19.1
> Environment: Windows 7, Oracle JDK 1.8.0_40, Maven 3.3.3
>Reporter: Anders Hammar
>
> Test framework: junit 4.8+
> I have a scenario where we want to configure the groups parameter in a parent 
> so that it doesn't have to be specified in all modules. However, not all 
> modules have test classes and therefore no dependency on junit is specified 
> in those projects. What then happens is that m-surefire-p fails with:
> {quote}
> groups/excludedGroups require TestNG or JUnit48+ on project test classpath
> {quote}
> This can be worked around by specifying skipTests on those projects, but it's 
> a bit cumbersome.
> It would be nice if surefire could detect that there are no test classes 
> (src/test/main is empty) and therefore the project should just be ignored. 
> However, I guess there could be test classes in a dependency so that might 
> not be as easy.
> Possibly the solution could be to not fail the surefire execution if 
> groups/excludedGroups is set but TestNG or JUnit 4.8+ is not on the 
> classpath, but issue a warning message and ignoring it?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)