@@ -65,6 +65,7 @@ public final class BuildParameterBuilder {
6565 private static final Logger LOGGER = Logger .getLogger (BuildParameterBuilder .class .getName ());
6666 private static final String SMITHY_TAG_PROPERTY = "Smithy-Tags" ;
6767 private static final String SOURCE = "source" ;
68+ private static final String PATH_SEPARATOR = "path.separator" ;
6869
6970 private String projectionSource = SOURCE ;
7071 private Set <String > projectionSourceTags = new LinkedHashSet <>();
@@ -135,7 +136,7 @@ public BuildParameterBuilder addSourcesIfExists(Collection<String> sources) {
135136 * @return Returns the builder.
136137 */
137138 public BuildParameterBuilder buildClasspath (String buildClasspath ) {
138- this .buildClasspath .addAll (splitAndFilterString (":" , buildClasspath ));
139+ this .buildClasspath .addAll (splitAndFilterString (System . getProperty ( PATH_SEPARATOR ) , buildClasspath ));
139140 return this ;
140141 }
141142
@@ -157,7 +158,7 @@ private static Set<String> splitAndFilterString(String delimiter, String value)
157158 * @return Returns the builder.
158159 */
159160 public BuildParameterBuilder libClasspath (String libClasspath ) {
160- this .libClasspath .addAll (splitAndFilterString (":" , libClasspath ));
161+ this .libClasspath .addAll (splitAndFilterString (System . getProperty ( PATH_SEPARATOR ) , libClasspath ));
161162 return this ;
162163 }
163164
@@ -357,7 +358,9 @@ private Result configureSourceProjection() {
357358 Set <String > combined = new LinkedHashSet <>(libClasspath );
358359 combined .addAll (buildClasspath );
359360
360- return new Result (this , String .join (":" , computedDiscovery ), String .join (":" , combined ), sources );
361+ String discoveryClasspath = String .join (System .getProperty (PATH_SEPARATOR ), computedDiscovery );
362+ String classpath = String .join (System .getProperty (PATH_SEPARATOR ), combined );
363+ return new Result (this , discoveryClasspath , classpath , sources );
361364 }
362365
363366 /**
@@ -373,7 +376,7 @@ private Result configureProjection() {
373376 LOGGER .warning ("No projection source tags were set for the projection `" + projection + "`, so the "
374377 + "projection will not have any sources in it other than files found in the sources of "
375378 + "the package being built." );
376- String buildCp = String .join (":" , buildClasspath );
379+ String buildCp = String .join (System . getProperty ( PATH_SEPARATOR ) , buildClasspath );
377380 return new Result (this , buildCp , buildCp , sources );
378381 }
379382
@@ -390,8 +393,9 @@ private Result configureProjection() {
390393 Set <String > computedDiscovery = new LinkedHashSet <>(buildClasspath );
391394 computedDiscovery .removeAll (computedSources );
392395
393- return new Result (this , String .join (":" , computedDiscovery ),
394- String .join (":" , buildClasspath ), computedSources );
396+ String discoveryClasspath = String .join (System .getProperty (PATH_SEPARATOR ), computedDiscovery );
397+ String classpath = String .join (System .getProperty (PATH_SEPARATOR ), buildClasspath );
398+ return new Result (this , discoveryClasspath , classpath , computedSources );
395399 }
396400
397401 /**
0 commit comments