core/src/main/java/io/fabric8/maven/core/util/ProfileUtil.java
public static Profile findProfile(String profileArg, File resourceDir) throws IOException {
        try {
            String profile = profileArg == null ? DEFAULT_PROFILE : profileArg;
            Profile profileFound = lookup(profile, resourceDir);
            if (profileFound != null) {
                if(profileFound.getParentProfile() != null) {
                    profileFound = inheritFromParentProfile(profileFound, resourceDir);
                    log.info(profileFound + " inheriting resources from " + profileFound.getParentProfile());
                }
                return profileFound;
            } else {
                throw new IllegalArgumentException("No profile '" + profile + "' defined");
            }
        } catch (IOException e) {
            throw new IOException("Error while looking up profile " + profileArg + ": " + e.getMessage(),e);
        }
    }
public static Profile findProfile(String profileArg, File resourceDir) throws IOException {
        try {
            String profile = profileArg == null ? DEFAULT_PROFILE : profileArg;
            Profile profileFound = lookup(profile, resourceDir);
            if (profileFound != null) {
                if(profileFound.getParentProfile() != null) {
                    profileFound = inheritFromParentProfile(profileFound, resourceDir);
                    log.info(profileFound + " inheriting resources from " + profileFound.getParentProfile());
                }
                return profileFound;
            } else {
                throw new IllegalArgumentException("No profile '" + profile + "' defined");
            }
        } catch (IOException e) {
            throw new IOException("Error while looking up profile " + profileArg + ": " + e.getMessage(),e);
        }
    }
Find a profile. Profiles are looked up at various locations:

<ul>
<li>A given directory with the name profiles.yml (and variations, {@link #findProfile(String, File)}</li>
</ul>
@param profileArg the profile's name
@param resourceDir a directory to check for profiles.
@return the profile found or the default profile if none of this name is given
@throws IOException