Build and deploy
Define components, build, test, package, deploy project
All gradle commands must be execute at the root of the project directory
Project template
To get you started building custom code Joule provides a set of project templates.
git clone https://gitlab.com/joule-platform/fractalworks-project-templates.git
git clone [email protected]:joule-platform/fractalworks-project-templates.gitBuild and deploy steps
Defined components in plugins.properties
Build, test and package
Deploy to project
Explaining each step
Step 1: Define components in plugins.properties
Create a plugins.properties file with a similar definition for your custom class or classes under the resources/META-INF/services directory. If you are packaging more than one component add the definition on a new line.
com.yourdomain.processors.transformers.CustomProcessorStep 2: Package, test and package
A single project can have a number of custom components which can be packaged into a single or multiple jar files. The template project provides basic grade.build file. The project will execute these tests during the gradle build cycle and deploy to your local maven repository.
Example gradle file
plugins {
id "java"
id 'maven-publish'
}
jar.doFirst {
archiveBaseName = 'mydomain-customtransformer-processor'
manifest {
attributes "Class-Path" : configurations.compileClasspath.collect { it.getName() }.join(' ')
}
}
dependencies {
implementation "com.fractalworks.streams.platform:fractalworks-stream-platform:$platformVersion"
}Execute the below command at the project root. This will build, test, package and publish the resulting artefacts to your local maven repository.
gradle build publishToMavenLocalStep 3: Deploy to project
Once your package has been successfully created you are ready to deploy to a Joule project. The resulting jar artefacts' needs to be placed in to the userlibs directory in your Joule projects directory. See provided examples documentation for further directions.
cp build/libs/<your-component>.jar <location>/userlibsLast updated
Was this helpful?