Jian Li
Committed by Gerrit Code Review

[ONOS-3634] Remove readme tag from app.xml

Change-Id: I536f54f74586a0bb5c671564f71b44a0a871d5f6
......@@ -19,7 +19,6 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>ONOS authentication application.</readme>
<artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-xos-integration/${project.version}</artifact>
<bundle>mvn:com.sun.jersey/jersey-client/1.19</bundle>
......
......@@ -19,7 +19,6 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>BGP router application.</readme>
<artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-routing-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-routing/${project.version}</artifact>
......
......@@ -19,7 +19,6 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>DHCP server application.</readme>
<artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-dhcp-api/${project.version}</artifact>
</app>
......
......@@ -19,7 +19,6 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>ONOS fault management application.</readme>
<artifact>mvn:${project.groupId}/onos-app-fm-mgr/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-fm-web/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-fm-gui/${project.version}</artifact>
......
......@@ -19,7 +19,6 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>OLT application for CORD.</readme>
<artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-olt-api/${project.version}</artifact>
</app>
......
......@@ -19,7 +19,6 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>SONA Openstack Switching application.</readme>
<artifact>mvn:${project.groupId}/onos-app-openstackswitching/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-dhcp-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-dhcp/${project.version}</artifact>
......
......@@ -19,7 +19,6 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>SDN-IP peering application.</readme>
<artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-routing-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-routing/${project.version}</artifact>
......
......@@ -19,7 +19,6 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>Virtual router application.</readme>
<artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-routing-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-routing/${project.version}</artifact>
......
......@@ -19,7 +19,6 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>Virtual tenant network application.</readme>
<artifact>mvn:${project.groupId}/onos-app-vtn-mgr/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-sfc-mgr/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-app-vtn-web/${project.version}</artifact>
......
......@@ -76,7 +76,7 @@ public class DefaultApplicationDescription implements ApplicationDescription {
this.origin = checkNotNull(origin, "Origin cannot be null");
this.category = checkNotNull(category, "Category cannot be null");
this.url = checkNotNull(url, "URL cannot be null");
this.readme = readme;
this.readme = checkNotNull(readme, "Readme cannot be null");
this.icon = icon;
this.role = checkNotNull(role, "Role cannot be null");
this.permissions = checkNotNull(permissions, "Permissions cannot be null");
......
......@@ -75,7 +75,7 @@ public class DefaultApplication implements Application {
this.origin = checkNotNull(origin, "Origin cannot be null");
this.category = checkNotNull(category, "Category cannot be null");
this.url = checkNotNull(url, "URL cannot be null");
this.readme = readme;
this.readme = checkNotNull(readme, "Readme cannot be null");
this.icon = icon;
this.role = checkNotNull(role, "Role cannot be null");
this.permissions = checkNotNull(permissions, "Permissions cannot be null");
......
......@@ -88,7 +88,6 @@ public class ApplicationArchive
private static final String CATEGORY = "[@category]";
private static final String URL = "[@url]";
private static final String README = "readme";
private static final String ROLE = "security.role";
private static final String APP_PERMISSIONS = "security.permissions.app-perm";
......@@ -307,19 +306,16 @@ public class ApplicationArchive
List<String> requiredApps = apps.isEmpty() ?
ImmutableList.of() : ImmutableList.copyOf(apps.split(","));
String desc = cfg.getString(DESCRIPTION);
String readme = cfg.getString(README);
// put full description to readme field
String readme = cfg.getString(DESCRIPTION);
if (readme == null) {
readme = desc;
} else {
desc = compactDescription(readme);
}
// put short description to description field
String desc = compactDescription(readme);
return new DefaultApplicationDescription(name, version, desc, origin,
category, url, readme, icon, role,
perms, featuresRepo, features,
requiredApps);
category, url, readme, icon,
role, perms, featuresRepo,
features, requiredApps);
}
// Expands the specified ZIP stream into app-specific directory.
......@@ -488,7 +484,7 @@ public class ApplicationArchive
if (StringUtils.contains(sentence, ".")) {
return StringUtils.substringBefore(sentence, ".") + ".";
} else {
return sentence + ".";
return sentence;
}
}
return sentence;
......
......@@ -19,7 +19,6 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>BGP protocol southbound providers.</readme>
<artifact>mvn:${project.groupId}/onos-bgpio/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-bgp-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-bgp-ctl/${project.version}</artifact>
......
......@@ -19,7 +19,6 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>ONOS NetConf protocol southbound provider.</readme>
<artifact>mvn:${project.groupId}/onos-netconf-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-netconf-ctl/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-drivers/${project.version}</artifact>
......
......@@ -19,7 +19,6 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>OpenFlow protocol southbound provider.</readme>
<artifact>mvn:${project.groupId}/onos-of-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-of-ctl/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-drivers/${project.version}</artifact>
......
......@@ -19,7 +19,6 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>OVSDB protocol southbound providers.</readme>
<artifact>mvn:${project.groupId}/onos-ovsdb-rfc/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-ovsdb-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-ovsdb-ctl/${project.version}</artifact>
......
......@@ -19,7 +19,6 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>PCEP protocol southbound provider.</readme>
<artifact>mvn:${project.groupId}/onos-app-pcep-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-pcepio/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-pcep-controller-api/${project.version}</artifact>
......
......@@ -19,7 +19,6 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>REST protocol southbound provider.</readme>
<artifact>mvn:${project.groupId}/onos-restsb-api/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-restsb-ctl/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-drivers/${project.version}</artifact>
......
......@@ -19,7 +19,6 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}">
<description>${project.description}</description>
<readme>SNMP protocol southbound provider.</readme>
<artifact>mvn:${project.groupId}/onos-snmp-provider-device/${project.version}</artifact>
<artifact>mvn:${project.groupId}/onos-snmp-provider-alarm/${project.version}</artifact>
</app>
......
......@@ -372,11 +372,10 @@ public class OnosAppMojo extends AbstractMojo {
.replaceAll("\\$\\{onos.app.requires\\}", requiredApps)
.replaceAll("\\$\\{onos.app.category\\}", category)
.replaceAll("\\$\\{onos.app.url\\}", url)
.replaceAll("\\$\\{onos.app.readme\\}", readme)
.replaceAll("\\$\\{project.groupId\\}", projectGroupId)
.replaceAll("\\$\\{project.artifactId\\}", projectArtifactId)
.replaceAll("\\$\\{project.version\\}", projectVersion)
.replaceAll("\\$\\{project.description\\}", projectDescription);
.replaceAll("\\$\\{project.description\\}", readme);
}
// Recursively archives the specified directory into a given ZIP stream.
......
......@@ -19,6 +19,5 @@
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}" apps="${onos.app.requires}">
<description>${project.description}</description>
<readme>${onos.app.readme}</readme>
<artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
</app>
......