Package spoon
Class MavenLauncher
- java.lang.Object
-
- spoon.Launcher
-
- spoon.MavenLauncher
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MavenLauncher.SOURCE_TYPE
The type of source to consider in the model
-
Field Summary
-
Fields inherited from class spoon.Launcher
ALL_DIR_FILTER, factory, jsapActualArgs, LOGGER, OUTPUTDIR, RESOURCES_FILE_FILTER, SPOONED_CLASSES
-
-
Constructor Summary
Constructors Constructor Description MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType)
MavenLauncher constructor assuming either an environment variable M2_HOME, or that mvn command exists in PATH.MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, boolean forceRefresh)
MavenLauncher constructor assuming either an environment variable M2_HOME, or that mvn command exists in PATH.MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, boolean forceRefresh, Pattern profileFilter)
MavenLauncher constructor assuming either an environment variable M2_HOME, or that mvn command exists in PATH.MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, String mvnHome)
MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, String[] classpath)
MavenLauncher constructor that skips maven invocation building classpath.MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, String[] classpath, Pattern profileFilter)
MavenLauncher constructor that skips maven invocation building classpath.MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, String mvnHome, boolean forceRefresh)
MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, String mvnHome, boolean forceRefresh, Pattern profileFilter)
MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, String mvnHome, Pattern profileFilter)
MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, Pattern profileFilter)
MavenLauncher constructor assuming either an environment variable M2_HOME, or that mvn command exists in PATH.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpoonPom
getPomFile()
void
rebuildClasspath()
Triggers regeneration of the classpath that is used for building the model, based on pom.xml-
Methods inherited from class spoon.Launcher
addInputResource, addInputResource, addProcessor, addProcessor, addTemplateResource, buildModel, createCompiler, createCompiler, createCompiler, createCompiler, createCompiler, createEnvironment, createFactory, createOutputWriter, createPrettyPrinter, defineArgs, getArguments, getEnvironment, getFactory, getModel, getModelBuilder, getProcessors, getProcessorTypes, main, parseArgs, parseClass, prettyprint, printUsage, process, processArguments, run, run, setArgs, setBinaryOutputDirectory, setBinaryOutputDirectory, setOutputFilter, setOutputFilter, setSourceOutputDirectory, setSourceOutputDirectory
-
-
-
-
Constructor Detail
-
MavenLauncher
public MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType)
MavenLauncher constructor assuming either an environment variable M2_HOME, or that mvn command exists in PATH.- Parameters:
mavenProject
- the path to the root of the projectsourceType
- the source type (App, test, or all)
-
MavenLauncher
public MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, Pattern profileFilter)
MavenLauncher constructor assuming either an environment variable M2_HOME, or that mvn command exists in PATH.- Parameters:
mavenProject
- the path to the root of the projectsourceType
- the source type (App, test, or all)profileFilter
- regular expression of profiles to include in the built model
-
MavenLauncher
public MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, boolean forceRefresh)
MavenLauncher constructor assuming either an environment variable M2_HOME, or that mvn command exists in PATH.- Parameters:
mavenProject
- the path to the root of the projectsourceType
- the source type (App, test, or all)forceRefresh
- force the regeneration of classpath
-
MavenLauncher
public MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, boolean forceRefresh, Pattern profileFilter)
MavenLauncher constructor assuming either an environment variable M2_HOME, or that mvn command exists in PATH.- Parameters:
mavenProject
- the path to the root of the projectsourceType
- the source type (App, test, or all)forceRefresh
- force the regeneration of classpathprofileFilter
- regular expression of profiles to include in the built model
-
MavenLauncher
public MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, String mvnHome)
- Parameters:
mavenProject
- the path to the root of the projectsourceType
- the source type (App, test, or all)mvnHome
- Path to maven install
-
MavenLauncher
public MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, String mvnHome, Pattern profileFilter)
- Parameters:
mavenProject
- the path to the root of the projectsourceType
- the source type (App, test, or all)mvnHome
- Path to maven installprofileFilter
- regular expression of profiles to include in the built model
-
MavenLauncher
public MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, String mvnHome, boolean forceRefresh)
- Parameters:
mavenProject
- the path to the root of the projectsourceType
- the source type (App, test, or all)mvnHome
- Path to maven installforceRefresh
- force the regeneration of classpath
-
MavenLauncher
public MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, String mvnHome, boolean forceRefresh, Pattern profileFilter)
- Parameters:
mavenProject
- the path to the root of the projectsourceType
- the source type (App, test, or all)mvnHome
- Path to maven installforceRefresh
- force the regeneration of classpathprofileFilter
- regular expression of profiles to include in the built model
-
MavenLauncher
public MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, String[] classpath)
MavenLauncher constructor that skips maven invocation building classpath.- Parameters:
mavenProject
- the path to the root of the projectsourceType
- the source type (App, test, or all)classpath
- String array containing the classpath elements
-
MavenLauncher
public MavenLauncher(String mavenProject, MavenLauncher.SOURCE_TYPE sourceType, String[] classpath, Pattern profileFilter)
MavenLauncher constructor that skips maven invocation building classpath.- Parameters:
mavenProject
- the path to the root of the projectsourceType
- the source type (App, test, or all)classpath
- String array containing the classpath elementsprofileFilter
- regular expression of profiles to include in the built model
-
-
Method Detail
-
getPomFile
public SpoonPom getPomFile()
- Returns:
- SpoonPom corresponding to the pom file used by the launcher
-
rebuildClasspath
public void rebuildClasspath()
Triggers regeneration of the classpath that is used for building the model, based on pom.xml
-
-