public TCKArtifact createArtifact() { final TCKArtifact artifact = newArtifact( artifactType, packagingType, declaringClass, beansXml, validationXml, ejbJarXml, persistenceXml, standalone, addDeclaringPackage ); artifact.setUnit( unit ); artifact.setRunLocally( runLocally ); artifact.setExpectedDeploymentException( expectedDeploymentException ); artifact.getClasses().addAll( classes ); // Annoying hack artifact.getResources().removeAll( resources ); artifact.getResources().addAll( resources ); artifact.getLibraries().addAll( extraLibraries ); for ( String packageName : packages ) { artifact.addPackage( packageName, false ); } return artifact; }
private EarArtifactDescriptor(TCKArtifact ear, TCKArtifact ejbJar, TCKArtifact war) { this.ear = ear; this.ejbJar = ejbJar; this.war = war; this.war.setLibrariesSupported( false ); this.war.skipIncludeXmlConfig( true ); this.ear.getClasses().clear(); this.ear.setExtension( ".ear" ); this.ear.setLibrariesSupported( true ); this.ear.setLibrariesRoot( "lib" ); this.ear.skipIncludeXmlConfig( true ); this.ejbJar.initialize(); this.war.initialize(); createContainingJars(); createApplicationXml(); }
Set<Class<?>> classes = artifact.getClasses(); if (!getCurrentConfiguration().getStandaloneContainers().deploy(classes, xmlResourcesAsList()))