bw-maven-plugin/src/main/java/fr/fastconnect/factory/tibco/bw/maven/source/POMManager.java
public static void addProjectAsModule(File pom, String relativePath, String profileId, Log logger) throws IOException, XmlPullParserException {
		if (relativePath == null) return;

		Model model = getModelFromPOM(pom, logger);

		relativePath = relativePath.replace("\\", "/");

		if (profileId != null && !profileId.isEmpty()) {
			Profile p = getProfile(model, profileId);
			if (p != null) {
				p.addModule(relativePath);
			}
		} else {
			model.addModule(relativePath);
		}
		
		writeModelToPOM(model, pom, logger);
	}
public static void addProjectAsModule(File pom, String relativePath, String profileId, Log logger) throws IOException, XmlPullParserException {
		if (relativePath == null) return;

		Model model = getModelFromPOM(pom, logger);

		relativePath = relativePath.replace("\\", "/");

		if (profileId != null && !profileId.isEmpty()) {
			Profile p = getProfile(model, profileId);
			if (p != null) {
				p.addModule(relativePath);
			}
		} else {
			model.addModule(relativePath);
		}
		
		writeModelToPOM(model, pom, logger);
	}
Add a project as a module.

@param pom
@param relativePath
@param logger
@throws IOException
@throws XmlPullParserException