Uploaded image for project: 'Maven Site Plugin'
  1. Maven Site Plugin
  2. MSITE-751

Site generation fails with source directory not found on multimodule project

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Cannot Reproduce
    • 3.4
    • None
    • Maven 3, multi module
    • None
    • Windows 10, JDK8, Maven 3.3.3
    • Important

    Description

      When building site for a multimodule project maven site:site fails with the following error:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.4:site (default-cli) on project eclipse: Execution default-cli of goal org.apache.maven.plugins:maven-site-plugin:3.4:site failed: Source directory 'D:\test-project\target\classes' not exists -> [Help 1]
      

      The parent project has packaging pom so it hasn't any target/classes directory inside it ...But test-project has several subprojects inside it that in turn have packaging type set to jar.

      My maven configuration is as follows:

      [...]
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.4</version>
                <dependencies>
                  <dependency>
                    <groupId>org.apache.maven.doxia</groupId>
                    <artifactId>doxia-module-markdown</artifactId>
                    <version>1.6</version>
                  </dependency>
                </dependencies>
                <configuration>
                  <inputEncoding>UTF-8</inputEncoding>
                  <outputEncoding>UTF-8</outputEncoding>
                </configuration>
              </plugin>
      [...]
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <configuration>
                  <failOnError>false</failOnError>
                </configuration>		  
                <executions>
                  <execution>
                    <id>aggregate</id>
                    <goals>
                      <goal>aggregate</goal>
                    </goals>
                    <phase>site</phase>
                  </execution>
                </executions>
              </plugin>
      [..]
        <distributionManagement>
          <site>
            <id>test-project-site</id>
            <name>My Site</name>
            <url>file:///var/www/html/test-project</url>
          </site>
        </distributionManagement>
      
      [...]
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            pedrovieirasilva Pedro Vieira Silva
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: