axel3rd / mpg-coach-bot

MPG (Mon Petit Gazon) coach bot, to automate and optimize weekly actions
https://axel3rd.github.io/mpg-coach-bot/
MIT License
23 stars 8 forks source link

Build fail : NotLinkException on mpg-coach-bot/target/test-classes/mpg.properties #184

Closed mansuydejean closed 3 years ago

mansuydejean commented 3 years ago

An exception is thrown when building if /mpg-coach-bot/target/test-classes/mpg.properties is not a symbolic link, but a real file [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources (default-testResources) on project mpg-coach-bot: /home/shoe/mpg-coach-bot/target/test-classes/mpg.properties -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources (default-testResources) on project mpg-coach-bot: /home/shoe/mpg-coach-bot/target/test-classes/mpg.properties ... Caused by: org.apache.maven.plugin.MojoExecutionException: /home/shoe/mpg-coach-bot/target/test-classes/mpg.properties ... Caused by: org.apache.maven.shared.filtering.MavenFilteringException: /home/shoe/mpg-coach-bot/target/test-classes/mpg.properties
... Caused by: java.nio.file.NotLinkException: /home/shoe/mpg-coach-bot/target/test-classes/mpg.properties

mansuydejean commented 3 years ago

If the file mpg-coach-bot/target/test-classes/mpg.properties is not a symbolic link, then build will fail. This info could simply be added to the README.md

axel3rd commented 3 years ago

If the file mpg-coach-bot/target/test-classes/mpg.properties is not a symbolic link, then build will fail.

Not sure to understand the use case with a symbolic link relation 🤔.

What is your scenario to produce the bug ?

This snippet seems work correctly:

git clone https://github.com/axel3rd/mpg-coach-bot.git
cd mpg-coach-bot/
echo "fake" > src/test/resources/mpg.properties
mvn test-compile
axel3rd commented 3 years ago

@mansuydejean : is /home/shoe/mpg-coach-bot directory and/or src/test/resources/mpg.properties file a symbolic link from somewhere ??

mansuydejean commented 3 years ago

/home/shoe/mpg-coach-bot is not a link but is a link src/test/resources/mpg.properties to ../../mpg.properties

axel3rd commented 3 years ago

but is a link src/test/resources/mpg.properties to ../../mpg.properties

Hummm, perhaps linked to MRESOURCES-237, but released version plugin not available.

The most simple solution is perhaps NOT having a symlink here 😁 ?

mansuydejean commented 3 years ago

yes, perhaps... simply add a warning in README.md and we can close this