public String getGroupId() { return emptify( metadata.getGroupId() ); }
request.addMetadata( new MetadataBridge( metadata ) );
request.addMetadata( new MetadataBridge( metadata ) );
/** * You'll usually pass one jar artifact and the corresponding pom artifact. * @param pluginName null if you deploy normal artifacts; none-null for Maven Plugins, that you wish to add a plugin mapping for; * specifies the plugin name in this case. * See http://svn.apache.org/viewvc/maven/plugin-tools/tags/maven-plugin-tools-3.2/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/AddPluginArtifactMetadataMojo.java?revision=1406624&view=markup */ // CHECKSTYLE:ON 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); }
public String getArtifactId() { return metadata.storedInGroupDirectory() ? "" : emptify( metadata.getArtifactId() ); }
public String getVersion() { return metadata.storedInArtifactVersionDirectory() ? emptify( metadata.getBaseVersion() ) : ""; }