blob: 1c9fd40e4b6e4f20bd641c0bf3fd73ba6f03186f [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import java.io.*;
import java.net.*;
import java.util.jar.*;
boolean result = true;
try
{
File dir = new File( basedir, "target/include-project-artifact-1.0-SNAPSHOT-bin" );
System.out.println( "Checking for existence and file-ishness of: " + dir );
if ( !dir.exists() || !dir.isDirectory() )
{
System.err.println( "assembled directory is missing or not a directory." );
return false;
}
File projectArtifact = new File( dir, "lib/include-project-artifact-1.0-SNAPSHOT.jar" );
System.out.println( "Looking for 'lib/include-project-artifact-1.0-SNAPSHOT.jar file in assembly." );
if ( !projectArtifact.exists() )
{
System.err.println( "project-artifact entry is missing." );
return false;
}
System.out.println( "Looking for absence of 'lib/junit.jar' jar entry." );
if ( new File( dir, "lib/junit-3.8.1.jar" ).exists() )
{
System.err.println( "junit jar should not be present." );
return false;
}
}
catch( IOException e )
{
e.printStackTrace();
result = false;
}
return result;