|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.rvin.flexmojos.utilities.MavenUtils
public class MavenUtils
Utility class to help get information from Maven objects like files, source paths, resolve dependencies, etc.
| Method Summary | |
|---|---|
static java.io.File |
getArtifactFile(org.apache.maven.artifact.Artifact a,
org.apache.maven.model.Build build)
Get the file reference of an SWC artifact. |
static java.io.File |
getConfigFile(org.apache.maven.model.Build build)
Returns file reference to config.xml file. |
static java.util.Set<org.apache.maven.artifact.Artifact> |
getDependencyArtifacts(org.apache.maven.project.MavenProject project,
org.apache.maven.artifact.resolver.ArtifactResolver resolver,
org.apache.maven.artifact.repository.ArtifactRepository localRepository,
java.util.List remoteRepositories,
org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource)
Get dependency artifacts for a project using the local and remote repositories to resolve the artifacts |
static java.util.List<Namespace> |
getFdkNamespaces(java.util.Collection<org.apache.maven.artifact.Artifact> dependencies,
org.apache.maven.model.Build build)
|
static java.lang.String |
getFlexMojosVersion()
|
static java.io.File |
getFontsFile(org.apache.maven.model.Build build)
Returns the file reference to the fonts file. |
static java.io.File |
getLocaleResourcePath(java.lang.String resourceBundlePath,
java.lang.String locale)
Returns the file reference to a localize resourceBundlePath. |
static boolean |
isApplicationFile(java.io.File file)
Parse an MXML file and returns true if the file is an application one |
static boolean |
isLinux()
Return a boolean to show if we are running on Linux. |
static boolean |
isMac()
Return a boolean to show if we are running on Mac OS X. |
static boolean |
isSolaris()
Return a boolean to show if we are running on Solaris. |
static boolean |
isUnixBased()
Return a boolean to show if we are running on a unix-based OS. |
static boolean |
isWindows()
Return a boolean to show if we are running on Windows. |
static boolean |
isWindowsVista()
Return a boolean to show if we are running on Windows Vista. |
static java.lang.String |
osString()
|
static void |
resolveArtifact(org.apache.maven.artifact.Artifact artifact,
org.apache.maven.artifact.resolver.ArtifactResolver resolver,
org.apache.maven.artifact.repository.ArtifactRepository localRepository,
java.util.List remoteRepositories)
Use the resolver to resolve the given artifact in the local or remote repositories. |
static java.io.File |
resolveResourceFile(org.apache.maven.project.MavenProject project,
java.lang.String fileName)
Resolve a resource file in a maven project resources folders |
static java.io.File |
resolveSourceFile(org.apache.maven.project.MavenProject project,
java.lang.String sourceFileName)
Resolve a source file in a maven project |
static org.apache.maven.artifact.Artifact |
searchFor(java.util.Collection<org.apache.maven.artifact.Artifact> artifacts,
java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.lang.String type,
java.lang.String classifier)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isApplicationFile(java.io.File file)
file - the file to be parsed
public static java.io.File resolveSourceFile(org.apache.maven.project.MavenProject project,
java.lang.String sourceFileName)
project - maven projectsourceFileName - sugested name on pom
public static java.io.File resolveResourceFile(org.apache.maven.project.MavenProject project,
java.lang.String fileName)
throws org.apache.maven.plugin.MojoFailureException
project - maven projectfileName - sugested name on pom
org.apache.maven.plugin.MojoFailureException
public static java.util.Set<org.apache.maven.artifact.Artifact> getDependencyArtifacts(org.apache.maven.project.MavenProject project,
org.apache.maven.artifact.resolver.ArtifactResolver resolver,
org.apache.maven.artifact.repository.ArtifactRepository localRepository,
java.util.List remoteRepositories,
org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource)
throws org.apache.maven.plugin.MojoExecutionException
project - maven projectresolver - artifact resolverlocalRepository - artifact repositoryremoteRepositories - List of remote repositoriesartifactMetadataSource - artifactMetadataSource
org.apache.maven.plugin.MojoExecutionException - thrown if an exception occured during artifact resolving
public static java.io.File getArtifactFile(org.apache.maven.artifact.Artifact a,
org.apache.maven.model.Build build)
throws org.apache.maven.plugin.MojoExecutionException
a - artifact for which to retrieve the file referencescope - scope of the librarybuild - build for which to get the artifact
org.apache.maven.plugin.MojoExecutionException - thrown if an IOException occurs while copying the file to the
[build-dir]/libraries/[scope] directory
public static void resolveArtifact(org.apache.maven.artifact.Artifact artifact,
org.apache.maven.artifact.resolver.ArtifactResolver resolver,
org.apache.maven.artifact.repository.ArtifactRepository localRepository,
java.util.List remoteRepositories)
throws org.apache.maven.plugin.MojoExecutionException
artifact - Artifact to be resolvedresolver - ArtifactResolver to use for resolving the artifactlocalRepository - ArtifactRepositoryremoteRepositories - List of remote artifact repositories
org.apache.maven.plugin.MojoExecutionException - thrown if an exception occured during artifact resolving
public static java.io.File getConfigFile(org.apache.maven.model.Build build)
throws org.apache.maven.plugin.MojoExecutionException
build - Build for which to get the config.xml file
org.apache.maven.plugin.MojoExecutionException - thrown if the config file could not be copied to the build directory
public static java.io.File getFontsFile(org.apache.maven.model.Build build)
throws org.apache.maven.plugin.MojoExecutionException
build - Build for which to get the fonts file
org.apache.maven.plugin.MojoExecutionException - thrown if the config file could not be copied to the build directory
public static java.io.File getLocaleResourcePath(java.lang.String resourceBundlePath,
java.lang.String locale)
throws org.apache.maven.plugin.MojoExecutionException
resourceBundlePath - Path to resource bundle.locale - Locale
org.apache.maven.plugin.MojoExecutionException - thrown if the resourceBundlePath for given locale can not be foundpublic static java.lang.String osString()
public static boolean isWindows()
public static boolean isLinux()
public static boolean isSolaris()
public static boolean isUnixBased()
public static boolean isMac()
public static boolean isWindowsVista()
public static org.apache.maven.artifact.Artifact searchFor(java.util.Collection<org.apache.maven.artifact.Artifact> artifacts,
java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.lang.String type,
java.lang.String classifier)
public static java.util.List<Namespace> getFdkNamespaces(java.util.Collection<org.apache.maven.artifact.Artifact> dependencies,
org.apache.maven.model.Build build)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic static java.lang.String getFlexMojosVersion()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||