code: public void addToArchive(final File relativeDir, final File fileOrDirToAdd) throws IOException {
  		checkArgument(!relativeDir.isAbsolute(), "'relativeDir' must be a relative directory");
  
  		if (isArchivingDisabled()) {
  			return;
  		}
  
  		if (fileOrDirToAdd.getCanonicalPath().startsWith(moduleArchiveDir.getCanonicalPath())) {
  			// File already in archive dir
  			log.info("File '" + fileOrDirToAdd + "' already in archive directory. No copying necessary.");
  			return;
  		}
  
  		File archiveTargetDir = new File(moduleArchiveDir, relativeDir.getPath());
  		if (fileOrDirToAdd.isDirectory()) {
  			copyDirectory(fileOrDirToAdd, archiveTargetDir);
  		} else {
  			copyFileToDirectory(fileOrDirToAdd, archiveTargetDir);
  		}
  	}
docs: Adds a file or directory (recursively) to the archive directory if it is not already present
  in the archive directory.
  
  @param relativeDir
  the directory relative to the archive root directory which the specified file or
  directory is added to
  @param fileOrDirToAdd
  the file or directory to add
  @throws IOException
  if an IO error occurs during copying