Uploaded image for project: 'ngrinder'
  1. ngrinder
  2. NGRINDER-649

Groovy Maven Project should support src/main/groovy directory

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.2.2
    • Component/s: controller
    • Labels:
      None

      Description

      If user creates a Maven Groovy Project, he should be able to have its Groovy code stored in following folders:

      • src/main/java - supported
      • src/main/groovy - not supported
      • src/test/java - not supported
      • src/test/groovy - not supported

      Snippet from documentation:

      {code}
      When a script is selected in the performance test configuration page, the controller automatically detects whether the script is under the folder ${name}/src/main/java and there is pom.xml in the base folder. If the controller detects it, the controller will copy the files in the ${name}/src/main/resources and ${name}/src/main/java folder recursively into controller’s distribution preparation folder before distributing them to agents. The below figure illustrates how each folder in svn are copied to the distribution preparation folder.{code}

      Current Groovy Maven structure does not conform to preferred Groovy Maven project standards.

        Activity

        Hide
        junoyoon JunHo Yoon added a comment -

        I've fixed this by supporting belows

        • src/main/java
        • src/main/groovy

        nGrinder won't support belows

        • test/main/java
        • test/main/groovy
        Show
        junoyoon JunHo Yoon added a comment - I've fixed this by supporting belows src/main/java src/main/groovy nGrinder won't support belows test/main/java test/main/groovy
        Hide
        junoyoon JunHo Yoon added a comment -

        Fixed

        Show
        junoyoon JunHo Yoon added a comment - Fixed
        Hide
        kpiwko Karel Piwko added a comment -

        Thanks for the quick fix JunHo.

        In your comment, you meant src/test/

        {java,groovy} instead of test/main/{java,groovy}

        won't be supported? While the latter indeed does not make any sense, the first is default layout for Maven project, tests are always located in src/test/... while the application is located in src/main/...

        Show
        kpiwko Karel Piwko added a comment - Thanks for the quick fix JunHo. In your comment, you meant src/test/ {java,groovy} instead of test/main/{java,groovy} won't be supported? While the latter indeed does not make any sense, the first is default layout for Maven project, tests are always located in src/test/... while the application is located in src/main/...
        Hide
        junoyoon JunHo Yoon added a comment -

        There are several reasons.

        1. For nGrinder, the script is not the test of /src/main/... the script itself is the core main source from the view of ngrinder.
        2. nGrinder scans the svn folders to determine the distributable scripts in several core logic. Adding the scan points makes the processing overhead.
        3. nGrinder gets the dependent libraries to be distributed by calling dependency:copy-dependency goal programically.. so that only compile scope maven libraries are distributed.
        If ngrinder allows the scripts are located in the src/test/.. folder, it can give the user wrong concept such as test scope libraries are also distributed.

        Show
        junoyoon JunHo Yoon added a comment - There are several reasons. 1. For nGrinder, the script is not the test of /src/main/... the script itself is the core main source from the view of ngrinder. 2. nGrinder scans the svn folders to determine the distributable scripts in several core logic. Adding the scan points makes the processing overhead. 3. nGrinder gets the dependent libraries to be distributed by calling dependency:copy-dependency goal programically.. so that only compile scope maven libraries are distributed. If ngrinder allows the scripts are located in the src/test/.. folder, it can give the user wrong concept such as test scope libraries are also distributed.
        Hide
        kpiwko Karel Piwko added a comment -

        Makes sense. Thanks for explanation.

        Show
        kpiwko Karel Piwko added a comment - Makes sense. Thanks for explanation.

          People

          • Assignee:
            junoyoon JunHo Yoon
            Reporter:
            kpiwko Karel Piwko
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: