public class PackageBuilder extends Object
| Constructor and Description |
|---|
PackageBuilder() |
| Modifier and Type | Method and Description |
|---|---|
void |
createDeployableFile()
Creates the application package.
|
void |
createMuleApp(File destinationFile,
String originFolder,
PackagingType packagingType,
boolean onlyMuleSources,
boolean lightweightPackage,
boolean attachMuleSources)
Creates a mule app package based on the contents of the origin folder, writing them to the destination jar file.
|
PackageBuilder |
fromWorkingDirectory(Path workingDirectory)
It wires all the possible folders that should be properly name from the workingDirectory to the package.
|
MuleArchiver |
getMuleArchiver() |
PackageBuilder |
withArchiver(MuleArchiver archiver) |
PackageBuilder |
withClasses(File folder) |
PackageBuilder |
withDestinationFile(File file) |
PackageBuilder |
withMaven(File folder) |
PackageBuilder |
withMuleArtifact(File folder) |
PackageBuilder |
withMuleSrc(File folder) |
PackageBuilder |
withRepository(File folder) |
PackageBuilder |
withRootResource(File resource) |
public MuleArchiver getMuleArchiver()
public PackageBuilder withArchiver(MuleArchiver archiver)
archiver - public PackageBuilder withClasses(File folder)
folder - folder with all the configuration files of the applicationpublic PackageBuilder withMaven(File folder)
public PackageBuilder withMuleSrc(File folder)
public PackageBuilder withMuleArtifact(File folder)
public PackageBuilder withRepository(File folder)
public PackageBuilder withRootResource(File resource)
public PackageBuilder withDestinationFile(File file)
file - file to be created with the content of the apppublic PackageBuilder fromWorkingDirectory(Path workingDirectory)
workingDirectory - a directory containing all the folders properly namedpublic void createDeployableFile()
throws IOException
IOExceptionpublic void createMuleApp(File destinationFile, String originFolder, PackagingType packagingType, boolean onlyMuleSources, boolean lightweightPackage, boolean attachMuleSources) throws org.codehaus.plexus.archiver.ArchiverException, IOException
├── log4j2.xml
├── org
│ └── MyClass.class
├── mule
│ ├── package
│ └── mule-configuration(s).xml
├── api
│ └── *.raml
└── wsdl
│ └── *.wsdl
├── META-INF
│ ├── mule-src
│ │ └── application-name
│ ├── maven
│ │ ├── group-id
│ │ └── artifact-id
│ │ ├── pom.xml
│ │ └── pom.properties
│ └── mule-artifact
│ ├── classloader-model.json
│ └── mule-artifact.json
└── repository
├── org
└── mule
├── munit
└── munit-common
├── 1.1.0
│ ├── *.jar
│ └── pom.xml
└── 2.0.0
├── *.jar
└── pom.xml
destinationFile - file that represents the resource that is going to represent the final package.originFolder - folder containing the source files.packagingType - packaging type of the app that is being built.onlyMuleSources - when set to true, generates a package that is restricted to contain only mule sources.lightweightPackage - when set to true, generates a package with an empty repository folder.attachMuleSources - when set to true, adds the mule source files to final package.org.codehaus.plexus.archiver.ArchiverExceptionIOExceptionCopyright © 2017. All rights reserved.