code: public void deploy(RemoteRepository target, String pluginName, List<Artifact> artifacts) throws DeploymentException {
          DeployRequest request;
          GroupRepositoryMetadata gm;
          String prefix;
  
          request = new DeployRequest();
          for (Artifact artifact : artifacts) {
              if (artifact.getFile() == null) {
                  throw new IllegalArgumentException(artifact.toString() + " without file");
              }
              request.addArtifact(artifact);
              if (pluginName != null) {
                  gm = new GroupRepositoryMetadata(artifact.getGroupId());
                  prefix = getGoalPrefixFromArtifactId(artifact.getArtifactId());
                  gm.addPluginMapping(prefix, artifact.getArtifactId(), pluginName);
                  request.addMetadata(new MetadataBridge(gm));
              }
          }
          request.setRepository(target);
          repositorySystem.deploy(repositorySession, request);
      }
docs: CHECKSTYLE:ON