use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.
the class ScannerTest method buildDefaultPar.
protected File buildDefaultPar() {
final String fileName = "defaultpar.par";
final File physicalParFile = new File(shrinkwrapArchiveDirectory, fileName);
if (physicalParFile.exists()) {
return physicalParFile;
}
JavaArchive archive = ShrinkWrap.create(JavaArchive.class, fileName);
archive.addClasses(ApplicationServer.class, Lighter.class, Money.class, Mouse.class, OtherIncrementListener.class, IncrementListener.class, Version.class);
ArchivePath path = ArchivePaths.create("META-INF/orm.xml");
archive.addAsResource("defaultpar/META-INF/orm.xml", path);
path = ArchivePaths.create("META-INF/persistence.xml");
archive.addAsResource("defaultpar/META-INF/persistence.xml", path);
path = ArchivePaths.create("org/hibernate/jpa/test/pack/defaultpar/Mouse.hbm.xml");
archive.addAsResource("defaultpar/org/hibernate/jpa/test/pack/defaultpar/Mouse.hbm.xml", path);
path = ArchivePaths.create("org/hibernate/jpa/test/pack/defaultpar/package-info.class");
archive.addAsResource("org/hibernate/jpa/test/pack/defaultpar/package-info.class", path);
archive.as(ZipExporter.class).exportTo(physicalParFile, true);
return physicalParFile;
}
use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.
the class JMXPropertyEditorsTestCase method deploymentObjectByte.
@Deployment(name = "ObjectByte", managed = false)
public static Archive<?> deploymentObjectByte() {
// jar
final JavaArchive jmxSAR = createArchive("ObjectByte");
Asset asset = createServiceAsset("ObjectByte", "10");
jmxSAR.addAsManifestResource(asset, "jboss-service.xml");
return jmxSAR;
}
use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.
the class JMXPropertyEditorsTestCase method deploymentInetAddress.
@Deployment(name = "InetAddress", managed = false)
public static Archive<?> deploymentInetAddress() {
// jar
final JavaArchive jmxSAR = createArchive("InetAddress");
Asset asset = createServiceAsset("InetAddress", "10.10.10.1");
jmxSAR.addAsManifestResource(asset, "jboss-service.xml");
return jmxSAR;
}
use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.
the class JMXPropertyEditorsTestCase method deploymentObjectBoolean.
@Deployment(name = "ObjectBoolean", managed = false)
public static Archive<?> deploymentObjectBoolean() {
// jar
final JavaArchive jmxSAR = createArchive("ObjectBoolean");
Asset asset = createServiceAsset("ObjectBoolean", "true");
jmxSAR.addAsManifestResource(asset, "jboss-service.xml");
return jmxSAR;
}
use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.
the class JMXPropertyEditorsTestCase method deploymentLocale.
@Deployment(name = "Locale", managed = false)
public static Archive<?> deploymentLocale() {
// jar
final JavaArchive jmxSAR = createArchive("Locale");
Asset asset = createServiceAsset("Locale", Locale.ENGLISH.toString());
jmxSAR.addAsManifestResource(asset, "jboss-service.xml");
return jmxSAR;
}
Aggregations