
org.nuiton.i18n.plugin.CopyModuleResourcesMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of i18n-maven-plugin Show documentation
Show all versions of i18n-maven-plugin Show documentation
Maven plugin to deal with i18n stuff in a project, mainly base on the i18n api (but not only).
package org.nuiton.i18n.plugin;
/*-
* #%L
* I18n :: Maven Plugin
* %%
* Copyright (C) 2007 - 2024 Code Lutin, Ultreia.io
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* .
* #L%
*/
import io.ultreia.java4all.i18n.spi.builder.I18nModule;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.ResolutionScope;
import java.io.IOException;
/**
* To copy all I18n resources of the module.
*
* This is done at compile time in order to be able to collect getters generated by annotation processing at compile time.
*
* Created on 06/09/2021.
*
* @author Tony Chemit - [email protected]
* @since 3.0.0
*/
@Mojo(name = "copy-module-resources", threadSafe = true, defaultPhase = LifecyclePhase.PROCESS_CLASSES, requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME)
public class CopyModuleResourcesMojo extends I18nMojoWithI18nModuleSupport {
@Override
protected void doAction() throws IOException {
I18nModule i18nModule = getI18nModule();
copyModuleResources(i18nModule, getBuildOutputDirectory().toPath());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy