[jbosstools-issues] [JBoss JIRA] Created: (JBIDE-8553) Generation of Arquillian @Deployment method

Nicklas Karlsson (JIRA) jira-events at lists.jboss.org
Thu Mar 10 16:30:45 EST 2011


Generation of Arquillian @Deployment method
-------------------------------------------

                 Key: JBIDE-8553
                 URL: https://issues.jboss.org/browse/JBIDE-8553
             Project: Tools (JBoss Tools)
          Issue Type: Feature Request
            Reporter: Nicklas Karlsson


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.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list