public class ReadWorkspaceLocations
extends java.lang.Object
IdeDependency for all found artefacts.| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String[] |
ARTEFACT_ID |
static java.lang.String |
BINARY_LOCATION_FILE |
private static java.lang.String |
CLASSPATHENTRY_DEFAULT |
private static java.lang.String |
CLASSPATHENTRY_FORMAT |
private static java.lang.String |
CLASSPATHENTRY_STANDARD |
private static java.lang.String[] |
GROUP_ID |
static java.lang.String |
METADATA_PLUGINS_ORG_ECLIPSE_CORE_RESOURCES_PROJECTS |
private static java.lang.String |
METADATA_PLUGINS_ORG_ECLIPSE_CORE_RUNTIME_LAUNCHING_PREFS |
private static java.lang.String |
METADATA_PLUGINS_ORG_ECLIPSE_CORE_RUNTIME_PREFS_RUNTIMES_KEY |
private static java.lang.String |
METADATA_PLUGINS_ORG_ECLIPSE_CORE_RUNTIME_PREFS_VM_KEY |
private static java.lang.String |
METADATA_PLUGINS_ORG_ECLIPSE_CORE_RUNTIME_SERVER_PREFS |
private static java.lang.String[] |
PACKAGING |
private static java.lang.String[] |
PARENT_GROUP_ID |
private static java.lang.String[] |
PARENT_VERSION |
private static java.lang.String[] |
VERSION |
| Constructor and Description |
|---|
ReadWorkspaceLocations() |
| Modifier and Type | Method and Description |
|---|---|
private void |
detectDefaultJREContainer(WorkspaceConfiguration workspaceConfiguration,
org.apache.maven.project.MavenProject project,
org.apache.maven.plugin.logging.Log logger)
Search the default JREContainer from eclipse for the current MavenProject
|
private void |
detectWTPDefaultServer(WorkspaceConfiguration workspaceConfiguration,
java.lang.String wtpDefaultServer,
org.apache.maven.plugin.logging.Log log)
Detect WTP Default Server.
|
private java.lang.String |
getContainerFromExecutable(java.lang.String rawExecutable,
java.util.Map jreMap,
org.apache.maven.plugin.logging.Log logger)
Take the compiler executable and try to find a JRE that contains that compiler.
|
(package private) java.io.File |
getProjectLocation(java.io.File workspaceLocation,
java.io.File project)
Get the project location for a project in the eclipse metadata.
|
private java.lang.String |
getValue(org.codehaus.plexus.util.xml.Xpp3Dom element,
java.lang.String[] elementNames,
java.lang.String defaultValue)
get a value from a dom element.
|
void |
init(org.apache.maven.plugin.logging.Log log,
WorkspaceConfiguration workspaceConfiguration,
org.apache.maven.project.MavenProject project,
java.lang.String wtpDefaultServer) |
private IdeDependency |
readArtefact(java.io.File projectLocation,
org.apache.maven.plugin.logging.Log logger)
Read the artefact information from the pom in the project location and the eclipse project name from the .project
file.
|
private java.util.HashMap |
readAvailableJREs(java.io.File workspaceLocation,
org.apache.maven.plugin.logging.Log logger)
Read the JRE definition configured in the workspace.
|
(package private) java.util.HashMap |
readDefinedServers(WorkspaceConfiguration workspaceConfiguration,
org.apache.maven.plugin.logging.Log logger) |
private void |
readWorkspace(WorkspaceConfiguration workspaceConfiguration,
org.apache.maven.plugin.logging.Log logger)
Scan the eclipse workspace and create a array with
IdeDependency for all found artifacts. |
public static final java.lang.String BINARY_LOCATION_FILE
public static final java.lang.String METADATA_PLUGINS_ORG_ECLIPSE_CORE_RESOURCES_PROJECTS
private static final java.lang.String[] PARENT_VERSION
private static final java.lang.String[] PARENT_GROUP_ID
private static final java.lang.String[] PACKAGING
private static final java.lang.String[] VERSION
private static final java.lang.String[] GROUP_ID
private static final java.lang.String[] ARTEFACT_ID
private static final java.lang.String METADATA_PLUGINS_ORG_ECLIPSE_CORE_RUNTIME_LAUNCHING_PREFS
private static final java.lang.String METADATA_PLUGINS_ORG_ECLIPSE_CORE_RUNTIME_PREFS_VM_KEY
private static final java.lang.String METADATA_PLUGINS_ORG_ECLIPSE_CORE_RUNTIME_SERVER_PREFS
private static final java.lang.String METADATA_PLUGINS_ORG_ECLIPSE_CORE_RUNTIME_PREFS_RUNTIMES_KEY
private static final java.lang.String CLASSPATHENTRY_DEFAULT
private static final java.lang.String CLASSPATHENTRY_STANDARD
private static final java.lang.String CLASSPATHENTRY_FORMAT
public void init(org.apache.maven.plugin.logging.Log log,
WorkspaceConfiguration workspaceConfiguration,
org.apache.maven.project.MavenProject project,
java.lang.String wtpDefaultServer)
private void detectWTPDefaultServer(WorkspaceConfiguration workspaceConfiguration, java.lang.String wtpDefaultServer, org.apache.maven.plugin.logging.Log log)
workspaceConfiguration - wtpDefaultServer - log - private java.lang.String getContainerFromExecutable(java.lang.String rawExecutable,
java.util.Map jreMap,
org.apache.maven.plugin.logging.Log logger)
rawExecutable - the executable with the complete path.jreMap - the map with defined JRE's.logger - the logger to log the error'sprivate void detectDefaultJREContainer(WorkspaceConfiguration workspaceConfiguration, org.apache.maven.project.MavenProject project, org.apache.maven.plugin.logging.Log logger)
workspaceLocation - the location of the workspace.project - the maven project the get the configurationlogger - the logger for errorsjava.io.File getProjectLocation(java.io.File workspaceLocation,
java.io.File project)
throws java.io.IOException,
java.net.URISyntaxException
workspaceLocation - the location of the workspaceproject - the project subdirectory in the metadatajava.io.IOException - failures to read location filejava.net.URISyntaxException - failures to read location fileprivate java.lang.String getValue(org.codehaus.plexus.util.xml.Xpp3Dom element,
java.lang.String[] elementNames,
java.lang.String defaultValue)
element - the element to get a value fromelementNames - the sub elements to getdefaultValue - teh default value if the value was null or emptyprivate IdeDependency readArtefact(java.io.File projectLocation, org.apache.maven.plugin.logging.Log logger) throws java.io.FileNotFoundException, org.codehaus.plexus.util.xml.pull.XmlPullParserException, java.io.IOException
projectLocation - the location of the projectlogger - the logger to report errors and debug info.IdeDependency or null.java.io.FileNotFoundExceptionorg.codehaus.plexus.util.xml.pull.XmlPullParserExceptionjava.io.IOExceptionjava.util.HashMap readDefinedServers(WorkspaceConfiguration workspaceConfiguration, org.apache.maven.plugin.logging.Log logger)
private java.util.HashMap readAvailableJREs(java.io.File workspaceLocation,
org.apache.maven.plugin.logging.Log logger)
workspaceLocation - the workspace locationlogger - the logger to error messagesprivate void readWorkspace(WorkspaceConfiguration workspaceConfiguration, org.apache.maven.plugin.logging.Log logger)
IdeDependency for all found artifacts.workspaceLocation - the location of the eclipse workspace.logger - the logger to report errors and debug info.