1 Reply Latest reply on Jun 25, 2010 1:22 PM by aslak

    Cannot access testClass in DeploymentPackager

    thomas.diesler

      Related to

       

      Create auxillary OSGi test bundle

      https://jira.jboss.org/browse/arq-193

       

      Currently the signature of DeploymentPackager is

       

      public interface DeploymentPackager
      {
         /**
          * @param applicationArchive The user defined deployment archive
          * @param auxiliaryArchives All found system defined deployment archives
          * @return A archive to deploy
          */
         Archive<?> generateDeployment(Archive<?> applicationArchive, Collection<Archive<?>> auxiliaryArchives);
      }
      
      

       

      I suggest, that event callbacks generally get access to the Context. i.e.

       

      public interface DeploymentPackager
      {
          /**
          * Inspect, validate and optionally modify the user defined archive.
          * 
          * Additional archives can be added to the given list of auxiliaryArchives.
          * The returned archive together with the auxiliaryArchives will get deployed 
          * to the container.
          * 
          * @param context The test lifecycle context
          * @param archive The user defined deployment archive
          * @param auxiliaryArchives All found system defined deployment archives
          * @return A archive to deploy
          */
         Archive<?> generateDeployment(Context context, Archive<?> archive, Collection<Archive<?>> auxiliaryArchives);}

       

      In this way there would be a communication path between event handlers. One handler, can attach an artefact which another handler can then consume.