Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 9ebf0561e044cc8cc8b807598b4a49685fb9dc6a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*******************************************************************************
 * Copyright (c) 2008-2013 Sonatype, Inc., Jason van Zyl
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *      Sonatype, Inc. - initial API and implementation
 *      Jason van Zyl  - extension to account for Tesla
 *******************************************************************************/

package org.eclipse.m2e.core.internal.embedder;

import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.project.IMavenProjectRegistry;


/**
 * Tesla runtime loaded from the Eclipse Workspace
 * 
 * @author Eugene Kuleshov
 * @author Igor Fedorenko
 * @author Jason van Zyl
 */
public class TeslaWorkspaceRuntime extends AbstractWorkspaceRuntime {

  private static final ArtifactKey TESLA_DISTRIBUTION = new ArtifactKey(
      "io.tesla.maven", "apache-maven", "[3.1,)", null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

  private static final String MAVEN_EXECUTOR_CLASS = "org.apache.maven.cli.MavenCli"; //$NON-NLS-1$

  public TeslaWorkspaceRuntime(IMavenProjectRegistry projectManager) {
    super(projectManager);
  }

  protected ArtifactKey getDistributionArtifactKey() {
    return TESLA_DISTRIBUTION;
  }

  protected String getMainClass() {
    return MAVEN_EXECUTOR_CLASS;
  }

  public String getLocation() {
    return "TESLA_WORKSPACE";
  }

  public String toString() {
    return "Tesla Workspace (" + getVersion() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
  }
}

Back to the top