Search in sources :

Example 1 with State

use of aQute.bnd.service.url.State in project bnd by bndtools.

the class MavenRepository method fetch.

private State fetch(List<MavenBackingRepository> mbrs, String remotePath, File file) throws Exception {
    State error = State.NOT_FOUND;
    for (MavenBackingRepository mbr : mbrs) {
        TaggedData fetch = mbr.fetch(remotePath, file);
        switch(fetch.getState()) {
            case NOT_FOUND:
                break;
            case OTHER:
                error = State.OTHER;
                logger.error("Fetching artifact gives error {}", remotePath);
                break;
            case UNMODIFIED:
            case UPDATED:
                return fetch.getState();
        }
    }
    return error;
}
Also used : State(aQute.bnd.service.url.State) TaggedData(aQute.bnd.service.url.TaggedData)

Aggregations

State (aQute.bnd.service.url.State)1 TaggedData (aQute.bnd.service.url.TaggedData)1