@Override protected void publishArtifact(IArtifactDescriptor descriptor, File jarFile, IPublisherInfo publisherInfo) { // no files to publish so this is done. if (jarFile == null || publisherInfo == null) return; // if the destination already contains the descriptor, there is nothing to do. IArtifactRepository destination = publisherInfo.getArtifactRepository(); if (destination == null || destination.contains(descriptor)) return; super.publishArtifact(descriptor, jarFile, publisherInfo); // if we are assimilating pack200 files then add the packed descriptor // into the repo assuming it does not already exist. boolean reuse = "true".equals(destination.getProperties().get(AbstractPublisherApplication.PUBLISH_PACK_FILES_AS_SIBLINGS)); //$NON-NLS-1$ if (reuse && (publisherInfo.getArtifactOptions() & IPublisherInfo.A_PUBLISH) > 0) { File packFile = new Path(jarFile.getAbsolutePath()).addFileExtension("pack.gz").toFile(); //$NON-NLS-1$ if (packFile.exists()) { IArtifactDescriptor ad200 = createPack200ArtifactDescriptor(descriptor.getArtifactKey(), packFile, descriptor.getProperty(IArtifactDescriptor.ARTIFACT_SIZE)); publishArtifact(ad200, packFile, publisherInfo); } } }
@Override protected void publishArtifact(IArtifactDescriptor descriptor, File jarFile, IPublisherInfo publisherInfo) { // no files to publish so this is done. if (jarFile == null || publisherInfo == null) return; // if the destination already contains the descriptor, there is nothing to do. IArtifactRepository destination = publisherInfo.getArtifactRepository(); if (destination == null || destination.contains(descriptor)) return; super.publishArtifact(descriptor, jarFile, publisherInfo); // if we are assimilating pack200 files then add the packed descriptor // into the repo assuming it does not already exist. boolean reuse = "true".equals(destination.getProperties().get(AbstractPublisherApplication.PUBLISH_PACK_FILES_AS_SIBLINGS)); //$NON-NLS-1$ if (reuse && (publisherInfo.getArtifactOptions() & IPublisherInfo.A_PUBLISH) > 0) { File packFile = new Path(jarFile.getAbsolutePath()).addFileExtension("pack.gz").toFile(); //$NON-NLS-1$ if (packFile.exists()) { IArtifactDescriptor ad200 = createPack200ArtifactDescriptor(descriptor.getArtifactKey(), packFile, descriptor.getProperty(IArtifactDescriptor.ARTIFACT_SIZE)); publishArtifact(ad200, packFile, publisherInfo); } } }
@Override protected void publishArtifact(IArtifactDescriptor descriptor, File jarFile, IPublisherInfo publisherInfo) { // no files to publish so this is done. if (jarFile == null || publisherInfo == null) return; // if the destination already contains the descriptor, there is nothing to do. IArtifactRepository destination = publisherInfo.getArtifactRepository(); if (destination == null || destination.contains(descriptor)) return; super.publishArtifact(descriptor, jarFile, publisherInfo); // if we are assimilating pack200 files then add the packed descriptor // into the repo assuming it does not already exist. boolean reuse = "true".equals(destination.getProperties().get(AbstractPublisherApplication.PUBLISH_PACK_FILES_AS_SIBLINGS)); //$NON-NLS-1$ if (reuse && (publisherInfo.getArtifactOptions() & IPublisherInfo.A_PUBLISH) > 0) { File packFile = new Path(jarFile.getAbsolutePath()).addFileExtension("pack.gz").toFile(); //$NON-NLS-1$ if (packFile.exists()) { IArtifactDescriptor ad200 = createPack200ArtifactDescriptor(descriptor.getArtifactKey(), packFile, descriptor.getProperty(IArtifactDescriptor.ARTIFACT_SIZE)); publishArtifact(ad200, packFile, publisherInfo); } } }