Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-2178

FileSystemLayout will always use Maven layout if both pom.xml and build.gradle are present



    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Done
    • 2.2.0.Final
    • 2.2.1.Final
    • core
    • None


      I am trying to fix the Gradle Arquillian adapter. As part of the fixes, I wanted to test out the Gradle project in Thorntail examples. What I noticed was that since the project has a pom.xml as well as a build.gradle file, the FileSystemLayout will always select the Maven layout.

      This is a corner case and wouldn't happen in most scenarios, because you are either using Gradle or Maven, very rarely will you use both (unless you are building a product like in the case of the examples repository).

      Proposed Changes
      Given that the FileSystemLayout class is internal, we should probably look for a property such as the following (similar to pre-ServiceLoader days),

          String preferredLayout = System.getProperty("org.wildfly.swarm.internal.FileSystemLayout");
          if( preferredLayout != null && !preferredLayout.trim().isEmpty() ) {
              // 1. Attempt to load the class.
              // 2. If the class does not exist, then fall back to existing behavior.
              // 3. If the class exists and was instantiated properly, then return that and let the rest of the system play out as normal.

      With this setup, one would be able to build their own adapter and layout without having to worry about changing things in core any more.




            roguexz-1 Harsha Ramesh (Inactive)
            roguexz-1 Harsha Ramesh (Inactive)
            0 Vote for this issue
            1 Start watching this issue