jqassistant-archive / jqa-core-framework

The core framework of jQAssistant providing the infrastructure for scanners, rules, analysis and reports.
http://jqassistant.org/
GNU General Public License v3.0
23 stars 6 forks source link

Different groups in multiple jars cannot be read #1

Closed obfischer closed 6 years ago

obfischer commented 8 years ago

Thow jars, each containing a seperate rules group, providing their rules as dependency for the Maven plugin cannot be read with jQAssistant 1.1.3.

Plugin definition for jqa-core-framework

<plugin>
    <groupId>com.buschmais.jqassistant.scm</groupId>
    <artifactId>jqassistant-maven-plugin</artifactId>
    <configuration>
        <scanIncludes>
            <scanInclude>
                <path>${project.basedir}</path>
            </scanInclude>
        </scanIncludes>
        <groups>
            <group>jqa-project-layout</group>
            <group>jqa-legal</group>
        </groups>
    </configuration>
    <dependencies>
        <dependency>
            <groupId>com.buschmais.jqassistant</groupId>
            <artifactId>project-layout-constraints</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant</groupId>
            <artifactId>legal-constraints</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>
</plugin>

Running the jQAssistant Maven Plugin causes this message:

[ERROR] Failed to execute goal com.buschmais.jqassistant.scm:jqassistant-maven-plugin:1.1.3:analyze (default) on project ab: Cannot read rules. The group jqa-project-layout is already contained in this bucket -> [Help 1]

I am pretty sure that the definition of the plugins is fine. Needs investigation.

obfischer commented 8 years ago

I found the reason. Both plugins define their rules in a file named file.xml. I renamed one and the problem vanished.