if ( type != null ) classifier = type.getClassifier();
this.classifier = emptify( type.getClassifier() ); this.extension = emptify( type.getExtension() ); this.properties = merge( properties, ( type != null ) ? type.getProperties() : null );
@Override public String getCoordinates(Artifact artifact) { log.debug(" Encoding Coordinates For: " + artifact); // Get the extension according to the artifact type. String extension = session.getArtifactTypeRegistry().get(artifact.getType()).getExtension(); // assert that the file extension matches the artifact packaging extension type, if there is an artifact file. if (artifact.getFile() != null && !artifact.getFile().getName().toLowerCase().endsWith(extension.toLowerCase())) { String filename = artifact.getFile().getName(); String fileExtension = filename.substring(filename.lastIndexOf('.') + 1); log.warn( " Artifact file name: " + artifact.getFile().getName() + " of type " + artifact.getType() + " does not match the extension for the ArtifactType: " + extension + ". " + "This is likely an issue with the packaging definition for '" + artifact.getType() + "' artifacts, which may be missing an extension definition. " + "The gitflow helper catalog will use the actual file extension: " + fileExtension ); extension = fileExtension; } return getCoordinates( artifact.getGroupId(), artifact.getArtifactId(), project.getVersion(), extension, artifact.hasClassifier() ? artifact.getClassifier() : null ); }
artifact.setProperties(type.getProperties());
/** * Adds the specified artifact type to the registry. * * @param type The artifact type to add, must not be {@code null}. * @return This registry for chaining, never {@code null}. */ public SimpleArtifactTypeRegistry add( ArtifactType type ) { types.put( type.getId(), type ); return this; }
this.classifier = emptify( type.getClassifier() ); this.extension = emptify( type.getExtension() ); this.properties = merge( properties, ( type != null ) ? type.getProperties() : null );
artifactExtension = artifactType.getExtension(); } else { artifactExtension = model.getPackaging();
/** * Adds the specified artifact type to the registry. * * @param type The artifact type to add, must not be {@code null}. * @return This registry for chaining, never {@code null}. */ public SimpleArtifactTypeRegistry add( ArtifactType type ) { types.put( type.getId(), type ); return this; }