001/*
002 * SPDX-License-Identifier: Apache-2.0
003 *
004 * Copyright 2020-2024 Andres Almiray.
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 *     https://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018package org.kordamp.maven.checker.toolprovider;
019
020import org.kordamp.jipsy.annotations.ServiceProviderFor;
021import org.kordamp.maven.checker.cli.Main;
022
023import java.io.PrintWriter;
024import java.util.spi.ToolProvider;
025
026/**
027 * @author Andres Almiray
028 * @since 1.1.0
029 */
030@ServiceProviderFor(ToolProvider.class)
031public class Pomchecker implements ToolProvider {
032    @Override
033    public String name() {
034        return "pomchecker";
035    }
036
037    @Override
038    public int run(PrintWriter out, PrintWriter err, String... args) {
039        return Main.run(out, err, args);
040    }
041
042    public static void main(String[] args) {
043        PrintWriter out = new PrintWriter(System.out, true);
044        PrintWriter err = new PrintWriter(System.err, true);
045        System.exit(Main.run(out, err, args));
046    }
047}