0 Replies Latest reply: Oct 31, 2012 9:05 AM by 922766 RSS

    Maven Plugin not accepting values from a property file.

    922766
      Hi,

      I want to create javadocs using maven.
      It works fine when i provide all the absolute paths in the pom.
      But when i try to provide paths by reading a property file then the maven-javadoc-plugin does not get the paths from this property file.

      The property file is defined as mentioned in below format:
      src_mvn_consult_framework_dir=/var/lib/hudson/jobs/CZ_NAB_CORE_MVN_CHECKOUT/workspace/middleware/projects/framework
      src_mvn_consult_module_dir=/var/lib/hudson/jobs/CZ_NAB_CORE_MVN_CHECKOUT/workspace/middleware/projects/module
      src_mvn_consult_appx_dir=/var/lib/hudson/jobs/CZ_NAB_CORE_MVN_CHECKOUT/workspace/middleware/projects/appx
      src_mvn_consult_client_dir=/var/lib/hudson/jobs/CZ_NAB_CORE_MVN_CHECKOUT/workspace/middleware/projects/client
      src_mvn_consult_app_webservice_dir=/var/lib/hudson/jobs/CZ_NAB_CORE_MVN_CHECKOUT/workspace/middleware/application/com.ofss.fc.cz.nab.webservices
      src_mvn_consult_app_middleware_dir=/var/lib/hudson/jobs/CZ_NAB_CORE_MVN_CHECKOUT/workspace/middleware/application/com.ofss.fc.cz.nab.middleware

      Calling this property file in the pom like:
      <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>properties-maven-plugin</artifactId>
           <version>1.0-alpha-2</version>
           <executions>
           <execution>
           <phase>initialize</phase>
           <goals>
      <goal>read-project-properties</goal>
           </goals>
           <configuration>
      <files>
           <file>/var/build/consult/maven/cz_javadoc-config.properties</file>
      </files>
           </configuration>
           </execution>
           </executions>
      </plugin>

      Finally we are using keys defined in property file in pom like:
      <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                <sourcepath>${src_mvn_consult_framework_dir};
                     ${src_mvn_consult_module_dir};
                     ${src_mvn_consult_appx_dir};
                     ${src_mvn_consult_client_dir};
                     ${src_mvn_consult_app_webservice_dir};
                     ${src_mvn_consult_app_middleware_dir};
                </sourcepath>
                </configuration>
      </plugin>

      Please suggest how we can get the value of keys defined in the property file in POM

      Thanks for your invaluable support