org.eclipse.tycho.osgi.adapters.MavenReactorProjectCoordinates.java Source code

Java tutorial

Introduction

Here is the source code for org.eclipse.tycho.osgi.adapters.MavenReactorProjectCoordinates.java

Source

/*******************************************************************************
 * Copyright (c) 2012 SAP AG and others.
 * 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:
 *    SAP AG - initial API and implementation
 *******************************************************************************/
package org.eclipse.tycho.osgi.adapters;

import org.apache.maven.project.MavenProject;
import org.eclipse.tycho.BuildOutputDirectory;
import org.eclipse.tycho.ReactorProjectCoordinates;

public class MavenReactorProjectCoordinates implements ReactorProjectCoordinates {

    private final MavenProject project;

    // derived members
    private final BuildOutputDirectory targetFolder;

    public MavenReactorProjectCoordinates(MavenProject project) {
        this.project = project;
        this.targetFolder = new BuildOutputDirectory(project.getBuild().getDirectory());
    }

    public String getGroupId() {
        return project.getGroupId();
    }

    public String getArtifactId() {
        return project.getArtifactId();
    }

    public String getVersion() {
        return project.getVersion();
    }

    public BuildOutputDirectory getBuildDirectory() {
        return targetFolder;
    }

}