Class DataMapperBundler


  • public class DataMapperBundler
    extends Object
    • Constructor Detail

      • DataMapperBundler

        public DataMapperBundler​(CARMojo mojoInstance,
                                 String projectDirectory,
                                 String sourceDirectory,
                                 String resourcesDirectory)
    • Method Detail

      • bundleDataMapper

        public void bundleDataMapper()
                              throws DataMapperException,
                                     org.apache.maven.plugin.MojoExecutionException
        Orchestrates the process of bundling all data mappers found within the specified resources directory. This includes setting up the Maven invoker, installing Node.js and NPM, running npm install, and executing the bundling process for each data mapper. It also handles the creation and cleanup of necessary artifacts.
        Throws:
        DataMapperException - if any step in the bundling process fails.
        org.apache.maven.plugin.MojoExecutionException - if an error occurs while executing the Maven invoker.
      • isDmResourcesExist

        public boolean isDmResourcesExist()
        Checks if all necessary resources for data mapper bundling exist in the global cache directory.
        Returns:
        true if all necessary resources exist, false otherwise.
      • deleteGeneratedDatamapperArtifacts

        public void deleteGeneratedDatamapperArtifacts()
                                                throws DataMapperException
        Deletes the generated data mapper artifacts.
        Throws:
        DataMapperException - if an error occurs while deleting the generated data mapper artifacts.