We have a maven build run through TFS 2015 which has JUnit tests we'd like to publish to TFS.
When I check the Publish to VSO/TFS
option the build fails with the following error:
2016-09-29T10:11:57.1224537Z [INFO] BUILD SUCCESS
2016-09-29T10:11:57.1224537Z [INFO] ------------------------------------------------------------------------
2016-09-29T10:11:57.1224537Z [INFO] Total time: 4:57.219s
2016-09-29T10:11:57.1224537Z [INFO] Finished at: Thu Sep 29 11:11:56 BST 2016
2016-09-29T10:11:57.3876605Z [INFO] Final Memory: 87M/287M
2016-09-29T10:11:57.3876605Z [INFO] ------------------------------------------------------------------------
2016-09-29T10:11:58.6980912Z ##[error]The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
2016-09-29T10:11:58.6980912Z No JUnit test results files were found matching pattern 'C:\TfsAgents\Agent1\_work\20\s', so publishing JUnit test results is being skipped.
When I uncheck the box the build works (but obviously we don't see any test results).
Is there any way to resolve this kind of issue without bodging the names of the test files or smashing up the folder the structure?
At an enterprise level our folder structure is lengthy as are some of our class names. So it's a major task to restructure these.