![JAR search and dependency download from the Maven repository](/logo.png)
protoj.lang.internal.sample.snippet.UseCaseProfile Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protoj-jdk6 Show documentation
Show all versions of protoj-jdk6 Show documentation
ProtoJ: the pure java build library with maximum dependencies
The newest version!
package protoj.lang.internal.sample.snippet;
import java.io.File;
import protoj.lang.StandardProject;
/**
* A code fragment used to demonstrate configuring a project with profiles.
*
* @author Ashley Williams
*
*/
public final class UseCaseProfile {
/**
* Enables the specified project to be configured either from a directory
* and from a network address via scp. Usually only one protocol would be
* chosen in a real project.
*
* @param project
*/
public void addConfig(StandardProject project) {
// 1. Enable project configuration from a directory on a mounted share.
//
// In this example the profile home directory is under the project home
// directory. All profiles are simply subdirectories directly underneath
// and are referred to by name when applying the dirconf command.
File home = new File(System.getProperty("user.home"), ".acme");
project.initDirConfig(home);
// 2. Enable project configuration from a directory on the network.
//
// In this example the profile home url is located on another machine
// that can be reached via ssh. All profiles are simply subdirectories
// directly underneath and are referred to by name when applying the
// scpconf command.
String url = "configuser@host:~/allprofiles";
project.initScpConfig(url);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy