Search in sources :

Example 1 with MavenProjectBinaryImpl

use of org.guvnor.ala.build.maven.model.impl.MavenProjectBinaryImpl in project kie-wb-common by kiegroup.

the class MavenBuildExecConfigExecutor method apply.

@Override
public Optional<BinaryConfig> apply(final MavenBuild mavenBuild, final MavenBuildExecConfig mavenBuildExecConfig) {
    final Project project = mavenBuild.getProject();
    final MavenProject mavenProject = build(project, mavenBuild.getGoals(), mavenBuild.getProperties());
    final Path path = FileSystems.getFileSystem(URI.create("file://default")).getPath(project.getTempDir() + "/target/" + project.getExpectedBinary());
    final MavenBinary binary = new MavenProjectBinaryImpl(path, project, mavenProject.getGroupId(), mavenProject.getArtifactId(), mavenProject.getVersion());
    buildRegistry.registerBinary(binary);
    return Optional.of(binary);
}
Also used : Path(org.uberfire.java.nio.file.Path) Project(org.guvnor.ala.build.Project) MavenProject(org.apache.maven.project.MavenProject) MavenProject(org.apache.maven.project.MavenProject) MavenProjectBinaryImpl(org.guvnor.ala.build.maven.model.impl.MavenProjectBinaryImpl) MavenBinary(org.guvnor.ala.build.maven.model.MavenBinary)

Aggregations

MavenProject (org.apache.maven.project.MavenProject)1 Project (org.guvnor.ala.build.Project)1 MavenBinary (org.guvnor.ala.build.maven.model.MavenBinary)1 MavenProjectBinaryImpl (org.guvnor.ala.build.maven.model.impl.MavenProjectBinaryImpl)1 Path (org.uberfire.java.nio.file.Path)1