@Override public boolean apply( final String input ) { return M2ArtifactRecognizer.isMetadata( input ); } } );
@Override public boolean isMavenMetadataPath( final String path ) { return M2ArtifactRecognizer.isMetadata( path ); } }
@Override public boolean isMavenMetadataPath( String path ) { return M2ArtifactRecognizer.isMetadata( path ); }
@Override public boolean isMavenMetadataPath( String path ) { return M2ArtifactRecognizer.isMetadata( path ); }
@Override protected void enforceWritePolicy( ResourceStoreRequest request, Action action ) throws IllegalRequestException { // allow updating of metadata // we also need to allow updating snapshots if ( !M2ArtifactRecognizer.isMetadata( request.getRequestPath() ) && !M2ArtifactRecognizer.isSnapshot( request.getRequestPath() ) ) { super.enforceWritePolicy( request, action ); } }
public void processFile( String path ) throws IOException { // remove checksums that does not have corresponding "main" file (those without .sha1 ext) if ( isObsoleteChecksum( path ) ) { remove( path ); return; } rebuildChecksum( path ); if ( !M2ArtifactRecognizer.isMetadata( path ) ) { updateMavenInfo( path ); } }
@Override public Boolean getValueFor( RepositoryItemUid subject ) { return subject.getRepository().getRepositoryKind().isFacetAvailable( MavenRepository.class ) && M2ArtifactRecognizer.isMetadata( subject.getPath() ) && !M2ArtifactRecognizer.isChecksum( subject.getPath() ); } }
&& M2ArtifactRecognizer.isMetadata( item.getPath() ) )
@Override protected StorageItem doRetrieveItem( ResourceStoreRequest request ) throws IllegalOperationException, ItemNotFoundException, StorageException { if ( M2ArtifactRecognizer.isMetadata( request.getRequestPath() ) && !M2ArtifactRecognizer.isChecksum( request.getRequestPath() ) ) { // metadata checksum files are calculated and cached as side-effect // of doRetrieveMetadata. try { return doRetrieveMetadata( request ); } catch ( UnsupportedStorageOperationException e ) { throw new LocalStorageException( e ); } } return super.doRetrieveItem( request ); }
if ( M2ArtifactRecognizer.isMetadata( request.getRequestPath() ) && userSupportedVersion != null && !ModelVersionUtility.LATEST_MODEL_VERSION.equals( userSupportedVersion ) )
@Override protected boolean isOld( StorageItem item ) { if ( M2ArtifactRecognizer.isMetadata( item.getPath() ) ) { return isOld( getMetadataMaxAge(), item ); } if ( M2ArtifactRecognizer.isSnapshot( item.getPath() ) ) { return isOld( getArtifactMaxAge(), item ); } // we are using Gav to test the path final Gav gav = getGavCalculator().pathToGav( item.getPath() ); if ( gav == null ) { // this is not an artifact, it is just any "file" return super.isOld( item ); } // it is a release return isOld( getArtifactMaxAge(), item ); }
public boolean shouldServeByPolicies( ResourceStoreRequest request ) if ( M2ArtifactRecognizer.isMetadata( request.getRequestPath() ) )