Monday 8 July 2019

Maven: project.build.directory


This is continuation to my previous post, Super POM.

As you see the super pom file, you can see many variables like below.
<directory>${project.basedir}/target</directory>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<finalName>${project.artifactId}-${project.version}</finalName>
<testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<scriptSourceDirectory>${project.basedir}/src/main/scripts</scriptSourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>

'project.build.directory' represents the directory where all the build artifacts goes. These properties values change from project to project.

To see actual values of these properties, go to the pom file location of your project and execute the command 'mvn help:effective-pom'.


Above properties will be replaced with actual values.

<sourceDirectory>C:\Users\krishna\Documents\Study\Maven\projects\helloWorld\src\main\java</sourceDirectory>
<scriptSourceDirectory>C:\Users\krishna\Documents\Study\Maven\projects\helloWorld\src\main\scripts</scriptSourceDirectory>
<testSourceDirectory>C:\Users\krishna\Documents\Study\Maven\projects\helloWorld\src\test\java</testSourceDirectory>
<outputDirectory>C:\Users\krishna\Documents\Study\Maven\projects\helloWorld\target\classes</outputDirectory>
<testOutputDirectory>C:\Users\krishna\Documents\Study\Maven\projects\helloWorld\target\test-classes</testOutputDirectory>



Previous                                                    Next                                                    Home

No comments:

Post a Comment