Search in sources :

Example 21 with JarFileBuilder

use of org.mule.runtime.module.deployment.impl.internal.builder.JarFileBuilder in project mule by mulesoft.

the class DomainDeploymentTestCase method deploysDomainWithSharedLibPrecedenceOverApplicationLib.

@Test
public void deploysDomainWithSharedLibPrecedenceOverApplicationLib() throws Exception {
    final String domainId = "shared-lib";
    final DomainFileBuilder domainFileBuilder = new DomainFileBuilder(domainId).dependingOnSharedLibrary(new JarFileBuilder("barUtils1_0", barUtils1_0JarFile)).definedBy("empty-domain-config.xml");
    final ApplicationFileBuilder applicationFileBuilder = new ApplicationFileBuilder("shared-lib-precedence-app").definedBy("app-shared-lib-precedence-config.xml").dependingOnSharedLibrary(new JarFileBuilder("barUtils2_0", barUtils2_0JarFile)).containingClass(pluginEcho1TestClassFile, "org/foo/Plugin1Echo.class").dependingOn(domainFileBuilder);
    addPackedDomainFromBuilder(domainFileBuilder);
    addPackedAppFromBuilder(applicationFileBuilder);
    startDeployment();
    assertDeploymentSuccess(domainDeploymentListener, domainFileBuilder.getId());
    assertApplicationDeploymentSuccess(applicationDeploymentListener, applicationFileBuilder.getId());
    executeApplicationFlow("main");
}
Also used : ApplicationFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder) JarFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.JarFileBuilder) DomainFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.DomainFileBuilder) Test(org.junit.Test)

Aggregations

JarFileBuilder (org.mule.runtime.module.deployment.impl.internal.builder.JarFileBuilder)21 Test (org.junit.Test)15 ArtifactPluginFileBuilder (org.mule.runtime.module.deployment.impl.internal.builder.ArtifactPluginFileBuilder)15 ApplicationFileBuilder (org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder)13 MuleArtifactLoaderDescriptorBuilder (org.mule.runtime.api.deployment.meta.MuleArtifactLoaderDescriptorBuilder)6 MulePluginModel (org.mule.runtime.api.deployment.meta.MulePluginModel)4 DomainFileBuilder (org.mule.runtime.module.deployment.impl.internal.builder.DomainFileBuilder)3 File (java.io.File)2 MulePluginModelBuilder (org.mule.runtime.api.deployment.meta.MulePluginModel.MulePluginModelBuilder)2 TestArtifactDescriptor (org.mule.runtime.module.artifact.builder.TestArtifactDescriptor)2 DeployableFileBuilder (org.mule.runtime.module.deployment.impl.internal.builder.DeployableFileBuilder)2 FileUtils.copyFile (org.apache.commons.io.FileUtils.copyFile)1 FileUtils.writeStringToFile (org.apache.commons.io.FileUtils.writeStringToFile)1 Matchers.containsString (org.hamcrest.Matchers.containsString)1 BeforeClass (org.junit.BeforeClass)1 MuleApplicationClassLoaderFactory (org.mule.runtime.deployment.model.internal.application.MuleApplicationClassLoaderFactory)1 DefaultNativeLibraryFinderFactory (org.mule.runtime.deployment.model.internal.nativelib.DefaultNativeLibraryFinderFactory)1 DefaultDomainManager (org.mule.runtime.module.deployment.impl.internal.domain.DefaultDomainManager)1 TestApplicationFactory.createTestApplicationFactory (org.mule.runtime.module.deployment.internal.TestApplicationFactory.createTestApplicationFactory)1 ExtensionCompiler (org.mule.tck.util.CompilerUtils.ExtensionCompiler)1