Documentation is your friend

If you are a good developer, you know the value of documentation. Anything you write should not be cryptic or understood only by you. Let it be a Java, .NET, C++, or a Maven project, the documentation is your friend. A code with a good documentation is extremely readable. If any configuration you add into an application POM file is not self-descriptive, make sure that you add at least a single line comment to explain what it does.

Here are some good examples from the Apache Axis2 project:

<profile>
  <id>java16</id>
  <activation>
    <jdk>1.6</jdk>
  </activation>
  <!-- JDK 1.6 build still use JAX-WS 2.1 because integratingJava endorsed mechanism with Maven is bit of complex-->
  <properties>
    <jaxb.api.version>2.1</jaxb.api.version>
    <jaxbri.version>2.1.7</jaxbri.version>
    <jaxws.tools.version>2.1.3</jaxws.tools.version>
    <jaxws.rt.version>2.1.3</jaxws.rt.version>
  </properties>
</profile>
<plugin>
  <artifactId>maven-assembly-plugin</artifactId>
  <!-- Minimum required version here is 2.2-beta-4 because org.apache:apache:7 uses the runOnlyAtExecutionRoot parameter, which is not supported in earlierversions
  <version>2.2-beta-5</version>
  <configuration>
    <!-- Workaround for MASSEMBLY-422 / MASSEMBLY-449-->
    <archiverConfig>
      <fileMode>420</fileMode>
      <!-- 420(dec)=644(oct)-->
      <directoryMode>493</directoryMode><!--493(dec)=755(oct)-->
      <defaultDirectoryMode>493</defaultDirectoryMode>
    </archiverConfig>
  </configuration>
</plugin>
<!-- No chicken and egg problem here because the plugin doesn't expose any extension. We can always use the version from the current build.-->
<plugin>
  <groupId>org.apache.axis2</groupId>
  <artifactId>axis2-repo-maven-plugin</artifactId>
  <version>${project.version}</version>
</plugin>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.185.196