Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-8553

Generation of Arquillian @Deployment method

    XMLWordPrintable

Details

    Description

      Trying to assemble a minimal Arquillian test archive can be lots of work when the dependencies add up and you only notice the problems at deployment time. I would love to have a feature that would create the @Deployment method for you. It could (in theory) work like this:

      Somewhere in your test class from the context menu you could

      a) generate a new @Deployment method if none exist or
      b) add to the deployment method if it exists

      You could then pick one or more files to start from. The imports and references would be analyzed and a minimal set of classes would be added to the deployment archive code generated. If run again, the new tree would be merged with the existing one.

      Then comes the tricky part. Analyze the archives on the classpath and dig out which archives provide which classes. Further use Aether or some other maven api to find out the dependecy tree until all jars to be included are discovered.

      Example:

      Foo.java references Bar.java
      Bar.java references Tar.java
      Tar.java references Worksheet.class

      Foo.java is included in the generated @Deployment
      Bar.java is included
      Tar.java is included
      jxl.jar from the local repo is included since it is determined from the pom.xml through further investigation to provide Worksheet.class.

      Attachments

        Activity

          People

            snjeza_jira Snjezana Peco (Inactive)
            nickarls Nicklas Karlsson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: