Skip to content

Commit d815a01

Browse files
committed
Change protocol sand to iot.
1 parent 3f4b752 commit d815a01

File tree

9 files changed

+15
-15
lines changed

9 files changed

+15
-15
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#disabled.services=stream.service
2+
component.binding.profile=${config.dir}/iot-component-binding-lite.ini
3+
domain.name=localhost

pack/lite/configuration/sand/server.ini

Lines changed: 0 additions & 3 deletions
This file was deleted.

pack/lite/sand-pom.xml renamed to pack/lite/iot-pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</parent>
1414

1515
<groupId>com.thefirstlineofcode.granite.pack.lite</groupId>
16-
<artifactId>granite-pack-lite-sand</artifactId>
16+
<artifactId>granite-pack-lite-iot</artifactId>
1717

1818
<dependencies>
1919
<!-- Sand Stream Plugin -->

pack/lite/src/main/java/com/thefirstlineofcode/granite/pack/lite/Main.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ private Options parseOptions(String[] args) {
9494
options.setProtocol(Options.Protocol.MINI);
9595
} else if ("standard".equals(args[i])) {
9696
options.setProtocol(Options.Protocol.STANDARD);
97-
} else if ("sand".equals(args[i])) {
98-
options.setProtocol(Options.Protocol.SAND);
97+
} else if ("iot".equals(args[i])) {
98+
options.setProtocol(Options.Protocol.IOT);
9999
} else {
100-
throw new IllegalArgumentException(String.format("Illegal protocol: %s. Only 'mini', 'standard' and 'sand' are supported.", args[i]));
100+
throw new IllegalArgumentException(String.format("Illegal protocol: %s. Only 'mini', 'standard' and 'iot' are supported.", args[i]));
101101
}
102102
i++;
103103
} else if ("-webcamMode".equals(args[i])) {
@@ -182,7 +182,7 @@ private void printUsage() {
182182
System.out.println("-cleanCache Clean the packing cache.");
183183
System.out.println("-offline Run in offline mode.");
184184
// System.out.println("-version <VERSION> Specify the version. Default is 1.0.2-RELEASE.");
185-
System.out.println("-protocol <PROTOCOL> Specify the protocol. Optional protocols are 'mini', 'standard' or 'sand'. Default is 'standard'.");
185+
System.out.println("-protocol <PROTOCOL> Specify the protocol. Optional protocols are 'mini', 'standard' or 'iot'. Default is 'standard'.");
186186
System.out.println("-webcamMode <WEBCAM-MODE> Specify that which webcam plugin needs to be deployed. Optional plugins are 'none', 'p2p', 'kurento'. Default is 'none'.");
187187
System.out.println("-sandProjectName <SAND-PROJECT-NAME> Specify the sand project name. Default is 'com.thefirstlineofcode.sand'.");
188188
}

pack/lite/src/main/java/com/thefirstlineofcode/granite/pack/lite/Options.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public enum WebcamMode {
2727
public enum Protocol {
2828
MINI,
2929
STANDARD,
30-
SAND
30+
IOT
3131
}
3232

3333
public Options() {

pack/lite/src/main/java/com/thefirstlineofcode/granite/pack/lite/Packer.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ private void copyBasicServerToZip(File basicServerZip, ZipOutputStream zos) {
9494
int lastSlash = entryName.lastIndexOf('/');
9595
String libraryName = entryName.substring(lastSlash + 1);
9696
if (libraryName.startsWith(SAND_PROJECT_PREFIX) &&
97-
options.getProtocol() != Protocol.SAND)
97+
options.getProtocol() != Protocol.IOT)
9898
continue;
9999
systemLibraries.add(libraryName);
100100
}
@@ -212,7 +212,7 @@ private void copyDependencies() {
212212
} else if (options.getProtocol() == Options.Protocol.STANDARD) {
213213
PackUtils.runMvn(new File(options.getProjectDirPath()), options.isOffline(), "-fstandard-pom.xml", "dependency:copy-dependencies");
214214
} else {
215-
PackUtils.runMvn(new File(options.getProjectDirPath()), options.isOffline(), "-fsand-pom.xml", "dependency:copy-dependencies");
215+
PackUtils.runMvn(new File(options.getProjectDirPath()), options.isOffline(), "-fiot-pom.xml", "dependency:copy-dependencies");
216216

217217
if (options.getWebcamMode() == WebcamMode.P2P) {
218218
PackUtils.runMvn(new File(options.getProjectDirPath()), options.isOffline(), "-fp2p-webcam-pom.xml", "dependency:copy-dependencies");
@@ -237,14 +237,14 @@ private void writeGraniteConfigFilesToZip(String targetDirPath, ZipOutputStream
237237
configurationFilesDir = new File(configurationDir, "mini");
238238
} else if (options.getProtocol() == Options.Protocol.STANDARD) {
239239
configurationFilesDir = new File(configurationDir, "standard");
240-
} else if (options.getProtocol() == Options.Protocol.SAND) {
241-
configurationFilesDir = new File(configurationDir, "sand");
240+
} else if (options.getProtocol() == Options.Protocol.IOT) {
241+
configurationFilesDir = new File(configurationDir, "iot");
242242
} else {
243-
throw new IllegalArgumentException("Only support 'mini', 'standard' and 'sand' protocols now.");
243+
throw new IllegalArgumentException("Only support 'mini', 'standard' and 'iot' protocols now.");
244244
}
245245

246246
for (File configurationFile : configurationFilesDir.listFiles()) {
247-
writeFileToZip(zos, String.format("/%s/%s/%s", options.getAppName(), CONFIGURATION_DIR, configurationFile.getName()), configurationFile);
247+
writeFileToZip(zos, String.format("%s/%s/%s", options.getAppName(), CONFIGURATION_DIR, configurationFile.getName()), configurationFile);
248248
}
249249
}
250250

0 commit comments

Comments
 (0)