Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

multi-module project and ${basedir} placeholder

I have a multi module project with the following structure:

-parent
   -module1
   -module2
   -src
      -main
         -javadoc
             -stylesheet.css
   -pom.xml

I want to configure the javadoc plugin in the parent POM. But, I need to specify the path to the stylesheet.css file. So, I use the value ${basedir}\src\main\javadoc\stylesheet.css. But, when I look at the effective POM for the child modules, the ${basedir} is replaced by the absolute path of the child module base directory, but there is no src/main/javadoc/stylesheet.css file there. Copying the stylesheet.css file in the child modules is not a solution, I think.

Thanks

like image 454
manash Avatar asked Sep 10 '25 23:09

manash


1 Answers

${basedir} (short for ${project.basedir}) is a directory where project's pom.xml file resides. Therefore, for child modules this property is going to contain paths to module1 and module2 directories correspondingly.

If you want to configure javadoc plugin in the parent pom.xml so it would be effective for child modules, you should use ../src/main/javadoc/stylesheet.css.

like image 165
Andrew Logvinov Avatar answered Sep 13 '25 17:09

Andrew Logvinov