diff options
Diffstat (limited to 'framework/src/onos/tools/package/maven-plugin')
2 files changed, 7 insertions, 1 deletions
diff --git a/framework/src/onos/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosAppMojo.java b/framework/src/onos/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosAppMojo.java index bfc6127a..5558b13a 100644 --- a/framework/src/onos/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosAppMojo.java +++ b/framework/src/onos/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosAppMojo.java @@ -62,6 +62,7 @@ public class OnosAppMojo extends AbstractMojo { private static final String ONOS_APP_NAME = "onos.app.name"; private static final String ONOS_APP_ORIGIN = "onos.app.origin"; + private static final String ONOS_APP_REQUIRES = "onos.app.requires"; private static final String JAR = "jar"; private static final String XML = "xml"; @@ -80,6 +81,7 @@ public class OnosAppMojo extends AbstractMojo { private String name; private String origin; + private String requiredApps; private String version = DEFAULT_VERSION; private String featuresRepo = DEFAULT_FEATURES_REPO; private List<String> artifacts; @@ -160,6 +162,9 @@ public class OnosAppMojo extends AbstractMojo { origin = (String) project.getProperties().get(ONOS_APP_ORIGIN); origin = origin != null ? origin : DEFAULT_ORIGIN; + requiredApps = (String) project.getProperties().get(ONOS_APP_REQUIRES); + requiredApps = requiredApps == null ? "" : requiredApps; + if (appFile.exists()) { loadAppFile(appFile); } else { @@ -338,6 +343,7 @@ public class OnosAppMojo extends AbstractMojo { return string == null ? null : string.replaceAll("\\$\\{onos.app.name\\}", name) .replaceAll("\\$\\{onos.app.origin\\}", origin) + .replaceAll("\\$\\{onos.app.requires\\}", requiredApps) .replaceAll("\\$\\{project.groupId\\}", projectGroupId) .replaceAll("\\$\\{project.artifactId\\}", projectArtifactId) .replaceAll("\\$\\{project.version\\}", projectVersion) diff --git a/framework/src/onos/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/app.xml b/framework/src/onos/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/app.xml index 0f3133d3..84998807 100644 --- a/framework/src/onos/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/app.xml +++ b/framework/src/onos/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/app.xml @@ -16,7 +16,7 @@ --> <app name="${onos.app.name}" origin="${onos.app.origin}" version="${project.version}" featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" - features="${project.artifactId}"> + features="${project.artifactId}" apps="${onos.app.requires}"> <description>${project.description}</description> <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact> </app> |