Menu

Allow multiple source directories in maven plugin

Help
Steve
2013-06-27
2013-07-31
  • Steve

    Steve - 2013-06-27

    Hi,
    I have a large pl/sql based application and the PL/SQL source is split over multiple directories, one for each schema.

    For example
    db/schema1/
    db/schema2/
    db/schema3/

    However I can only provide one directory and it wont work if its the top level directory (i.e. db/). I have been able to specify multiple file types fine, ie <includes>.pks,.pkb</includes> but cannot do the same for the directories as it fails.

    Could you please enhance the config so that a list can be provided, either via comma separated, or via config in the pom,
    perhaps:

    <sourcedirectories>
    </sourcedirectories>

    db/schema1
    db/schema2
    db/schema3

    Thanks.

     

    Last edit: Steve 2013-06-27
    • Stuart Turton

      Stuart Turton - 2013-07-21

      That sounds like a good idea - I will look at how the Maven plugin passes parameters to the Ant task.

      Amended:
      The Ant task was well-behaved and allowed multiple directories.
      The Maven plugin was passing in one directory

       

      Last edit: Stuart Turton 2013-07-22
  • David Grimberg

    David Grimberg - 2013-06-28

    I have not tried the above scenario just yet, but I also work in an environment where our code is split across multiple directories. In our case the code is split by functional module rather than schema, though for the most part that amounts to the same thing.

    It would be great if PLDoc would support a more incremental build scenario. Then each Module, or Schema could be processed individually adding (or updating) the requisite object documents and the higher level documentation indexes would be updated to reflect the new and/or changed lower level documentation pages.

     
    • Stuart Turton

      Stuart Turton - 2013-07-21

      I had a quick look at incremental update whilst seeing how to merge PLSCOPE information into the generated application.xml.

      I will look at this after checking out the multi-directory Maven plugin

       
  • Stuart Turton

    Stuart Turton - 2013-07-22

    Try version 3.0.1.

    Before 3.0.0, only one source directory could be specified.

        <configuration>
            <applicationTitle>project-name</applicationTitle>
            <sourceDirectory>src/sql</sourceDirectory>
            <includes>*.sql</includes>
            <reportOutputDirectory>target/site/apidocs</reportOutputDirectory>
        </configuration>                    
    

    Version 3.0.0 and greater allow the normal Maven mechanism for specifying files for processing, allowing multiple source directories and multiple include/exclude filters:-

        <configuration>
            <applicationTitle>project-name</applicationTitle>
            <fileSets>
              <fileSet>
                <directory>samples</directory>
                <include>**/*.sql</include>
              </fileSet>
              <fileSet>
                <directory>/Development/pldoc/trunk/src/test/resources/testinput</directory>
                <includes>
                  <include>**/*.fnc</include>
                  <include>**/*.prc</include>
                  <include>**/*.trg</include>
                  <include>**/*.pks</include>
                  <include>**/*.pkb</include>
                  <include>**/*.tps</include>
                  <include>**/*.tpb</include>
                </includes>
                <excludes>
                  <exclude>**/*Java*</exclude>
                  <exclude>**/*_fully_reserved*</exclude>
                </excludes>
              </fileSet>
            </fileSets>
            <reportOutputDirectory>target/site/apidocs</reportOutputDirectory>
        </configuration>                    
    
     
  • Steve

    Steve - 2013-07-30

    Great, thanks Stuart! However I'm getting an error when I plug this into my pom:

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.1:site (default-cli) on project xxx: failed to get report for net.sourceforge.pldoc:maven-pldoc-plugin: Plugin net.sourceforge.pldoc:maven-pldoc-plugin:3.0.1 or one of its dependencies could not be resolved: Failed to collect dependencies for net.sourceforge.pldoc:maven-pldoc-plugin:jar:3.0.1 (): No versions available for net.sourceforge.pldoc:pldoc:jar:[1.5.5,) within specified range -> [Help 1]

    This is my build block in my POM:

    ~~~~~
    <build>
    <plugins>
    <plugin>
    <groupid>org.apache.maven.plugins</groupid>
    <artifactid>maven-site-plugin</artifactid>
    <version>3.0</version>
    <configuration>
    <reportplugins>
    <plugin>
    <groupid>net.sourceforge.pldoc</groupid>
    <artifactid>maven-pldoc-plugin</artifactid>
    <version>3.0.1</version>
    <configuration>
    <applicationtitle>XXX</applicationtitle>
    <filesets>
    <fileset>
    <directory>DatabaseSource/CoreSource</directory>
    <includes>
    <include>/*.pks</include>
    <include></include>
    /*.pkb
    </includes>
    </fileset>
    </filesets>
    </configuration>
    </plugin>
    </reportplugins>
    </configuration>
    </plugin>
    </plugins>
    </build>
    ~~~~~

     
  • Steve

    Steve - 2013-07-30

    Hi again,
    The issue is the open ended version in the deployed pom. I edited this locally to just 1.5.5 and it works. Maven 3.0.3. Could you deploy a version of the plugin that doesnt have the open ended version? Cheers.

     
  • Stuart Turton

    Stuart Turton - 2013-07-30

    I'll take a look at it.

    What Maven version?

    Whilst I am doing that, can you try "mvn -U" - I remember a similar problem at work after a release. I recall that the problem disappeared 3? ways:-

    1) explicitly add the pldoc dependency
    2) mvn -U (update snapshots)
    3) wait - the problem seemed to solve itself, possibly by the Maven cache timing out

    How I explicitly add the pldoc dependency


      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.2</version>
        <dependencies>
          <dependency>
           <groupId>com.oracle</groupId>
           <artifactId>ojdbc14</artifactId>
           <version>10.2.0.4</version>
          </dependency>
      <dependency>
       <groupId>net.sourceforge.pldoc</groupId>
       <artifactId>pldoc</artifactId>
       <version>1.4.1</version>
      </dependency>
        </dependencies>
        <configuration>
    

    ...

     
  • Steve

    Steve - 2013-07-31

    Ok yep, forcing the update via -U solved it, and I didnt need to specify the pldoc version. Nice. This was Maven 3.0.3 btw. I encountered a couple of other errors and will file them separately.
    Thanks for this Stuart.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.