equal
deleted
inserted
replaced
110 } |
110 } |
111 resources.add(new RelativeFileSet( |
111 resources.add(new RelativeFileSet( |
112 baseDir, new LinkedHashSet<>(expandFileset(file)))); |
112 baseDir, new LinkedHashSet<>(expandFileset(file)))); |
113 } |
113 } |
114 |
114 |
115 void setClasspath() { |
115 void setClasspath(String mainJarPath) { |
116 String classpath = ""; |
116 String classpath; |
|
117 // we want main jar first on the classpath |
|
118 if (mainJarPath != null) { |
|
119 classpath = mainJarPath + File.pathSeparator; |
|
120 } else { |
|
121 classpath = ""; |
|
122 } |
117 for (RelativeFileSet resource : resources) { |
123 for (RelativeFileSet resource : resources) { |
118 for (String file : resource.getIncludedFiles()) { |
124 for (String file : resource.getIncludedFiles()) { |
119 if (file.endsWith(".jar")) { |
125 if (file.endsWith(".jar")) { |
120 classpath += file + File.pathSeparator; |
126 if (!file.equals(mainJarPath)) { |
|
127 classpath += file + File.pathSeparator; |
|
128 } |
121 } |
129 } |
122 } |
130 } |
123 } |
131 } |
124 addBundleArgument( |
132 addBundleArgument( |
125 StandardBundlerParam.CLASSPATH.getID(), classpath); |
133 StandardBundlerParam.CLASSPATH.getID(), classpath); |