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

REGRESSION: FractionUsageAnalyzer does not work with source("target/classes")

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 2017.3.3
    • Fix Version/s: 2017.5.0
    • Component/s: core
    • Labels:
      None
    • Sprint:
      2017-Apr-B
    • Steps to Reproduce:
      Hide
      1. Click the "Generate Project" button in http://wildfly-swarm.io/generator/ and download the ZIP
      2. Extract it somewhere (eg. /tmp/demo) and run mvn clean package
      3. Create a test project and add a dependency to fraction-metadata.
      4. Run the following code:
         
           public static void main(String[] args) throws Exception
           {
              FractionUsageAnalyzer analyzer = new FractionUsageAnalyzer(FractionList.get());
              analyzer.source(new File("/tmp/demo/target/classes"));
              System.out.println(analyzer.detectNeededFractions()); // Will display container, but should have displayed jaxrs
           }
        
      Show
      Click the "Generate Project" button in http://wildfly-swarm.io/generator/ and download the ZIP Extract it somewhere (eg. /tmp/demo) and run mvn clean package Create a test project and add a dependency to fraction-metadata . Run the following code: public static void main( String [] args) throws Exception { FractionUsageAnalyzer analyzer = new FractionUsageAnalyzer(FractionList.get()); analyzer.source( new File( "/tmp/demo/target/classes" )); System .out.println(analyzer.detectNeededFractions()); // Will display container, but should have displayed jaxrs }
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Use source(new File("target/project.war")) instead

      Show
      Use source(new File("target/project.war")) instead

      Description

      The wildfly-swarm-addon uses the FractionUsageAnalyzer class in the wildfly-swarm-detect-fractions command.

      It seems that after the FractionUsageAnalyzer refactoring, it stopped working when source(new File(project_dir+"/target/classes")) is specified.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bob.mcwhirter Bob McWhirter
                Reporter:
                gastaldi George Gastaldi
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: