@Override protected void enforceWritePolicy( ResourceStoreRequest request, Action action ) throws IllegalRequestException { // allow updating of metadata // we also need to allow updating snapshots if ( !M1ArtifactRecognizer.isMetadata( request.getRequestPath() ) && !M1ArtifactRecognizer.isSnapshot( request.getRequestPath() ) ) { super.enforceWritePolicy( request, action ); } }
@Override protected boolean isOld( StorageItem item ) { if ( M1ArtifactRecognizer.isMetadata( item.getPath() ) ) { return isOld( getMetadataMaxAge(), item ); } if ( M1ArtifactRecognizer.isSnapshot( item.getPath() ) ) { return isOld( getArtifactMaxAge(), item ); } // we are using Gav to test the path final Gav gav = gavCalculator.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 ); }
if ( M1ArtifactRecognizer.isSnapshot( request.getRequestPath() ) )