[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2018-05-09 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Tibor17 commented on issue #164: SUREFIRE-1383: Split IT569 in to multiple 
lifecycles
URL: https://github.com/apache/maven-surefire/pull/164#issuecomment-387940764
 
 
   @owenfarrell 
   This feature was merged and will be released in version 2.22.0. You can 
close the PR.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.22.0
>
> Attachments: scanned-dependencies-sample.zip
>
>  Time Spent: 48h
>  Remaining Estimate: 24h
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2018-05-09 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Tibor17 commented on issue #157: SUREFIRE-1383 dependenciesToScan Does Not 
Leverage Classpath Elements
URL: https://github.com/apache/maven-surefire/pull/157#issuecomment-387940702
 
 
   @owenfarrell 
   This feature was merged and will be released in version 2.22.0. You can 
close the PR.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.22.0
>
> Attachments: scanned-dependencies-sample.zip
>
>  Time Spent: 48h
>  Remaining Estimate: 24h
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2018-05-05 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Tibor17 commented on issue #157: SUREFIRE-1383 dependenciesToScan Does Not 
Leverage Classpath Elements
URL: https://github.com/apache/maven-surefire/pull/157#issuecomment-386839993
 
 
   @owenfarrell 
   @paulduffin 
   I have finished the implementation in the branch `1383` but I changed the 
algorithm in `AbstractSurefireMojo`.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 3.0.0-M1
>
> Attachments: scanned-dependencies-sample.zip
>
>  Time Spent: 48h
>  Remaining Estimate: 24h
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2018-05-05 Thread Tibor Digana (JIRA)

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

Tibor Digana commented on SUREFIRE-1383:


Created branch 
https://gitbox.apache.org/repos/asf?p=maven-surefire.git;a=shortlog;h=refs/heads/1383
CI running in 
https://builds.apache.org/job/maven-box/job/maven-surefire/job/1383/

> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 3.0.0-M1
>
> Attachments: scanned-dependencies-sample.zip
>
>  Time Spent: 48h
>  Remaining Estimate: 24h
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2018-05-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Tibor17 commented on issue #157: SUREFIRE-1383 dependenciesToScan Does Not 
Leverage Classpath Elements
URL: https://github.com/apache/maven-surefire/pull/157#issuecomment-385758575
 
 
   @owenfarrell  
   @paulduffin 
   I had this issue in several projects and compared them during the weekend.
   Today I would write the method `scanDependencies()` in 
`AbstractSurefireMojo` different way because current change looks error prone. 
I think I can make your extension a bit more straightforward.
   Let me try. I want to get this issue fixed in next release.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.1
>
> Attachments: scanned-dependencies-sample.zip
>
>  Time Spent: 48h
>  Remaining Estimate: 24h
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2018-04-22 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Tibor17 commented on issue #157: SUREFIRE-1383 dependenciesToScan Does Not 
Leverage Classpath Elements
URL: https://github.com/apache/maven-surefire/pull/157#issuecomment-383410882
 
 
   @paulduffin 
   I am just making a clone and trying to dig into this problem again after 
year.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.1
>
> Attachments: scanned-dependencies-sample.zip
>
>  Time Spent: 48h
>  Remaining Estimate: 24h
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2018-04-13 Thread Tibor Digana (JIRA)

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

Tibor Digana commented on SUREFIRE-1383:


I will have a look in the weekend. Now I can't, I am in the office.

On Fri, Apr 13, 2018 at 1:37 PM, ASF GitHub Bot (JIRA) 



> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.1
>
> Attachments: scanned-dependencies-sample.zip
>
>  Time Spent: 48h
>  Remaining Estimate: 24h
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2018-04-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

paulduffin commented on issue #157: SUREFIRE-1383 dependenciesToScan Does Not 
Leverage Classpath Elements
URL: https://github.com/apache/maven-surefire/pull/157#issuecomment-381108795
 
 
   Any progress on this?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.1
>
> Attachments: scanned-dependencies-sample.zip
>
>  Time Spent: 48h
>  Remaining Estimate: 24h
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-10-24 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user owenfarrell commented on the issue:

https://github.com/apache/maven-surefire/pull/164
  
@Tibor17 - Is this what you were thinking of when you asked to clean up the 
distinct change sets related to #157?


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.21.1
>
> Attachments: scanned-dependencies-sample.zip
>
>  Time Spent: 48h
>  Remaining Estimate: 24h
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-09-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
@owenfarrell 
Yeah, I have released 2.20.1 and I had to postpone this issue for 2.21.1.
OOM was fixed in 2.20.1 and users could not wait longer. This included 
Java9 support.
Java 9 is out and I want to release Surefire 2.21.0.Jigsaw in next few days 
which has higher priority.
And then Surefire 2.21.1 is planed for your and other pull request fixed as 
well.
Then 2.21.2 will fix a blocker issue, and then we will concentrate on 
3.0.0.M1 and JUnit5.
So this is my plan.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.21.1
>
> Attachments: scanned-dependencies-sample.zip
>
>  Time Spent: 48h
>  Remaining Estimate: 24h
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-09-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user owenfarrell commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
@Tibor17 - any updates?


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.21.1
>
> Attachments: scanned-dependencies-sample.zip
>
>  Time Spent: 48h
>  Remaining Estimate: 24h
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-09-06 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/164
  
@owenfarrell 
Sorry I could not have a look. I was busy. Now I want to finish my code and 
open it for contribution.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: scanned-dependencies-sample.zip
>
>  Time Spent: 48h
>  Remaining Estimate: 24h
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-31 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user owenfarrell commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
@Tibor17 I see what you're going for, that makes sense.

I've update my PR to just include IT contents now, with an improved IT that 
emulates a scenario where working copy changes are made (i.e. install a 
multi-module project, modify the contents to add more tests, test the modified 
contents).

If your solution gets my IT PR to pass, I think the solution will cover my 
bona fide scenarios.




> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: scanned-dependencies-sample.zip
>
>  Time Spent: 48h
>  Remaining Estimate: 24h
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-31 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
@owenfarrell 
My tests passed on this code. I have to continue to develop and refactor 
more.

List testDepends = project.getTestArtifacts();
removeReactorDependencies( session.getSortedProjects(), 
testDepends.iterator() );
List dependenciesToScan = filter( testDepends, 
asList( getDependenciesToScan() ) );
TestListResolver testFilter = getIncludedAndExcludedTests();

DefaultScanResult scanResult =  new DependencyScanner( 
dependenciesToScan, testFilter ).scan();

for ( MavenProject project : session.getSortedProjects() )
{
if ( !"pom".equals( project.getPackaging() ) && 
!containsProjectArtifact( testDepends, project ) )
{
// zapracuj getDependenciesToScan()
File reactorChildProjectOutputDir = new File( 
project.getBuild().getOutputDirectory() );
if ( reactorChildProjectOutputDir.isDirectory() )
{
DirectoryScanner scanner = new 
DirectoryScanner( reactorChildProjectOutputDir, testFilter );
scanResult = scanResult.append( scanner.scan() 
);
}
}
}



> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: scanned-dependencies-sample.zip
>
>  Time Spent: 48h
>  Remaining Estimate: 24h
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-30 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
@owenfarrell 
I will try by myself. I will let you know with new branch and we can 
discuss it.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: scanned-dependencies-sample.zip
>
>  Time Spent: 48h
>  Remaining Estimate: 24h
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user owenfarrell commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
I don't think that logic would work for my scenario.

For example:

1. Create multi-module project with a test runner JAR (a la 
`org.apache.maven.surefire:surefire-1383:1.0-SNAPSHOT`)
2. Recursively run the `install` goal over the multi-module project
3. Modify the test runner module 
(`org.apache.maven.surefire:surefire-1383-runner:1.0-SNAPSHOT`)
4. Run the `test` goal over the multi-module project

According to your logic, Surefire would prefer the already-installed 
artifact, effectively ignoring those changes made in step 3. That would put us 
right back where we started.

Using my logic, Surefire would prefer the working copy changes and execute 
accordingly. Since the existing `DependencyScanner` doesn't support classifiers 
as written, I don't think my approach is introducing any new limitations there.

`DependencyScanner.java:114`
```
String[] groupArtifact = groups.split( ":" );
if ( groupArtifact.length != 2 )
{
throw new IllegalArgumentException(...);
}
```


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

GitHub user owenfarrell opened a pull request:

https://github.com/apache/maven-surefire/pull/164

SUREFIRE-1383: Split IT569 in to multiple lifecycles

@Tibor17 - Based on [your 
comment](https://github.com/apache/maven-surefire/pull/157#issuecomment-325616922),
 is this in line with your expectations?

Refactored test passes based on contents of master.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/owenfarrell/maven-surefire IT569

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/maven-surefire/pull/164.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #164


commit 2892ec9778d05f7ecdafe87f0a9714981bdc1237
Author: Owen Farrell 
Date:   2017-08-29T12:54:25Z

SUREFIRE-1383: Split IT569 in to multiple lifecycles




> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user owenfarrell commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/157#discussion_r135778722
  
--- Diff: 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 ---
@@ -847,12 +847,31 @@ private DefaultScanResult scanDependencies()
 {
 try
 {
+DefaultScanResult scanResult = new DefaultScanResult( 
Collections.EMPTY_LIST );
+
+List dependenciesToScan = new ArrayList();
+Collections.addAll( dependenciesToScan, 
getDependenciesToScan() );
+TestListResolver includedAndExcludedTests = 
getIncludedAndExcludedTests();
+
+for ( MavenProject mavenProject : 
session.getSortedProjects() )
+{
+String groupArtifactId = mavenProject.getGroupId() + 
":" + mavenProject.getArtifactId();
+if ( dependenciesToScan.removeAll( 
Collections.singleton( groupArtifactId ) ) )
+{
+File outputDirectoryFile = new File( 
mavenProject.getBuild().getOutputDirectory() );
+DirectoryScanner scanner =
+new DirectoryScanner( outputDirectoryFile, 
includedAndExcludedTests );
+scanResult = scanResult.append( scanner.scan() );
+}
+}
+
 // @TODO noinspection unchecked, check MavenProject 3.x 
for Generics in surefire:3.0
 @SuppressWarnings( "unchecked" )
-List dependenciesToScan =
-DependencyScanner.filter( project.getTestArtifacts(), 
Arrays.asList( getDependenciesToScan() ) );
-DependencyScanner scanner = new DependencyScanner( 
dependenciesToScan, getIncludedAndExcludedTests() );
-return scanner.scan();
+List dependenciesToScanFile =
+DependencyScanner.filter( 
project.getTestArtifacts(), dependenciesToScan );
--- End diff --

Locally staged updates to reflect your generics comments. But I don't 
follow what you're asking for here.

[Per the 
documentation](https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#dependenciesToScan),
 the dependenciesToScan property doesn't support classifiers - just group ID 
and artifact ID. So I didn't add any logic around classifier resolution. Is 
that what you were expecting?


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)



[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
@owenfarrell 
It would be easier for you not to rever 569 in this PR but create a new PR 
from master. I pushed a new fix to master today. The master will be idle for 
you.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/157#discussion_r135766258
  
--- Diff: 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 ---
@@ -847,12 +847,31 @@ private DefaultScanResult scanDependencies()
 {
 try
 {
+DefaultScanResult scanResult = new DefaultScanResult( 
Collections.EMPTY_LIST );
+
+List dependenciesToScan = new ArrayList();
+Collections.addAll( dependenciesToScan, 
getDependenciesToScan() );
+TestListResolver includedAndExcludedTests = 
getIncludedAndExcludedTests();
+
+for ( MavenProject mavenProject : 
session.getSortedProjects() )
+{
+String groupArtifactId = mavenProject.getGroupId() + 
":" + mavenProject.getArtifactId();
+if ( dependenciesToScan.removeAll( 
Collections.singleton( groupArtifactId ) ) )
+{
+File outputDirectoryFile = new File( 
mavenProject.getBuild().getOutputDirectory() );
+DirectoryScanner scanner =
+new DirectoryScanner( outputDirectoryFile, 
includedAndExcludedTests );
+scanResult = scanResult.append( scanner.scan() );
+}
+}
+
 // @TODO noinspection unchecked, check MavenProject 3.x 
for Generics in surefire:3.0
 @SuppressWarnings( "unchecked" )
-List dependenciesToScan =
-DependencyScanner.filter( project.getTestArtifacts(), 
Arrays.asList( getDependenciesToScan() ) );
-DependencyScanner scanner = new DependencyScanner( 
dependenciesToScan, getIncludedAndExcludedTests() );
-return scanner.scan();
+List dependenciesToScanFile =
+DependencyScanner.filter( 
project.getTestArtifacts(), dependenciesToScan );
--- End diff --

Here some artifacts may have classifier `tests`. This means your loop may 
appear below test artifacts and only those project artifacts (gid:aid:*) should 
be excluded which appear in `getTestArtifacts()` and scans appended creating 
one aggregated scan result.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/157#discussion_r135765515
  
--- Diff: 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 ---
@@ -847,12 +847,31 @@ private DefaultScanResult scanDependencies()
 {
 try
 {
+DefaultScanResult scanResult = new DefaultScanResult( 
Collections.EMPTY_LIST );
+
+List dependenciesToScan = new ArrayList();
+Collections.addAll( dependenciesToScan, 
getDependenciesToScan() );
+TestListResolver includedAndExcludedTests = 
getIncludedAndExcludedTests();
+
+for ( MavenProject mavenProject : 
session.getSortedProjects() )
+{
+String groupArtifactId = mavenProject.getGroupId() + 
":" + mavenProject.getArtifactId();
+if ( dependenciesToScan.removeAll( 
Collections.singleton( groupArtifactId ) ) )
+{
+File outputDirectoryFile = new File( 
mavenProject.getBuild().getOutputDirectory() );
+DirectoryScanner scanner =
+new DirectoryScanner( outputDirectoryFile, 
includedAndExcludedTests );
+scanResult = scanResult.append( scanner.scan() );
+}
+}
+
 // @TODO noinspection unchecked, check MavenProject 3.x 
for Generics in surefire:3.0
 @SuppressWarnings( "unchecked" )
-List dependenciesToScan =
-DependencyScanner.filter( project.getTestArtifacts(), 
Arrays.asList( getDependenciesToScan() ) );
-DependencyScanner scanner = new DependencyScanner( 
dependenciesToScan, getIncludedAndExcludedTests() );
-return scanner.scan();
+List dependenciesToScanFile =
--- End diff --

Pls align to single line after using static import:
`import static java.lang.Thread.currentThread;
import static 
org.apache.maven.plugin.surefire.util.DependencyScanner.filter;
import static java.util.Collections.singletonMap;`


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/157#discussion_r135765205
  
--- Diff: 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 ---
@@ -847,12 +847,31 @@ private DefaultScanResult scanDependencies()
 {
 try
 {
+DefaultScanResult scanResult = new DefaultScanResult( 
Collections.EMPTY_LIST );
+
+List dependenciesToScan = new ArrayList();
--- End diff --

missing Generics on constructor. We have Java 1.6.
`List dependenciesToScan = new ArrayList();`



> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/157#discussion_r135765053
  
--- Diff: 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 ---
@@ -847,12 +847,31 @@ private DefaultScanResult scanDependencies()
 {
 try
 {
+DefaultScanResult scanResult = new DefaultScanResult( 
Collections.EMPTY_LIST );
--- End diff --

Do you use IntelliJ IDEA? It highlights the argument in yellow.
Use this:
`DefaultScanResult scanResult = new DefaultScanResult( 
Collections.emptyList() );`


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
@owenfarrell 
I found the root cause.
The dependency to scan is examined with outputDirectory, but IT 569 has 
shources to share in `src/test/java` so the artifact would match but that's the 
reason why `target/surefire-reports` is not found because your code scans 
`Surefire569RunTestFromDependencyJarsIT_shouldScanAndRunTestsInDependencyJars\testjar\target\classes`.
 I think you have to check it classifier `tests` exists which results to file 
name `testjar-0.0.1-SNAPSHOT-tests.jar`.
Additionally you should exclude packaging `pom` from the scan.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user owenfarrell commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
@Tibor17 - IT569 does not **fail** when introducing my changes. But since 
the test was written as a single lifecycle, it inadvertently uses the code I've 
introduced in this PR ([see comment above](#issuecomment-312972256)).

The only changes to IT569 were to split the single lifecycle in to multiple 
lifecycles. While there, I tried to clean up the test resources to match 
current standards/conventions.

But those changes to IT569 were to preserve its named intent: run tests 
from a dependency jar.

Looks like two options to me:
1. Leave PR as is with minimally modified IT569
2. Revert IT569 to original state, add a new version of IT569 which 
executes in multiple lifecycles and delete IT1383 (as it would be entirely 
redundant of IT569).


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
@owenfarrell
I built the project. It was ok but then I realized you modified IT 569 
which I do not like because this was a feature and I want to guarantee that old 
tests pass without modification and additionally I have to find out if our 
contributors mask some of their hidden errors. I or we have to find the root 
cause why 569 fails with your changes. We should debug your code and then fix 
it. The changes on 569 you have done are interesting but I prefer to add a new 
one very similar like "surefire-569-RunTestFromInstalledJar".


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
>Assignee: Tibor Digana
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
@JoelNGeorge 
@owenfarrell 
Pls let me run the build and next steps.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-21 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user JoelNGeorge commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
I have the exact same issue. This fix is very much appreciated. 



> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-19 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user owenfarrell commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
@Tibor17 - thoughts?


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-09 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
@owenfarrell 
I have not had yet. I am reviewing other in parallel. 
I will have a look in few days.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-08-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user owenfarrell commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
@Tibor17 - Have you had a chance to review this PR?


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-25 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user owenfarrell commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
And I got busy with other work as well. I think I found a solution that 
doesn't completely violate the pattern used by integration tests.

Long story short, the IT for SUREFIRE-569 has been updated to be completely 
independent modules. The first module leverages the flatten plugin to avoid any 
parent references, which then allows the second module to complete successfully.

The IT for SUREFIRE-1383 executes within a single process and verifies the 
updates that I've proposed.

Sorry for all the noise on the ticket - I hosed my fork while making the 
last round of updates.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-25 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

GitHub user owenfarrell reopened a pull request:

https://github.com/apache/maven-surefire/pull/157

SUREFIRE-1383 dependenciesToScan Does Not Leverage Classpath Elements

Added logic to prefer output directories of projects built as part of the 
current session.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/owenfarrell/maven-surefire master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/maven-surefire/pull/157.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #157


commit ee3b5be037c70d2a4667d786d4c487cf89ebfdfa
Author: Owen Farrell 
Date:   2017-07-26T02:30:52Z

SUREFIRE-1383: Added logic to use build output directories for session 
projects in favor of installed artifacts




> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-25 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
I have been busy with other ticket. Where did we finish. Do you need a help?


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-25 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user owenfarrell closed the pull request at:

https://github.com/apache/maven-surefire/pull/157


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-07 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user owenfarrell commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
Copying the `it-parent` POM over to the output directory as part of  
[MavenLauncher.simpleExtractResources](https://github.com/apache/maven-surefire/blob/master/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/MavenLauncher.java#L448)
 doesn't support resolving `it-parent` as part of a dependency.

Would it make sense to open a separate issue/enhancement for installing the 
`it-parent` artifact in the IT repo?


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user owenfarrell commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
I don't follow. When I run an install from any level, the 
`org.apache.maven.surefire:it-parent:1.0:pom` artifact 
(surefire-integration-tests/src/test/resources/pom.xml) does not get installed 
in to the IT repo (surefire-setup-integration-tests/target/it-repo). Am I 
missing something?

In order to execute an IT across multiple lifecycles, that POM needs to be 
installed it in to the local repository specified by failsafe.

It looks to me like every IT that references `it-parent` does so via a 
relative path (explicitly or by default). They never have to rely on the 
artifact resolver.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
No, no.
No worries.
You should build entire project `mvn install` and not the individual IT.
The ITs cannot run separately, you can trigger it from building entire 
project from root in git.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user owenfarrell commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
One workaround for this would be to install the missing `it-parent` POM as 
part of my first lifecycle (i.e. mid-test). But this seems kind of hacky.

```

surefire-569-testjar
...



org.apache.maven.plugins
maven-install-plugin



install-file

install

${project.basedir}/../pom.xml
${project.basedir}/../pom.xml







```


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user owenfarrell commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
Looking at it a bit deeper, looks like the root cause is that the 
`it-parent` POM is not installed in the IT repo. The issue isn't the dependency 
itself.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user owenfarrell commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
I've put together an integration test that can validate the execution of 
[SUREFIRE-1383](https://issues.apache.org/jira/browse/SUREFIRE-1383). And all 
is good on that front.

While I was poking around the other ITs, I tripped on the IT for 
[SUREFIRE-569](https://issues.apache.org/jira/browse/SUREFIRE-569). As written, 
the IT passes just fine. But the changes that I'm proposing make that test case 
moot - it uses the same packaging structure of 2 projects built within a single 
session.

I updated that test case to better reflect the original ask of scanning 
**_JAR_** dependencies, but that means splitting the test case execution in to 
2 separate lifecycles. When I split the single lifecycle in to 2, I'm running 
in to a dependency resolution issue. For whatever reason, the second execution 
is unable to locate artifacts installed in the IT repo as part of the first 
lifecycle.

In looking around at the other ITs, it looks like this is the only test 
case that runs an install goal and **_is then dependent on the result of that 
install_**.

Thoughts?
```
mvn 
-Dit.test=**/Surefire569RunTestFromDependencyJarsIT.java,**/Surefire1383ScanSessionDependenciesIT.java
 clean integration-test`
...
[DEBUG] Using local repository at 
//maven-surefire/surefire-integration-tests/../surefire-setup-integration-tests/target/it-repo
...
[ERROR] Failed to execute goal on project surefire-569-module1: Could not 
resolve dependencies for project 
org.apache.maven.surefire:surefire-569-module1:jar:1.0: Failed to collect 
dependencies at org.apache.maven.surefire:surefire-569-testjar:jar:tests:1.0: 
Failed to read artifact descriptor for 
org.apache.maven.surefire:surefire-569-testjar:jar:tests:1.0: Failure to find 
org.apache.maven.surefire:it-parent:pom:1.0 in 
https://repo.maven.apache.org/maven2 was cached in the local repository, 
resolution will not be reattempted until the update interval of central has 
elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
goal on project surefire-569-module1: Could not resolve dependencies for 
project org.apache.maven.surefire:surefire-569-module1:jar:1.0: Failed to 
collect dependencies at 
org.apache.maven.surefire:surefire-569-testjar:jar:tests:1.0
```


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
Would you add integration test?
See the module `surefire-integration-tests` and 
`src/test/java/org/apache/maven/surefire/its/jiras`.
It's easy. Pickup some existing test, e.g. `Surefire34SecurityManagerIT`, 
and just inherit `SurefireJUnit4IntegrationTestCase`and see the folder 
`surefire-34-securityManager` in `test/resources`.
Your IT will have the same principle. The point is to start 
`surefire-34-securityManager/pom.xml` as embedded or forked maven process from 
`Surefire34SecurityManagerIT`. I guess you want to test that multi-module Maven 
project will have own classes propagated from child modules one one dedicated 
module where Surefire has tests.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-03 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user owenfarrell commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
@Tibor17 - done. 


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/157#discussion_r125169778
  
--- Diff: 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 ---
@@ -847,12 +847,33 @@ private DefaultScanResult scanDependencies()
 {
 try
 {
+DefaultScanResult scanResult = new DefaultScanResult( 
Collections.EMPTY_LIST );
+
+List dependenciesToScanList = new ArrayList( 
Arrays.asList( getDependenciesToScan() ) );
--- End diff --

No need to create two collections with 
`List dependenciesToScanList = new ArrayList( Arrays.asList( 
getDependenciesToScan() ) );`
One modifiable collection can be with this code:
`List dependenciesToScanList = new ArrayList();`
`Collections.addAll( dependenciesToScanList, getDependenciesToScan() );`


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/157#discussion_r125169703
  
--- Diff: 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 ---
@@ -847,12 +847,33 @@ private DefaultScanResult scanDependencies()
 {
 try
 {
+DefaultScanResult scanResult = new DefaultScanResult( 
Collections.EMPTY_LIST );
+
+List dependenciesToScanList = new ArrayList( 
Arrays.asList( getDependenciesToScan() ) );
+TestListResolver includedAndExcludedTests = 
getIncludedAndExcludedTests();
+
+for ( MavenProject mavenProject : 
session.getSortedProjects() )
+{
+String groupArtifactId = new StringBuilder( 
mavenProject.getGroupId() ).append( ":" )
+.append( mavenProject.getArtifactId() 
).toString();
+if ( dependenciesToScanList.removeAll( 
Collections.singleton( groupArtifactId ) ) )
+{
+File outputDirectoryFile = new File( 
mavenProject.getBuild().getOutputDirectory() );
+DirectoryScanner scanner =
+new DirectoryScanner( outputDirectoryFile, 
includedAndExcludedTests );
+scanResult = scanResult.append( scanner.scan() );
+}
+
+}
+
 // @TODO noinspection unchecked, check MavenProject 3.x 
for Generics in surefire:3.0
 @SuppressWarnings( "unchecked" )
-List dependenciesToScan =
-DependencyScanner.filter( project.getTestArtifacts(), 
Arrays.asList( getDependenciesToScan() ) );
-DependencyScanner scanner = new DependencyScanner( 
dependenciesToScan, getIncludedAndExcludedTests() );
-return scanner.scan();
+List dependenciesToScanFileList =
--- End diff --

`dependenciesToScanFileList` already contains plural. Pls rename 
`dependenciesToScanFileList` to `dependenciesToScanFile`.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/157#discussion_r125169693
  
--- Diff: 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 ---
@@ -847,12 +847,33 @@ private DefaultScanResult scanDependencies()
 {
 try
 {
+DefaultScanResult scanResult = new DefaultScanResult( 
Collections.EMPTY_LIST );
+
+List dependenciesToScanList = new ArrayList( 
Arrays.asList( getDependenciesToScan() ) );
--- End diff --

`dependenciesToScanList` already contains plural. Pls rename 
`dependenciesToScanList` to `dependenciesToScan`.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/157#discussion_r125169671
  
--- Diff: 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 ---
@@ -847,12 +847,33 @@ private DefaultScanResult scanDependencies()
 {
 try
 {
+DefaultScanResult scanResult = new DefaultScanResult( 
Collections.EMPTY_LIST );
+
+List dependenciesToScanList = new ArrayList( 
Arrays.asList( getDependenciesToScan() ) );
+TestListResolver includedAndExcludedTests = 
getIncludedAndExcludedTests();
+
+for ( MavenProject mavenProject : 
session.getSortedProjects() )
+{
+String groupArtifactId = new StringBuilder( 
mavenProject.getGroupId() ).append( ":" )
--- End diff --

Pls concatenate as follows `mavenProject.getGroupId() + ":" + 
mavenProject.getArtifactId()`.
This is simple and `javac` would compile to StringBuilder anyway, but 
longer in sources.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-07-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/157
  
Pls squash both commits to one.


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-06-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SUREFIRE-1383:
--

GitHub user owenfarrell opened a pull request:

https://github.com/apache/maven-surefire/pull/157

SUREFIRE-1383 dependenciesToScan Does Not Leverage Classpath Elements

Added logic to prefer output directories of projects built as part of the 
current session.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/owenfarrell/maven-surefire master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/maven-surefire/pull/157.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #157


commit 12bda800118b25397adbe15a3b21547aa1df2aeb
Author: Owen Farrell 
Date:   2017-06-29T21:12:34Z

SUREFIRE-1383: Added logic to use build output directories for session 
projects in favor of installed artifacts

commit 524bb05d2aad37ef90458408607085456e1f774a
Author: Owen Farrell 
Date:   2017-06-29T21:14:38Z

SUREFIRE-1383: Added logic to use build output directories for session 
projects in favor of installed artifacts




> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-06-10 Thread Tibor Digana (JIRA)

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

Tibor Digana commented on SUREFIRE-1383:


[~owen.farrell]
I have removed versions 3.0.x and 2.2.1 because you did not provide a fix.

> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: Backlog
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-06-07 Thread Tibor Digana (JIRA)

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

Tibor Digana commented on SUREFIRE-1383:


[~owen.farrell]
Did you assign the version 2.20.1?
Would you open git pull request with fix and test?

> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: 3.0, 2.20.1
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SUREFIRE-1383) dependenciesToScan Does Not Leverage Classpath Elements

2017-06-06 Thread Owen Farrell (JIRA)

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

Owen Farrell commented on SUREFIRE-1383:


The maven-compiler-plugin seems to handle this issue just fine when building a 
list of classpathEntries.

I'm not a Maven API SME by any means, so the below is a bit of a guess in terms 
of approach:
* AbstractSurefireMojo.scanDependencies needs to inspect projects on the 
MavenSession
* For each scanned dependency that is found in the session
** Translate the dependency in to a MavenProject instance (by leveraging the 
session?)
** Get the build output directory for the project
** Create new directory scanner that wraps the build output directory of the 
project


> dependenciesToScan Does Not Leverage Classpath Elements 
> 
>
> Key: SUREFIRE-1383
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1383
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 2.20
>Reporter: Owen Farrell
> Fix For: 3.0, 2.20.1
>
> Attachments: scanned-dependencies-sample.zip
>
>
> The  configuration attribute relies solely on installed 
> artifacts. This is an issue when the targeted dependencies were built as part 
> of the current session. The net result is that stale artifacts are used (i.e. 
> if the dependency has changed since it was last installed) or the tests are 
> not executed at all (if the dependency has not been previously installed.
> Attached is a sample project that illustrates this issue:
> Given I have a multi-module project
>And the first module built includes test classes as part of the project 
> artifact
>And subsequent modules scan the first for unit tests to execute
> When I execute the _*test*_ goal (prior to any install)
> Then the build should succeed
>And tests should be executed with each module



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)