/* * 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 org.codehaus.plexus.util.*; boolean result = true; try { final File deployDirectory = new File( basedir, "deploy" ); if ( !deployDirectory.exists() || !deployDirectory.isDirectory() ) { System.err.println( "deployDirectory is missing or not a directory." ); return false; } // junk directory (aggregator) File junkDirectory = new File( deployDirectory, "junk" ); if ( !junkDirectory.exists() || !junkDirectory.isDirectory() ) { System.err.println( "junkDirectory is missing or not a directory." ); return false; } // plugins directory File pluginsDirectory = new File( deployDirectory, "plugins" ); if ( !pluginsDirectory.exists() || !pluginsDirectory.isDirectory() ) { System.err.println( "deploy pluginsDirectory is missing or not a directory." ); return false; } // plugin File mavenRocksDirectory = new File( pluginsDirectory, "maven-rocks-plugin" ); if ( !mavenRocksDirectory.exists() || !mavenRocksDirectory.isDirectory() ) { System.err.println( "deploy mavenRocksDirectory is missing or not a directory." ); return false; } // STAGING final File stageDirectory = new File( basedir, "target/staging" ); if ( !stageDirectory.exists() || !stageDirectory.isDirectory() ) { System.err.println( "stageDirectory is missing or not a directory." ); return false; } // plugins directory pluginsDirectory = new File( stageDirectory, "plugins" ); if ( !pluginsDirectory.exists() || !pluginsDirectory.isDirectory() ) { System.err.println( "staging pluginsDirectory is missing or not a directory." ); return false; } // plugin mavenRocksDirectory = new File( pluginsDirectory, "maven-rocks-plugin" ); if ( !mavenRocksDirectory.exists() || !mavenRocksDirectory.isDirectory() ) { System.err.println( "staging mavenRocksDirectory is missing or not a directory." ); return false; } // STAGE DEPLOY final File stageDeployDirectory = new File( basedir, "deploy/staging" ); if ( !stageDeployDirectory.exists() || !stageDeployDirectory.isDirectory() ) { System.err.println( "stageDeployDirectory is missing or not a directory." ); return false; } // plugins directory pluginsDirectory = new File( stageDeployDirectory, "plugins" ); if ( !pluginsDirectory.exists() || !pluginsDirectory.isDirectory() ) { System.err.println( "stage deploy pluginsDirectory is missing or not a directory." ); return false; } // plugin mavenRocksDirectory = new File( pluginsDirectory, "maven-rocks-plugin" ); if ( !mavenRocksDirectory.exists() || !mavenRocksDirectory.isDirectory() ) { System.err.println( "stage deploy mavenRocksDirectory is missing or not a directory." ); return false; } } catch ( IOException e ) { e.printStackTrace(); result = false; } return result;