@Mojo(name="test",
defaultPhase=INTEGRATION_TEST,
requiresDependencyResolution=TEST)
public class ExtensionTestMojo
extends org.mule.munit.plugin.maven.AbstractMunitMojo
| Modifier and Type | Field and Description |
|---|---|
protected ApplicationPomGenerator |
applicationPomGenerator |
protected boolean |
attachMuleSources |
protected File |
buildDirectory |
protected File |
muleArtifactJsonFile |
protected ApplicationMuleArtifactJsonGenerator |
muleArtifactJsonGenerator |
protected String |
munitMavenPluginVersion |
protected String |
packagerVersion |
protected RuntimeConfiguration |
runtimeConfiguration |
protected List<org.mule.tools.api.classloader.model.SharedLibraryDependency> |
sharedLibraries |
protected static String |
TEMPORAL_EXTENSION_MODEL_JSON |
protected String |
testApplicationName |
protected List<org.apache.maven.model.Resource> |
testResources |
protected File |
testSourcesDirectory |
ARG_TOKEN, argLines, classpathManager, dynamicPorts, effectiveSystemProperties, enableSurefireReports, environmentVariables, gson, jarFileFactory, jvm, jvmLocator, messageHandlerFactory, MULE_ARTIFACT_JSON_FILE_NAME, muleApplicationModelLoader, MUNIT_PREVIOUS_RUN_PLACEHOLDER, munitDebug, munitFailIfNoTests, munitTags, munitTest, munitTestsDirectory, pluginArtifactId, project, redirectTestOutputToFile, REMOTE_RUNNER_CLASS, repositorySystem, repositorySystemSession, resultPrinterFactory, RUN_CONFIGURATION_ARG, RUN_CONFIGURATION_JSON, runtimeProduct, runtimeVersion, runtimeVersionProviderFactory, runtimeVersionsLocator, session, skipAfterFailure, skipMunitTests, STARTER_CLASS_FILE, suiteFiles, surefireReportsFolder, systemPropertyVariables, testFailureIgnore, testOutputDirectory, toolchainManager, workingDirectoryGenerator| Constructor and Description |
|---|
ExtensionTestMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected org.mule.munit.plugin.maven.locators.RemoteRepositoriesLocator |
createRemoteRepositoriesLocator() |
protected byte[] |
generateMuleArtifactJson() |
protected byte[] |
generatePomProperties() |
protected ExtensionApplicationStructureGenerator |
getApplicationStructureGenerator() |
protected org.mule.runtime.api.meta.model.ExtensionModel |
getExtensionModel() |
protected File |
getMuleApplicationJsonPath() |
protected org.mule.munit.plugin.maven.util.ResultPrinterFactory |
getResultPrinterFactory() |
protected Map<org.mule.munit.plugin.maven.TargetRuntime,org.mule.munit.remote.api.configuration.RunConfiguration> |
getRunConfigurations() |
protected void |
init() |
createJVMStarter, createTestRunExecutor, doExecute, execute, failBuildIfNecessary, getEffectiveArgLines, getMuleApplicationModel, getMuleApplicationModelLoader, getWorkingDirectory, handleRunResult, hasExecutedBefore, saveAsJsonDataToFile, saveRunConfigurationToFileprotected static final String TEMPORAL_EXTENSION_MODEL_JSON
@Parameter(defaultValue="${project.build.directory}")
protected File buildDirectory
@Parameter(defaultValue="${project.build.outputDirectory}/META-INF/mule-artifact/mule-artifact.json")
protected File muleArtifactJsonFile
@Parameter(defaultValue="${project.basedir}/src/test/java")
protected File testSourcesDirectory
@Parameter(defaultValue="${project.testResources}")
protected List<org.apache.maven.model.Resource> testResources
@Parameter(property="shared.libraries") protected List<org.mule.tools.api.classloader.model.SharedLibraryDependency> sharedLibraries
@Parameter(property="mule.packager.version",
defaultValue="3.1.2")
protected String packagerVersion
@Parameter(property="munit.maven.plugin.version",
defaultValue="2.1.2")
protected String munitMavenPluginVersion
@Parameter protected RuntimeConfiguration runtimeConfiguration
@Parameter(property="attachMuleSources",
defaultValue="false")
protected boolean attachMuleSources
@Parameter(property="testApplicationName",
defaultValue="${project.artifactId}-test-application")
protected String testApplicationName
protected ApplicationMuleArtifactJsonGenerator muleArtifactJsonGenerator
protected ApplicationPomGenerator applicationPomGenerator
protected void init()
throws org.apache.maven.plugin.MojoExecutionException
init in class org.mule.munit.plugin.maven.AbstractMunitMojoorg.apache.maven.plugin.MojoExecutionExceptionprotected Map<org.mule.munit.plugin.maven.TargetRuntime,org.mule.munit.remote.api.configuration.RunConfiguration> getRunConfigurations() throws org.apache.maven.plugin.MojoExecutionException
getRunConfigurations in class org.mule.munit.plugin.maven.AbstractMunitMojoorg.apache.maven.plugin.MojoExecutionExceptionprotected org.mule.munit.plugin.maven.util.ResultPrinterFactory getResultPrinterFactory()
getResultPrinterFactory in class org.mule.munit.plugin.maven.AbstractMunitMojoprotected ExtensionApplicationStructureGenerator getApplicationStructureGenerator() throws org.apache.maven.plugin.MojoExecutionException
getApplicationStructureGenerator in class org.mule.munit.plugin.maven.AbstractMunitMojoorg.apache.maven.plugin.MojoExecutionExceptionprotected File getMuleApplicationJsonPath()
getMuleApplicationJsonPath in class org.mule.munit.plugin.maven.AbstractMunitMojoprotected org.mule.munit.plugin.maven.locators.RemoteRepositoriesLocator createRemoteRepositoriesLocator()
createRemoteRepositoriesLocator in class org.mule.munit.plugin.maven.AbstractMunitMojoprotected byte[] generateMuleArtifactJson()
throws IOException
IOExceptionprotected byte[] generatePomProperties()
throws IOException
IOExceptionprotected org.mule.runtime.api.meta.model.ExtensionModel getExtensionModel()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionCopyright © 2019. All rights reserved.