001/*
002 * Copyright 2017-2022 original authors
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * https://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package io.micronaut.maven.aot;
017
018import io.micronaut.maven.services.CompilerService;
019import io.micronaut.maven.services.DependencyResolutionService;
020import io.micronaut.maven.services.ExecutorService;
021import org.apache.maven.execution.MavenSession;
022import org.apache.maven.plugins.annotations.LifecyclePhase;
023import org.apache.maven.plugins.annotations.Mojo;
024import org.apache.maven.plugins.annotations.ResolutionScope;
025import org.apache.maven.project.MavenProject;
026import org.apache.maven.toolchain.ToolchainManager;
027
028import javax.inject.Inject;
029
030/**
031 * Standalone Micronaut AOT sample configuration goal.
032 *
033 * @author Álvaro Sánchez-Mariscal
034 * @since 3.2.0
035 */
036@Mojo(name = AbstractAotSampleMojo.NAME, defaultPhase = LifecyclePhase.PACKAGE, requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME)
037public class AotSampleMojo extends AbstractAotSampleMojo {
038
039    @Inject
040    public AotSampleMojo(CompilerService compilerService,
041                         ExecutorService executorService,
042                         MavenProject mavenProject,
043                         DependencyResolutionService dependencyResolutionService,
044                         MavenSession mavenSession,
045                         ToolchainManager toolchainManager) {
046        super(compilerService, executorService, mavenProject, dependencyResolutionService, mavenSession, toolchainManager);
047    }
048
049    @Override
050    protected boolean alignRuntimeWithPackaging() {
051        return false;
052    }
053}