public class SenchaUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
absolutizeToModuleWithPlaceholder(String packageType,
String relativePath)
Generates an absolute path to the module dir for the given relative path using a placeholder.
|
static String |
absolutizeWithPlaceholder(String placeholder,
String relativePath)
Generates an absolute path to the module dir for the given relative path using a placeholder.
|
static void |
addSwitchFullIfCmd6_5(List<String> arguments)
Special case: Sencha Cmd 6.5 made a breaking change in "generate workspace/app", and to restore
the original behavior, we have to specify the new parameter "--full" (which Cmd < 6.5 prompts with an error).
|
static File |
baseDir(org.apache.maven.execution.MavenSession mavenSession) |
static void |
configureDefaults(SenchaConfigBuilder configBuilder,
String defaultsFileName) |
static void |
createSenchaCfg(Path senchaCfgSource,
Path senchaCfgTarget,
Map<String,Object> properties) |
static boolean |
doesSenchaAppExist(File directory) |
static void |
extractPkg(File archive,
File targetDir)
Unfortunately, we need to implement our own extractor because
the maven unarchiver is unable to strip a given path prefix from the entry paths
|
static void |
generateSenchaAppFromTemplate(File workingDirectory,
String appName,
String applicationClass,
String toolkit,
org.apache.maven.plugin.logging.Log log,
String logLevel,
String senchaJvmArgs) |
static void |
generateSenchaTestAppFromTemplate(File workingDirectory,
org.apache.maven.project.MavenProject project,
String appName,
String testSuite,
String toolkit,
org.apache.maven.plugin.logging.Log log,
String logLevel,
String senchaJvmArgs) |
static com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper() |
static String |
getPackagesPath(org.apache.maven.project.MavenProject project) |
static String |
getSenchaPackageName(org.apache.maven.project.MavenProject project) |
static String |
getSenchaPackageName(String groupId,
String artifactId) |
static String |
getSenchaVersionForMavenVersion(String version) |
static org.apache.maven.model.Dependency |
getThemeDependency(String theme,
org.apache.maven.project.MavenProject project) |
static boolean |
isRequiredSenchaDependency(org.apache.maven.model.Dependency dependency,
boolean includeTestDependencies) |
static boolean |
isSenchaDependency(org.apache.maven.model.Dependency dependency) |
static boolean |
isSenchaDependency(String type) |
static File |
remotePackagesDir(org.apache.maven.execution.MavenSession mavenSession) |
static void |
writeFile(SenchaConfigBuilder configBuilder,
String destinationFileDir,
String destinationFileName,
String comment,
org.apache.maven.plugin.logging.Log log) |
public static final String SEPARATOR
public static final String APP_DIRECTORY_NAME
public static final String TEST_APP_DIRECTORY_NAME
public static final String EXT_DIRECTORY_NAME
public static final String PACKAGES_DIRECTORY_NAME
public static final String APPS_DIRECTORY_NAME
public static final String LOCAL_PACKAGES_PATH
public static final String LOCAL_APPS_PATH
public static final String APP_TARGET_DIRECTORY
public static final String APPS_TARGET_DIRECTORY
public static final String SENCHA_LOCALE_PATH
public static final String DEFAULT_LOCALE
public static final String SENCHA_RESOURCES_PATH
public static final String SENCHA_BUNDLED_RESOURCES_PATH
public static final String PRODUCTION_PROFILE
public static final String TESTING_PROFILE
public static final String DEVELOPMENT_PROFILE
public static final String TOOLKIT_CLASSIC
public static final String SENCHA_DIRECTORYNAME
public static final String SENCHA_WORKSPACE_CONFIG
public static final String SENCHA_PACKAGE_CONFIG
public static final String SENCHA_WORKSPACE_FILENAME
public static final String SENCHA_PACKAGE_FILENAME
public static final String SENCHA_APP_FILENAME
public static final String PACKAGE_CONFIG_FILENAME
public static final String REQUIRED_CLASSES_FILENAME
public static final String DYNAMIC_PACKAGES_FILENAME
public static final String APP_MANIFEST_FILENAME
public static final String APP_MANIFEST_FRAGMENT_FILENAME
public static final String APPS_FILENAME
public static final String SENCHA_TEST_APP_TEMPLATE_ARTIFACT_ID
public static final String SENCHA_APP_TEMPLATE_ARTIFACT_ID
public static final String SENCHA_APP_TEMPLATE_GROUP_ID
public static final String AUTO_CONTENT_COMMENT
public static String getSenchaPackageName(@Nonnull org.apache.maven.project.MavenProject project)
public static String getSenchaVersionForMavenVersion(String version)
@Nullable public static org.apache.maven.model.Dependency getThemeDependency(@Nullable String theme, @Nonnull org.apache.maven.project.MavenProject project)
public static String absolutizeToModuleWithPlaceholder(String packageType, String relativePath)
packageType - the Maven project's packaging typerelativePath - the path relative to the Sencha modulepublic static String absolutizeWithPlaceholder(String placeholder, String relativePath)
placeholder - the placeholder, e.g. "${workspace.dir}"relativePath - the path relative to the Sencha modulepublic static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
public static boolean isRequiredSenchaDependency(@Nonnull org.apache.maven.model.Dependency dependency, boolean includeTestDependencies)
public static boolean isSenchaDependency(@Nonnull org.apache.maven.model.Dependency dependency)
public static boolean doesSenchaAppExist(File directory)
public static String getPackagesPath(org.apache.maven.project.MavenProject project)
public static void generateSenchaAppFromTemplate(File workingDirectory, String appName, String applicationClass, String toolkit, org.apache.maven.plugin.logging.Log log, String logLevel, String senchaJvmArgs) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic static void generateSenchaTestAppFromTemplate(File workingDirectory, org.apache.maven.project.MavenProject project, String appName, String testSuite, String toolkit, org.apache.maven.plugin.logging.Log log, String logLevel, String senchaJvmArgs) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic static void addSwitchFullIfCmd6_5(List<String> arguments) throws org.apache.maven.plugin.MojoExecutionException
arguments - the arguments list to add "--full" to if Sencha Cmd version is 6.5 or higherorg.apache.maven.plugin.MojoExecutionException - if Sencha Cmd version cannot be determinedpublic static void createSenchaCfg(Path senchaCfgSource, Path senchaCfgTarget, Map<String,Object> properties) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic static void configureDefaults(SenchaConfigBuilder configBuilder, String defaultsFileName) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic static void writeFile(@Nonnull SenchaConfigBuilder configBuilder, @Nonnull String destinationFileDir, @Nonnull String destinationFileName, @Nullable String comment, org.apache.maven.plugin.logging.Log log) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic static void extractPkg(File archive, File targetDir) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic static File baseDir(org.apache.maven.execution.MavenSession mavenSession)
public static File remotePackagesDir(org.apache.maven.execution.MavenSession mavenSession)
Copyright © 2002–2020 CoreMedia AG. All rights reserved.