Class BootstrapMavenOptions
- java.lang.Object
-
- io.quarkus.bootstrap.resolver.maven.options.BootstrapMavenOptions
-
public class BootstrapMavenOptions extends Object
This class resolves relevant Maven command line options in case it's called from a Maven build process. Maven internally uses org.apache.commons.cli.* API besides Maven-specific API. This class locates the Maven's lib directory that was used to launch the build process and loads the necessary classes from that lib directory.
-
-
Field Summary
Fields Modifier and Type Field Description static StringALTERNATE_GLOBAL_SETTINGSstatic StringALTERNATE_POM_FILEstatic StringALTERNATE_USER_SETTINGSstatic StringBATCH_MODEstatic StringCHECKSUM_FAILURE_POLICYstatic StringCHECKSUM_WARNING_POLICYstatic StringNO_TRANSFER_PROGRESSstatic StringOFFLINEstatic StringQUARKUS_INTERNAL_MAVEN_CMD_LINE_ARGSstatic StringSUPRESS_SNAPSHOT_UPDATESstatic StringSYSTEM_PROPERTYstatic StringUPDATE_SNAPSHOTS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getActiveProfileIds()static PathgetClassOrigin(Class<?> cls)Returns the JAR or the root directory that contains the class file that is on the classpath of the context classloaderList<String>getInactiveProfileIds()static StringgetMavenCmdLine()StringgetOptionValue(String name)String[]getOptionValues(String name)static PathgetResourceOrigin(ClassLoader cl, String name)PropertiesgetSystemProperties()booleanhasOption(String name)booleanisEmpty()static BootstrapMavenOptionsnewInstance()static BootstrapMavenOptionsnewInstance(String cmdLine)static Map<String,Object>parse(String cmdLine)
-
-
-
Field Detail
-
QUARKUS_INTERNAL_MAVEN_CMD_LINE_ARGS
public static final String QUARKUS_INTERNAL_MAVEN_CMD_LINE_ARGS
- See Also:
- Constant Field Values
-
ALTERNATE_USER_SETTINGS
public static final String ALTERNATE_USER_SETTINGS
- See Also:
- Constant Field Values
-
ALTERNATE_GLOBAL_SETTINGS
public static final String ALTERNATE_GLOBAL_SETTINGS
- See Also:
- Constant Field Values
-
ALTERNATE_POM_FILE
public static final String ALTERNATE_POM_FILE
- See Also:
- Constant Field Values
-
OFFLINE
public static final String OFFLINE
- See Also:
- Constant Field Values
-
SUPRESS_SNAPSHOT_UPDATES
public static final String SUPRESS_SNAPSHOT_UPDATES
- See Also:
- Constant Field Values
-
UPDATE_SNAPSHOTS
public static final String UPDATE_SNAPSHOTS
- See Also:
- Constant Field Values
-
CHECKSUM_FAILURE_POLICY
public static final String CHECKSUM_FAILURE_POLICY
- See Also:
- Constant Field Values
-
CHECKSUM_WARNING_POLICY
public static final String CHECKSUM_WARNING_POLICY
- See Also:
- Constant Field Values
-
BATCH_MODE
public static final String BATCH_MODE
- See Also:
- Constant Field Values
-
NO_TRANSFER_PROGRESS
public static final String NO_TRANSFER_PROGRESS
- See Also:
- Constant Field Values
-
SYSTEM_PROPERTY
public static final String SYSTEM_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
public static BootstrapMavenOptions newInstance()
-
newInstance
public static BootstrapMavenOptions newInstance(String cmdLine)
-
getMavenCmdLine
public static String getMavenCmdLine()
-
hasOption
public boolean hasOption(String name)
-
getSystemProperties
public Properties getSystemProperties()
-
isEmpty
public boolean isEmpty()
-
getClassOrigin
public static Path getClassOrigin(Class<?> cls) throws IOException
Returns the JAR or the root directory that contains the class file that is on the classpath of the context classloader- Throws:
IOException
-
getResourceOrigin
public static Path getResourceOrigin(ClassLoader cl, String name) throws IOException
- Throws:
IOException
-
-