• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

properties in the same folder

 
Isaac Ferguson
Ranch Hand
Posts: 922
2
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I need a relative path in order to say my app that my properties file is in the same folder that the report which read them

I have a POM.xml and in there I have written something like

<report.receipt.properties.file.name></report.receipt.properties.file.name>

Any idea, please?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
378
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you express the directory in relation to your project root (basedir)?
 
Tim Holloway
Saloon Keeper
Posts: 18300
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the nature of this properties file? Is it used as part of the build process or is it used in the product that is produced?

Maven has an extreme dislike for absolute file paths when they're used by Maven itself. Maven was designed in such a way that if you do a "mvn clean" to remove superflous files, zip up the project directory, email it to someone on the other side of the planet, that the unzipped copy should be immediately buildable regardless of what OS or filesystem arrangements the recipient has. All Maven source paths are designed to be located at or below the project directory.

For a properties file used by the product of a Maven build, Maven could not care less where it's located nor whether the path is relative or absolute. That part is left up to whatever application installation process is used.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic