001/*
002 * JDrupes Builder
003 * Copyright (C) 2025 Michael N. Lipp
004 * 
005 * This program is free software: you can redistribute it and/or modify
006 * it under the terms of the GNU Affero General Public License as
007 * published by the Free Software Foundation, either version 3 of the
008 * License, or (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
013 * GNU Affero General Public License for more details.
014 *
015 * You should have received a copy of the GNU Affero General Public License
016 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
017 */
018
019package org.jdrupes.builder.mvnrepo;
020
021import org.eclipse.aether.repository.RemoteRepository;
022import org.jdrupes.builder.api.PropertyKey;
023
024/// Additional properties used with maven repositories.
025///
026@SuppressWarnings("PMD.DataClass")
027public final class MvnProperties {
028
029    /// The group that the project's artifacts belong to. Defaults to `null`.
030    @SuppressWarnings({ "PMD.FieldNamingConventions",
031        "PMD.AvoidDuplicateLiterals" })
032    public static final PropertyKey<String> GroupId
033        = new PropertyKey<>(String.class);
034
035    /// The artifact id. Defaults to `null`.
036    @SuppressWarnings("PMD.FieldNamingConventions")
037    public static final PropertyKey<String> ArtifactId
038        = new PropertyKey<>(String.class);
039
040    /// A key that can be used for centralized management of
041    /// repositories for [MvnRepoLookup]s. The pattern is to set the
042    /// value of this property in the root project and then use
043    /// `new MvnRepoLookup().addRepositories(get(LookupRepositories));`
044    /// wherever an instance of [MvnRepoLookup] is required.
045    @SuppressWarnings("PMD.FieldNamingConventions")
046    public static final PropertyKey<
047            RemoteRepository[]> LookupRepositories
048                = new PropertyKey<>(RemoteRepository[].class);
049
050    /// A key that can be used for centralized management of
051    /// [MvnPublishingDestination]s. The pattern is to set the
052    /// value of this property in the root project and then use
053    /// `generator(MvnPublisher::new).destination(get(PublishingDestinations));`
054    /// in each project when adding a [MvnPublisher].
055    @SuppressWarnings("PMD.FieldNamingConventions")
056    public static final PropertyKey<
057            MvnPublishingDestination[]> PublishingDestinations
058                = new PropertyKey<>(MvnPublishingDestination[].class);
059
060    private MvnProperties() {
061    }
062}