utPLSQL / utPLSQL-maven-plugin

Maven plugin for running Unit Tests with utPLSQL v3
Apache License 2.0
13 stars 10 forks source link

Source and test paths #4

Closed jgebal closed 5 years ago

jgebal commented 6 years ago

Those paths should be taken from maven directly. We should not allow redefining those for the sole needs of the plugin

alberto-hernandez commented 6 years ago

Hi @jgebal, maven always propose an standart in order to reduce the configuration stuff but always provides a way to change the default configuration. If we remove this configuration we made unusable the plugin for projects with a structure already created and defined.

jgebal commented 6 years ago

So how about by default taking paths from maven and allowing the config to override? I'm worried about compatibility with other plugins (sonar plugin relies on maven config for sources). I also feel that we might be having too much of mandatory configuration.

alberto-hernandez commented 6 years ago

What are the exactly parameters are you worry about?

jgarec commented 6 years ago

Hi,

sources and tests are not mandatory in this version. plugins sets src/main/plsql and src/test/plsql which is ok (src/main/language) and use "*/.pkg" as default "includes" value.

If sources and tests are empty, plugin also sets src/main/plsql and src/test/plsql.

I think we should just allow to have :

  1. use directory default value
    <source>
    <includes>
        <include>**/*bdy</include>
        <include>**/*spc</include>
    </includes>
    </source>
  2. use includes default values :
    <source>
    <directory>src/test/resources/regex-project/scripts/sources</directory>
    </source>
jgebal commented 6 years ago

Should it be plsql or sql as defaults? Is there a global or well established standard? I saw src/main/sql in quite a few projects. Those are small but core things and once established changing them will be hard. That's why I'm asking.

jgarec commented 6 years ago

on maven site, just find this documentation : https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

jgarec commented 6 years ago

About sonar, just find this specific parameter : sonar.plsql.file.suffixes=pkb,pks... It uses the same parameter for all languages: sonar.sources and sonar.tests (whatever it contains, sonar will analyze each file depending its extension

About src/main/sql, not sure it's a standard. For exemple, flyway says by default migration files are in src/main/resources/db/migration

jgebal commented 6 years ago

I think we can close this issue if plugin respects default maven paths.