private void copyDesigner5Prefs() throws IOException {
    """
	This will create the 'Designer5.prefs' file in 'target/.TIBCO' which will
	override the platform TIBCO_HOME directory.
	
	The content of the 'Designer5.prefs' will be a copy of the original
	'Designer5.prefs' file found on the current system (in the user home dir)
	However all the references to alias files will be removed and replaced by
	the actual alias files referencing Maven artifacts
	
	@throws IOException
    """
		File designer5Prefs = getDesigner5Prefs();

		// copy system 'Designer5.prefs' to this ".TIBCO" directory
		File systemDesigner5Prefs = new File(System.getProperty("user.home") + "/" + TIBCO_HOME_DIR + "/" + DESIGNER5_PREFS);
		getLog().debug(DESIGNER5_PREFS + " : " + systemDesigner5Prefs.getAbsolutePath());
		if (systemDesigner5Prefs.exists()) {
			copyFile(systemDesigner5Prefs, designer5Prefs);
		} else {
			designer5Prefs.createNewFile();
		}

		// remove file aliases
		ReplaceRegExp replaceRegExp = new ReplaceRegExp();
		replaceRegExp.setFile(designer5Prefs);
		replaceRegExp.setMatch(FILE_ALIAS_PREFIX_ESCAPED + "([0-9]*)=(.*)");
		replaceRegExp.setReplace("");
		replaceRegExp.setByLine(true);
		replaceRegExp.execute();

		// replace with actual file aliases (which are Maven artifacts)
		FileWriter file = null;
		BufferedWriter buffer = null;
		PrintWriter designer5PrefsOut = null;
		try {
			file = new FileWriter(designer5Prefs, true);
			buffer = new BufferedWriter(file);
			designer5PrefsOut = new PrintWriter(buffer);
			designer5PrefsOut.println("");

			// first the Projlibs aliases
			int i = 0;
			if (!hideLibraryResources) { // implements the "Hide Library Resources" of TIBCO Designer

				for (Dependency dependency : getProjlibsDependencies()) {
					String projlibName = getProjlibName(dependency);
					String projlibAlias = getProjlibAlias(dependency);
					String projlibPath = getDependencyPath(projlibName);
					designer5PrefsOut.println(FILE_ALIAS_PREFIX + (i++) + "=" + projlibAlias + "\\=" + projlibPath);
				}
			}

			// then the Jar aliases
			for (Dependency dependency : getJarDependencies()) {
				String jarName = getJarName(dependency, false);
				String jarAlias = getJarAlias(dependency, false);
				String jarPath = getDependencyPath(jarName);
				// String jarNameUnderscored = getJarName(dependency, true);
				designer5PrefsOut.println(FILE_ALIAS_PREFIX + (i++) + "=" + jarAlias + "\\=" + jarPath);
			}
		} finally {
			designer5PrefsOut.close();
			buffer.close();
			file.close();
		}
	}
private void copyDesigner5Prefs() throws IOException {
		File designer5Prefs = getDesigner5Prefs();

		// copy system 'Designer5.prefs' to this ".TIBCO" directory
		File systemDesigner5Prefs = new File(System.getProperty("user.home") + "/" + TIBCO_HOME_DIR + "/" + DESIGNER5_PREFS);
		getLog().debug(DESIGNER5_PREFS + " : " + systemDesigner5Prefs.getAbsolutePath());
		if (systemDesigner5Prefs.exists()) {
			copyFile(systemDesigner5Prefs, designer5Prefs);
		} else {
			designer5Prefs.createNewFile();
		}

		// remove file aliases
		ReplaceRegExp replaceRegExp = new ReplaceRegExp();
		replaceRegExp.setFile(designer5Prefs);
		replaceRegExp.setMatch(FILE_ALIAS_PREFIX_ESCAPED + "([0-9]*)=(.*)");
		replaceRegExp.setReplace("");
		replaceRegExp.setByLine(true);
		replaceRegExp.execute();

		// replace with actual file aliases (which are Maven artifacts)
		FileWriter file = null;
		BufferedWriter buffer = null;
		PrintWriter designer5PrefsOut = null;
		try {
			file = new FileWriter(designer5Prefs, true);
			buffer = new BufferedWriter(file);
			designer5PrefsOut = new PrintWriter(buffer);
			designer5PrefsOut.println("");

			// first the Projlibs aliases
			int i = 0;
			if (!hideLibraryResources) { // implements the "Hide Library Resources" of TIBCO Designer

				for (Dependency dependency : getProjlibsDependencies()) {
					String projlibName = getProjlibName(dependency);
					String projlibAlias = getProjlibAlias(dependency);
					String projlibPath = getDependencyPath(projlibName);
					designer5PrefsOut.println(FILE_ALIAS_PREFIX + (i++) + "=" + projlibAlias + "\\=" + projlibPath);
				}
			}

			// then the Jar aliases
			for (Dependency dependency : getJarDependencies()) {
				String jarName = getJarName(dependency, false);
				String jarAlias = getJarAlias(dependency, false);
				String jarPath = getDependencyPath(jarName);
				// String jarNameUnderscored = getJarName(dependency, true);
				designer5PrefsOut.println(FILE_ALIAS_PREFIX + (i++) + "=" + jarAlias + "\\=" + jarPath);
			}
		} finally {
			designer5PrefsOut.close();
			buffer.close();
			file.close();
		}
	}
