0

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.

Esther Fan - MSFT
  • 8,276
  • 4
  • 27
  • 25
dougajmcdonald
  • 19,231
  • 12
  • 56
  • 89
  • The Culprit is simply TFS which is based on Windows which has such limitation...That's it...BTW: Why are you publishing unit tests to TFS ? (Web Site ?) – khmarbaise Sep 29 '16 at 11:13
  • Yeah via the web portal, it's actually an option in the GUI in TFS. – dougajmcdonald Sep 29 '16 at 11:16
  • Why not simply using an Apache Web Server where you deploy the site after the build via scp/ssh or ftp (old style webDav)...or Create an Apache Web Server where the site is provided by an underlying SVN repo which you can deploy via [maven-scm-publish-plugin](https://maven.apache.org/plugins/maven-scm-publish-plugin/) also working with Git... – khmarbaise Sep 29 '16 at 11:31
  • 1
    @khmarbaise perhaps I could re-write the app in cobol and deploy it to myspace via a cron job....Your comment isn't really solving the issue at hand I'm afraid. – dougajmcdonald Sep 29 '16 at 12:32
  • Sure but I can't change TFS nor Windows... – khmarbaise Sep 29 '16 at 13:16

1 Answers1

0

Possible duplicate with TFS Build error - "The specified path, file name, or both are too long..."

More ways for you reference: Best way to resolve file path too long exception

The best and safe way still is save path space.

Community
  • 1
  • 1
PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62