001package org.apache.maven.plugin.prefix; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022import java.util.List; 023 024import org.apache.maven.model.Model; 025import org.eclipse.aether.RepositorySystemSession; 026import org.eclipse.aether.repository.RemoteRepository; 027 028/** 029 * Collects settings required to resolve a plugin prefix. 030 * 031 * @since 3.0 032 * @author Benjamin Bentmann 033 */ 034public interface PluginPrefixRequest 035{ 036 037 /** 038 * Gets the prefix of the plugin. 039 * 040 * @return The prefix of the plugin. 041 */ 042 String getPrefix(); 043 044 /** 045 * Sets the prefix of the plugin. 046 * 047 * @param prefix The prefix of the plugin. 048 * @return This request, never {@code null}. 049 */ 050 PluginPrefixRequest setPrefix( String prefix ); 051 052 /** 053 * Gets the list of group ids to scan for the plugin prefix. 054 * 055 * @return The list of group ids to scan for the plugin prefix, never {@code null}. 056 */ 057 List<String> getPluginGroups(); 058 059 /** 060 * Sets the list of group ids to scan for the plugin prefix. 061 * 062 * @param pluginGroups The list of group ids to scan for the plugin prefix, may be {@code null}. 063 * @return This request, never {@code null}. 064 */ 065 PluginPrefixRequest setPluginGroups( List<String> pluginGroups ); 066 067 /** 068 * Gets the POM whose build plugins are to be scanned for the prefix. 069 * 070 * @return The POM whose build plugins are to be scanned for the prefix or {@code null} to only search the plugin 071 * repositories. 072 */ 073 Model getPom(); 074 075 /** 076 * Sets the POM whose build plugins are to be scanned for the prefix. 077 * 078 * @param pom The POM whose build plugins are to be scanned for the prefix, may be {@code null} to only search the 079 * plugin repositories. 080 * @return This request, never {@code null}. 081 */ 082 PluginPrefixRequest setPom( Model pom ); 083 084 /** 085 * Gets the remote repositories to use. 086 * 087 * @return The remote repositories to use, never {@code null}. 088 */ 089 List<RemoteRepository> getRepositories(); 090 091 /** 092 * Sets the remote repositories to use. <em>Note:</em> When creating a request from a project, be sure to use the 093 * plugin repositories and not the regular project repositories. 094 * 095 * @param repositories The remote repositories to use. 096 * @return This request, never {@code null}. 097 */ 098 PluginPrefixRequest setRepositories( List<RemoteRepository> repositories ); 099 100 /** 101 * Gets the session to use for repository access. 102 * 103 * @return The repository session or {@code null} if not set. 104 */ 105 RepositorySystemSession getRepositorySession(); 106 107 /** 108 * Sets the session to use for repository access. 109 * 110 * @param repositorySession The repository session to use. 111 * @return This request, never {@code null}. 112 */ 113 PluginPrefixRequest setRepositorySession( RepositorySystemSession repositorySession ); 114 115}