private void copyDesigner5Prefs ( ) throws IOException { File designer5Prefs = getDesigner5Prefs ( ) ; // copy system 'Designer5.prefs' to this ".TIBCO" directory File systemDesigner5Prefs = new File ( System . getProperty ( "user.home" ) + "/" + TIBCO_HOME_DIR + "/" + DESIGNER5_PREFS ) ; getLog ( ) . debug ( DESIGNER5_PREFS + " : " + systemDesigner5Prefs . getAbsolutePath ( ) ) ; if ( systemDesigner5Prefs . exists ( ) ) { copyFile ( systemDesigner5Prefs , designer5Prefs ) ; } else { designer5Prefs . createNewFile ( ) ; } // remove file aliases ReplaceRegExp replaceRegExp = new ReplaceRegExp ( ) ; replaceRegExp . setFile ( designer5Prefs ) ; replaceRegExp . setMatch ( FILE_ALIAS_PREFIX_ESCAPED + "([0-9]*)=(.*)" ) ; replaceRegExp . setReplace ( "" ) ; replaceRegExp . setByLine ( true ) ; replaceRegExp . execute ( ) ; // replace with actual file aliases (which are Maven artifacts) FileWriter file = null ; BufferedWriter buffer = null ; PrintWriter designer5PrefsOut = null ; try { file = new FileWriter ( designer5Prefs , true ) ; buffer = new BufferedWriter ( file ) ; designer5PrefsOut = new PrintWriter ( buffer ) ; designer5PrefsOut . println ( "" ) ; // first the Projlibs aliases int i = 0 ; if ( ! hideLibraryResources ) { // implements the "Hide Library Resources" of TIBCO Designer for ( Dependency dependency : getProjlibsDependencies ( ) ) { String projlibName = getProjlibName ( dependency ) ; String projlibAlias = getProjlibAlias ( dependency ) ; String projlibPath = getDependencyPath ( projlibName ) ; designer5PrefsOut . println ( FILE_ALIAS_PREFIX + ( i ++ ) + "=" + projlibAlias + "\\=" + projlibPath ) ; } } // then the Jar aliases for ( Dependency dependency : getJarDependencies ( ) ) { String jarName = getJarName ( dependency , false ) ; String jarAlias = getJarAlias ( dependency , false ) ; String jarPath = getDependencyPath ( jarName ) ; // String jarNameUnderscored = getJarName(dependency, true); designer5PrefsOut . println ( FILE_ALIAS_PREFIX + ( i ++ ) + "=" + jarAlias + "\\=" + jarPath ) ; } } finally { designer5PrefsOut . close ( ) ; buffer . close ( ) ; file . close ( ) ; } }
This will create the 'Designer5.prefs' file in 'target/.TIBCO' which will
override the platform TIBCO_HOME directory.

The content of the 'Designer5.prefs' will be a copy of the original
'Designer5.prefs' file found on the current system (in the user home dir)
However all the references to alias files will be removed and replaced by
the actual alias files referencing Maven artifacts

@throws IOException
This will create the Designer5 . prefs file in target / . TIBCO which will override the platform TIBCO_HOME directory .