Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-1500

ProjectFactoryImpl.findProject() should iterate over directories first then over build systems

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.1.0.Final
    • 2.0.0.CR1
    • Builtin Plugins
    • None
    • Hide

      Run Maven build, or when running tests from Eclipse, put pom.xml in temporary directory.

      Show
      Run Maven build, or when running tests from Eclipse, put pom.xml in temporary directory.

    Description

      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.

      Attachments

        Activity

          People

            adamwww_jira Adam Wyłuda (Inactive)
            adamwww_jira Adam Wyłuda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: