|
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one |
| 3 | + * or more contributor license agreements. See the NOTICE file |
| 4 | + * distributed with this work for additional information |
| 5 | + * regarding copyright ownership. The ASF licenses this file |
| 6 | + * to you under the Apache License, Version 2.0 (the |
| 7 | + * "License"); you may not use this file except in compliance |
| 8 | + * with the License. You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, |
| 13 | + * software distributed under the License is distributed on an |
| 14 | + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | + * KIND, either express or implied. See the License for the |
| 16 | + * specific language governing permissions and limitations |
| 17 | + * under the License. |
| 18 | + */ |
| 19 | + |
| 20 | +import java.io.*; |
| 21 | +import java.util.*; |
| 22 | +import java.util.regex.*; |
| 23 | + |
| 24 | +import org.codehaus.plexus.util.*; |
| 25 | +import org.codehaus.plexus.util.xml.*; |
| 26 | + |
| 27 | +try |
| 28 | +{ |
| 29 | + File itRepoDir = new File( basedir, "target/it-repo" ); |
| 30 | + System.out.println( "Checking for existence of: " + itRepoDir ); |
| 31 | + if ( !itRepoDir.isDirectory() ) |
| 32 | + { |
| 33 | + System.out.println( "FAILED!" ); |
| 34 | + return false; |
| 35 | + } |
| 36 | + |
| 37 | + String[] files = { |
| 38 | + "org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar", |
| 39 | + "org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.pom", |
| 40 | + "org/slf4j/slf4j-api/maven-metadata-local.xml", |
| 41 | + "org/slf4j/slf4j-parent/1.7.36/slf4j-parent-1.7.36.pom", |
| 42 | + "org/slf4j/slf4j-parent/maven-metadata-local.xml", |
| 43 | + "org/slf4j/slf4j-simple/1.7.36/slf4j-simple-1.7.36.jar", |
| 44 | + "org/slf4j/slf4j-simple/1.7.36/slf4j-simple-1.7.36.pom", |
| 45 | + "org/slf4j/slf4j-simple/maven-metadata-local.xml", |
| 46 | + "test/staging-dependencies-test-scope/1.0-SNAPSHOT/staging-dependencies-test-scope-1.0-SNAPSHOT.pom", |
| 47 | + "test/staging-dependencies-test-scope/1.0-SNAPSHOT/staging-dependencies-test-scope-1.0-SNAPSHOT.jar" |
| 48 | + }; |
| 49 | + for ( String file : files ) |
| 50 | + { |
| 51 | + File stagedFile = new File( itRepoDir, file ); |
| 52 | + System.out.println( "Checking for existence of: " + stagedFile ); |
| 53 | + if ( !stagedFile.isFile() ) |
| 54 | + { |
| 55 | + throw new IllegalStateException( "Missing: " + stagedFile ); |
| 56 | + } |
| 57 | + } |
| 58 | +} |
| 59 | +catch( Throwable t ) |
| 60 | +{ |
| 61 | + t.printStackTrace(); |
| 62 | + return false; |
| 63 | +} |
| 64 | + |
| 65 | +return true; |
0 commit comments