[forge-issues] [JBoss JIRA] (FORGE-1500) ProjectFactoryImpl.findProject() should iterate over directories first then over build systems

Adam Wyłuda (JIRA) issues at jboss.org
Mon Jan 27 08:45:29 EST 2014


Adam Wyłuda created FORGE-1500:
----------------------------------

             Summary: ProjectFactoryImpl.findProject() should iterate over directories first then over build systems
                 Key: FORGE-1500
                 URL: https://issues.jboss.org/browse/FORGE-1500
             Project: Forge
          Issue Type: Bug
          Components: Builtin Plugins
    Affects Versions: 2.0.0.CR1
            Reporter: Adam Wyłuda


https://github.com/forge/core/blob/2.0/projects/impl/src/main/java/org/jboss/forge/addon/projects/impl/ProjectFactoryImpl.java#L102

In case we have a project structure:
a/pom.xml
a/b/build.gradle

Starting from a/b/, if registry.getServices(BuildSystem.class) returns MavenBuildSystem as first, then it will pick up a/pom.xml.

My solution is inverting loops:
for (each build system) { for (each directory) { ... } } ---> for (each dir) { for (each build system) { ... } }

This causes problems in Gradle addon Maven build as temporary projects are run inside target/ directory, which has always pom.xml above.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the forge-issues mailing list