Class ExportBaseCommand

java.lang.Object
org.apache.camel.dsl.jbang.core.commands.CamelCommand
org.apache.camel.dsl.jbang.core.commands.ExportBaseCommand
All Implemented Interfaces:
Callable<Integer>
Direct Known Subclasses:
Export

public abstract class ExportBaseCommand extends CamelCommand
  • Field Details

    • BUILD_DIR

      protected static final String BUILD_DIR
      See Also:
    • SETTINGS_PROP_SOURCE_KEYS

      protected static final String[] SETTINGS_PROP_SOURCE_KEYS
    • filePaths

      protected Path[] filePaths
    • files

      protected List<String> files
    • repositories

      protected String repositories
    • dependencies

      protected List<String> dependencies
    • runtime

      protected RuntimeType runtime
    • name

      protected String name
    • gav

      protected String gav
    • excludes

      protected List<String> excludes
    • mavenSettings

      protected String mavenSettings
    • mavenSettingsSecurity

      protected String mavenSettingsSecurity
    • mavenCentralEnabled

      protected boolean mavenCentralEnabled
    • mavenApacheSnapshotEnabled

      protected boolean mavenApacheSnapshotEnabled
    • mainClassname

      protected String mainClassname
    • javaVersion

      protected String javaVersion
    • camelVersion

      protected String camelVersion
    • kameletsVersion

      protected String kameletsVersion
    • profile

      protected String profile
    • localKameletDir

      protected String localKameletDir
    • springBootVersion

      protected String springBootVersion
    • camelSpringBootVersion

      protected String camelSpringBootVersion
    • quarkusGroupId

      protected String quarkusGroupId
    • quarkusArtifactId

      protected String quarkusArtifactId
    • quarkusVersion

      protected String quarkusVersion
    • mavenWrapper

      protected boolean mavenWrapper
    • gradleWrapper

      protected boolean gradleWrapper
    • buildTool

      protected String buildTool
    • openapi

      protected String openapi
    • exportDir

      protected String exportDir
    • cleanExportDir

      protected boolean cleanExportDir
    • loggingLevel

      protected String loggingLevel
    • packageName

      protected String packageName
    • fresh

      protected boolean fresh
    • download

      protected boolean download
    • buildProperties

      protected List<String> buildProperties
    • applicationProperties

      protected String[] applicationProperties
    • logging

      protected boolean logging
    • quiet

      protected boolean quiet
    • verbose

      protected boolean verbose
    • ignoreLoadingError

      protected boolean ignoreLoadingError
    • lazyBean

      protected boolean lazyBean
    • javaLiveReload

      protected boolean javaLiveReload
    • pomTemplateName

      public String pomTemplateName
  • Constructor Details

  • Method Details

    • doCall

      public Integer doCall() throws Exception
      Specified by:
      doCall in class CamelCommand
      Throws:
      Exception
    • mavenRepositoriesAsPomXml

      protected static String mavenRepositoriesAsPomXml(String repos)
    • export

      protected abstract Integer export() throws Exception
      Throws:
      Exception
    • getScheme

      protected static String getScheme(String name)
    • runSilently

      protected Integer runSilently(boolean ignoreLoadingError, boolean lazyBean, boolean verbose) throws Exception
      Throws:
      Exception
    • addDependencies

      protected void addDependencies(String... deps)
    • replaceBuildProperties

      protected String replaceBuildProperties(String context)
    • resolveDependencies

      protected Set<String> resolveDependencies(File settings, File profile) throws Exception
      Throws:
      Exception
    • copySourceFiles

      protected void copySourceFiles(File settings, File profile, File srcJavaDirRoot, File srcJavaDir, File srcResourcesDir, File srcCamelResourcesDir, File srcKameletsResourcesDir, String packageName) throws Exception
      Throws:
      Exception
    • adjustJavaSourceFileLine

      protected void adjustJavaSourceFileLine(String line, FileOutputStream fos) throws Exception
      Throws:
      Exception
    • exportPackageName

      protected String exportPackageName(String groupId, String artifactId, String packageName)
    • copySettingsAndProfile

      protected void copySettingsAndProfile(File settings, File profile, File targetDir, Function<Properties,Object> customize) throws Exception
      Throws:
      Exception
    • prepareApplicationProperties

      protected void prepareApplicationProperties(Properties properties)
    • prepareUserProperties

      protected void prepareUserProperties(Properties properties)
    • hasOpenapi

      protected boolean hasOpenapi(Set<String> dependencies)
    • mapBuildProperties

      protected Properties mapBuildProperties()
    • copyMavenWrapper

      protected void copyMavenWrapper() throws Exception
      Throws:
      Exception
    • copyGradleWrapper

      protected void copyGradleWrapper() throws Exception
      Throws:
      Exception
    • applicationPropertyLine

      protected String applicationPropertyLine(String key, String value)
    • getMavenRepositories

      protected String getMavenRepositories(File settings, Properties prop, String camelVersion) throws Exception
      Gets the maven repositories
      Parameters:
      prop - settings
      camelVersion - the camel version
      Returns:
      repositories or null if none are in use
      Throws:
      Exception
    • hasModeline

      protected static boolean hasModeline(File settings)
    • httpServerPort

      protected static int httpServerPort(File settings)
    • jibMavenPluginVersion

      protected static String jibMavenPluginVersion(File settings, Properties prop)
    • jkubeMavenPluginVersion

      protected static String jkubeMavenPluginVersion(File settings, Properties props)
    • safeCopy

      protected void safeCopy(File source, File target, boolean override) throws Exception
      Throws:
      Exception
    • safeCopy

      protected void safeCopy(InputStream source, File target) throws Exception
      Throws:
      Exception
    • parseMavenGav

      protected static org.apache.camel.tooling.maven.MavenGav parseMavenGav(String dep)
    • copyLocalLibDependencies

      protected void copyLocalLibDependencies(Set<String> deps) throws Exception
      Throws:
      Exception
    • copyAgentDependencies

      protected void copyAgentDependencies(Set<String> deps) throws Exception
      Throws:
      Exception
    • copyApplicationPropertiesFiles

      protected void copyApplicationPropertiesFiles(File srcResourcesDir) throws Exception
      Throws:
      Exception
    • outPrinter

      protected Printer outPrinter()
    • printer

      protected Printer printer()
      Overrides:
      printer in class CamelCommand