Jian Li
Committed by Gerrit Code Review

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

Change-Id: I536f54f74586a0bb5c671564f71b44a0a871d5f6
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}"> 20 features="${project.artifactId}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>ONOS authentication application.</readme>
23 <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
24 <artifact>mvn:${project.groupId}/onos-app-xos-integration/${project.version}</artifact> 23 <artifact>mvn:${project.groupId}/onos-app-xos-integration/${project.version}</artifact>
25 <bundle>mvn:com.sun.jersey/jersey-client/1.19</bundle> 24 <bundle>mvn:com.sun.jersey/jersey-client/1.19</bundle>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}"> 20 features="${project.artifactId}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>BGP router application.</readme>
23 <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
24 <artifact>mvn:${project.groupId}/onos-app-routing-api/${project.version}</artifact> 23 <artifact>mvn:${project.groupId}/onos-app-routing-api/${project.version}</artifact>
25 <artifact>mvn:${project.groupId}/onos-app-routing/${project.version}</artifact> 24 <artifact>mvn:${project.groupId}/onos-app-routing/${project.version}</artifact>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}"> 20 features="${project.artifactId}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>DHCP server application.</readme>
23 <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
24 <artifact>mvn:${project.groupId}/onos-app-dhcp-api/${project.version}</artifact> 23 <artifact>mvn:${project.groupId}/onos-app-dhcp-api/${project.version}</artifact>
25 </app> 24 </app>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}"> 20 features="${project.artifactId}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>ONOS fault management application.</readme>
23 <artifact>mvn:${project.groupId}/onos-app-fm-mgr/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/onos-app-fm-mgr/${project.version}</artifact>
24 <artifact>mvn:${project.groupId}/onos-app-fm-web/${project.version}</artifact> 23 <artifact>mvn:${project.groupId}/onos-app-fm-web/${project.version}</artifact>
25 <artifact>mvn:${project.groupId}/onos-app-fm-gui/${project.version}</artifact> 24 <artifact>mvn:${project.groupId}/onos-app-fm-gui/${project.version}</artifact>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}"> 20 features="${project.artifactId}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>OLT application for CORD.</readme>
23 <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
24 <artifact>mvn:${project.groupId}/onos-app-olt-api/${project.version}</artifact> 23 <artifact>mvn:${project.groupId}/onos-app-olt-api/${project.version}</artifact>
25 </app> 24 </app>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}"> 20 features="${project.artifactId}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>SONA Openstack Switching application.</readme>
23 <artifact>mvn:${project.groupId}/onos-app-openstackswitching/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/onos-app-openstackswitching/${project.version}</artifact>
24 <artifact>mvn:${project.groupId}/onos-app-dhcp-api/${project.version}</artifact> 23 <artifact>mvn:${project.groupId}/onos-app-dhcp-api/${project.version}</artifact>
25 <artifact>mvn:${project.groupId}/onos-app-dhcp/${project.version}</artifact> 24 <artifact>mvn:${project.groupId}/onos-app-dhcp/${project.version}</artifact>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}"> 20 features="${project.artifactId}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>SDN-IP peering application.</readme>
23 <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
24 <artifact>mvn:${project.groupId}/onos-app-routing-api/${project.version}</artifact> 23 <artifact>mvn:${project.groupId}/onos-app-routing-api/${project.version}</artifact>
25 <artifact>mvn:${project.groupId}/onos-app-routing/${project.version}</artifact> 24 <artifact>mvn:${project.groupId}/onos-app-routing/${project.version}</artifact>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}"> 20 features="${project.artifactId}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>Virtual router application.</readme>
23 <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
24 <artifact>mvn:${project.groupId}/onos-app-routing-api/${project.version}</artifact> 23 <artifact>mvn:${project.groupId}/onos-app-routing-api/${project.version}</artifact>
25 <artifact>mvn:${project.groupId}/onos-app-routing/${project.version}</artifact> 24 <artifact>mvn:${project.groupId}/onos-app-routing/${project.version}</artifact>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}"> 20 features="${project.artifactId}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>Virtual tenant network application.</readme>
23 <artifact>mvn:${project.groupId}/onos-app-vtn-mgr/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/onos-app-vtn-mgr/${project.version}</artifact>
24 <artifact>mvn:${project.groupId}/onos-app-sfc-mgr/${project.version}</artifact> 23 <artifact>mvn:${project.groupId}/onos-app-sfc-mgr/${project.version}</artifact>
25 <artifact>mvn:${project.groupId}/onos-app-vtn-web/${project.version}</artifact> 24 <artifact>mvn:${project.groupId}/onos-app-vtn-web/${project.version}</artifact>
......
...@@ -76,7 +76,7 @@ public class DefaultApplicationDescription implements ApplicationDescription { ...@@ -76,7 +76,7 @@ public class DefaultApplicationDescription implements ApplicationDescription {
76 this.origin = checkNotNull(origin, "Origin cannot be null"); 76 this.origin = checkNotNull(origin, "Origin cannot be null");
77 this.category = checkNotNull(category, "Category cannot be null"); 77 this.category = checkNotNull(category, "Category cannot be null");
78 this.url = checkNotNull(url, "URL cannot be null"); 78 this.url = checkNotNull(url, "URL cannot be null");
79 - this.readme = readme; 79 + this.readme = checkNotNull(readme, "Readme cannot be null");
80 this.icon = icon; 80 this.icon = icon;
81 this.role = checkNotNull(role, "Role cannot be null"); 81 this.role = checkNotNull(role, "Role cannot be null");
82 this.permissions = checkNotNull(permissions, "Permissions cannot be null"); 82 this.permissions = checkNotNull(permissions, "Permissions cannot be null");
......
...@@ -75,7 +75,7 @@ public class DefaultApplication implements Application { ...@@ -75,7 +75,7 @@ public class DefaultApplication implements Application {
75 this.origin = checkNotNull(origin, "Origin cannot be null"); 75 this.origin = checkNotNull(origin, "Origin cannot be null");
76 this.category = checkNotNull(category, "Category cannot be null"); 76 this.category = checkNotNull(category, "Category cannot be null");
77 this.url = checkNotNull(url, "URL cannot be null"); 77 this.url = checkNotNull(url, "URL cannot be null");
78 - this.readme = readme; 78 + this.readme = checkNotNull(readme, "Readme cannot be null");
79 this.icon = icon; 79 this.icon = icon;
80 this.role = checkNotNull(role, "Role cannot be null"); 80 this.role = checkNotNull(role, "Role cannot be null");
81 this.permissions = checkNotNull(permissions, "Permissions cannot be null"); 81 this.permissions = checkNotNull(permissions, "Permissions cannot be null");
......
...@@ -88,7 +88,6 @@ public class ApplicationArchive ...@@ -88,7 +88,6 @@ public class ApplicationArchive
88 88
89 private static final String CATEGORY = "[@category]"; 89 private static final String CATEGORY = "[@category]";
90 private static final String URL = "[@url]"; 90 private static final String URL = "[@url]";
91 - private static final String README = "readme";
92 91
93 private static final String ROLE = "security.role"; 92 private static final String ROLE = "security.role";
94 private static final String APP_PERMISSIONS = "security.permissions.app-perm"; 93 private static final String APP_PERMISSIONS = "security.permissions.app-perm";
...@@ -307,19 +306,16 @@ public class ApplicationArchive ...@@ -307,19 +306,16 @@ public class ApplicationArchive
307 List<String> requiredApps = apps.isEmpty() ? 306 List<String> requiredApps = apps.isEmpty() ?
308 ImmutableList.of() : ImmutableList.copyOf(apps.split(",")); 307 ImmutableList.of() : ImmutableList.copyOf(apps.split(","));
309 308
310 - String desc = cfg.getString(DESCRIPTION); 309 + // put full description to readme field
311 - String readme = cfg.getString(README); 310 + String readme = cfg.getString(DESCRIPTION);
312 311
313 - if (readme == null) { 312 + // put short description to description field
314 - readme = desc; 313 + String desc = compactDescription(readme);
315 - } else {
316 - desc = compactDescription(readme);
317 - }
318 314
319 return new DefaultApplicationDescription(name, version, desc, origin, 315 return new DefaultApplicationDescription(name, version, desc, origin,
320 - category, url, readme, icon, role, 316 + category, url, readme, icon,
321 - perms, featuresRepo, features, 317 + role, perms, featuresRepo,
322 - requiredApps); 318 + features, requiredApps);
323 } 319 }
324 320
325 // Expands the specified ZIP stream into app-specific directory. 321 // Expands the specified ZIP stream into app-specific directory.
...@@ -488,7 +484,7 @@ public class ApplicationArchive ...@@ -488,7 +484,7 @@ public class ApplicationArchive
488 if (StringUtils.contains(sentence, ".")) { 484 if (StringUtils.contains(sentence, ".")) {
489 return StringUtils.substringBefore(sentence, ".") + "."; 485 return StringUtils.substringBefore(sentence, ".") + ".";
490 } else { 486 } else {
491 - return sentence + "."; 487 + return sentence;
492 } 488 }
493 } 489 }
494 return sentence; 490 return sentence;
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}"> 20 features="${project.artifactId}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>BGP protocol southbound providers.</readme>
23 <artifact>mvn:${project.groupId}/onos-bgpio/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/onos-bgpio/${project.version}</artifact>
24 <artifact>mvn:${project.groupId}/onos-bgp-api/${project.version}</artifact> 23 <artifact>mvn:${project.groupId}/onos-bgp-api/${project.version}</artifact>
25 <artifact>mvn:${project.groupId}/onos-bgp-ctl/${project.version}</artifact> 24 <artifact>mvn:${project.groupId}/onos-bgp-ctl/${project.version}</artifact>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}"> 20 features="${project.artifactId}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>ONOS NetConf protocol southbound provider.</readme>
23 <artifact>mvn:${project.groupId}/onos-netconf-api/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/onos-netconf-api/${project.version}</artifact>
24 <artifact>mvn:${project.groupId}/onos-netconf-ctl/${project.version}</artifact> 23 <artifact>mvn:${project.groupId}/onos-netconf-ctl/${project.version}</artifact>
25 <artifact>mvn:${project.groupId}/onos-drivers/${project.version}</artifact> 24 <artifact>mvn:${project.groupId}/onos-drivers/${project.version}</artifact>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}"> 20 features="${project.artifactId}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>OpenFlow protocol southbound provider.</readme>
23 <artifact>mvn:${project.groupId}/onos-of-api/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/onos-of-api/${project.version}</artifact>
24 <artifact>mvn:${project.groupId}/onos-of-ctl/${project.version}</artifact> 23 <artifact>mvn:${project.groupId}/onos-of-ctl/${project.version}</artifact>
25 <artifact>mvn:${project.groupId}/onos-drivers/${project.version}</artifact> 24 <artifact>mvn:${project.groupId}/onos-drivers/${project.version}</artifact>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}"> 20 features="${project.artifactId}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>OVSDB protocol southbound providers.</readme>
23 <artifact>mvn:${project.groupId}/onos-ovsdb-rfc/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/onos-ovsdb-rfc/${project.version}</artifact>
24 <artifact>mvn:${project.groupId}/onos-ovsdb-api/${project.version}</artifact> 23 <artifact>mvn:${project.groupId}/onos-ovsdb-api/${project.version}</artifact>
25 <artifact>mvn:${project.groupId}/onos-ovsdb-ctl/${project.version}</artifact> 24 <artifact>mvn:${project.groupId}/onos-ovsdb-ctl/${project.version}</artifact>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}"> 20 features="${project.artifactId}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>PCEP protocol southbound provider.</readme>
23 <artifact>mvn:${project.groupId}/onos-app-pcep-api/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/onos-app-pcep-api/${project.version}</artifact>
24 <artifact>mvn:${project.groupId}/onos-pcepio/${project.version}</artifact> 23 <artifact>mvn:${project.groupId}/onos-pcepio/${project.version}</artifact>
25 <artifact>mvn:${project.groupId}/onos-pcep-controller-api/${project.version}</artifact> 24 <artifact>mvn:${project.groupId}/onos-pcep-controller-api/${project.version}</artifact>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}"> 20 features="${project.artifactId}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>REST protocol southbound provider.</readme>
23 <artifact>mvn:${project.groupId}/onos-restsb-api/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/onos-restsb-api/${project.version}</artifact>
24 <artifact>mvn:${project.groupId}/onos-restsb-ctl/${project.version}</artifact> 23 <artifact>mvn:${project.groupId}/onos-restsb-ctl/${project.version}</artifact>
25 <artifact>mvn:${project.groupId}/onos-drivers/${project.version}</artifact> 24 <artifact>mvn:${project.groupId}/onos-drivers/${project.version}</artifact>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}"> 20 features="${project.artifactId}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>SNMP protocol southbound provider.</readme>
23 <artifact>mvn:${project.groupId}/onos-snmp-provider-device/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/onos-snmp-provider-device/${project.version}</artifact>
24 <artifact>mvn:${project.groupId}/onos-snmp-provider-alarm/${project.version}</artifact> 23 <artifact>mvn:${project.groupId}/onos-snmp-provider-alarm/${project.version}</artifact>
25 </app> 24 </app>
......
...@@ -372,11 +372,10 @@ public class OnosAppMojo extends AbstractMojo { ...@@ -372,11 +372,10 @@ public class OnosAppMojo extends AbstractMojo {
372 .replaceAll("\\$\\{onos.app.requires\\}", requiredApps) 372 .replaceAll("\\$\\{onos.app.requires\\}", requiredApps)
373 .replaceAll("\\$\\{onos.app.category\\}", category) 373 .replaceAll("\\$\\{onos.app.category\\}", category)
374 .replaceAll("\\$\\{onos.app.url\\}", url) 374 .replaceAll("\\$\\{onos.app.url\\}", url)
375 - .replaceAll("\\$\\{onos.app.readme\\}", readme)
376 .replaceAll("\\$\\{project.groupId\\}", projectGroupId) 375 .replaceAll("\\$\\{project.groupId\\}", projectGroupId)
377 .replaceAll("\\$\\{project.artifactId\\}", projectArtifactId) 376 .replaceAll("\\$\\{project.artifactId\\}", projectArtifactId)
378 .replaceAll("\\$\\{project.version\\}", projectVersion) 377 .replaceAll("\\$\\{project.version\\}", projectVersion)
379 - .replaceAll("\\$\\{project.description\\}", projectDescription); 378 + .replaceAll("\\$\\{project.description\\}", readme);
380 } 379 }
381 380
382 // Recursively archives the specified directory into a given ZIP stream. 381 // Recursively archives the specified directory into a given ZIP stream.
......
...@@ -19,6 +19,5 @@ ...@@ -19,6 +19,5 @@
19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features" 19 featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
20 features="${project.artifactId}" apps="${onos.app.requires}"> 20 features="${project.artifactId}" apps="${onos.app.requires}">
21 <description>${project.description}</description> 21 <description>${project.description}</description>
22 - <readme>${onos.app.readme}</readme>
23 <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact> 22 <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
24 </app> 23 </app>
......