Skip to content

Commit 5b06193

Browse files
committed
Converts tabs to spaces
1 parent e773e9c commit 5b06193

File tree

8 files changed

+832
-829
lines changed

8 files changed

+832
-829
lines changed

src/main/java/com/akathist/maven/plugins/launch4j/ClassPath.java

+61-61
Original file line numberDiff line numberDiff line change
@@ -28,62 +28,62 @@
2828

2929
public class ClassPath {
3030

31-
/**
32-
* The main class to run. This is not required if you are wrapping an executable jar.
33-
*/
34-
@Parameter
35-
String mainClass;
36-
37-
/**
38-
* The launch4j executable sets up a classpath before running your jar, but it must know what the
39-
* classpath should be. If you set this property to true, the plugin will indicate a classpath
40-
* based on all the dependencies your program will need at runtime. You can augment this classpath
41-
* using the preCp and postCp properties.
42-
*/
43-
@Parameter(defaultValue="true")
44-
boolean addDependencies = true;
45-
46-
/**
47-
* If you want maven to build the classpath from dependencies, you can optionally set the jarLocation,
48-
* which is the location of the jars in your distro relative to the executable. So if your distro
49-
* has the exe at the top level and all the jars in a lib directory, you could set this to "lib."
50-
* This property does not affect preCp and postCp.
51-
*/
52-
@Parameter
53-
String jarLocation;
54-
55-
/**
56-
* Part of the classpath that the executable should give to your application.
57-
* Paths are relative to the executable and should be in Windows format (separated by a semicolon).
58-
* You don't have to list all your dependencies here; the plugin will include them by default
59-
* after this list.
60-
*/
61-
@Parameter
62-
String preCp;
63-
64-
/**
65-
* Part of the classpath that the executable should give to your application.
66-
* Paths are relative to the executable and should be in Windows format (separated by a semicolon).
67-
* You don't have to list all your dependencies here; the plugin will include them by default
68-
* before this list.
69-
*/
70-
@Parameter
71-
String postCp;
72-
73-
private void addToCp(List<String> cp, String cpStr) {
74-
cp.addAll(Arrays.asList(cpStr.split("\\s*;\\s*")));
75-
}
76-
77-
net.sf.launch4j.config.ClassPath toL4j(Set<Artifact> dependencies, List<Artifact> runtimeDependencies) {
78-
net.sf.launch4j.config.ClassPath ret = new net.sf.launch4j.config.ClassPath();
79-
ret.setMainClass(mainClass);
80-
81-
List<String> cp = new ArrayList<String>();
82-
if (preCp != null) addToCp(cp, preCp);
83-
84-
if (addDependencies) {
85-
if (jarLocation == null) jarLocation = "";
86-
else if ( ! jarLocation.endsWith("/")) jarLocation += "/";
31+
/**
32+
* The main class to run. This is not required if you are wrapping an executable jar.
33+
*/
34+
@Parameter
35+
String mainClass;
36+
37+
/**
38+
* The launch4j executable sets up a classpath before running your jar, but it must know what the
39+
* classpath should be. If you set this property to true, the plugin will indicate a classpath
40+
* based on all the dependencies your program will need at runtime. You can augment this classpath
41+
* using the preCp and postCp properties.
42+
*/
43+
@Parameter(defaultValue = "true")
44+
boolean addDependencies = true;
45+
46+
/**
47+
* If you want maven to build the classpath from dependencies, you can optionally set the jarLocation,
48+
* which is the location of the jars in your distro relative to the executable. So if your distro
49+
* has the exe at the top level and all the jars in a lib directory, you could set this to &quot;lib.&quot;
50+
* This property does not affect preCp and postCp.
51+
*/
52+
@Parameter
53+
String jarLocation;
54+
55+
/**
56+
* Part of the classpath that the executable should give to your application.
57+
* Paths are relative to the executable and should be in Windows format (separated by a semicolon).
58+
* You don't have to list all your dependencies here; the plugin will include them by default
59+
* after this list.
60+
*/
61+
@Parameter
62+
String preCp;
63+
64+
/**
65+
* Part of the classpath that the executable should give to your application.
66+
* Paths are relative to the executable and should be in Windows format (separated by a semicolon).
67+
* You don't have to list all your dependencies here; the plugin will include them by default
68+
* before this list.
69+
*/
70+
@Parameter
71+
String postCp;
72+
73+
private void addToCp(List<String> cp, String cpStr) {
74+
cp.addAll(Arrays.asList(cpStr.split("\\s*;\\s*")));
75+
}
76+
77+
net.sf.launch4j.config.ClassPath toL4j(Set<Artifact> dependencies, List<Artifact> runtimeDependencies) {
78+
net.sf.launch4j.config.ClassPath ret = new net.sf.launch4j.config.ClassPath();
79+
ret.setMainClass(mainClass);
80+
81+
List<String> cp = new ArrayList<String>();
82+
if (preCp != null) addToCp(cp, preCp);
83+
84+
if (addDependencies) {
85+
if (jarLocation == null) jarLocation = "";
86+
else if (!jarLocation.endsWith("/")) jarLocation += "/";
8787

8888
// Add all runtime dependencies as we need them to run the wrapped jar
8989
dependencies.addAll(runtimeDependencies);
@@ -98,13 +98,13 @@ net.sf.launch4j.config.ClassPath toL4j(Set<Artifact> dependencies, List<Artifact
9898
cp.add(jarLocation + depFilename);
9999
}
100100
}
101-
}
101+
}
102102

103-
if (postCp != null) addToCp(cp, postCp);
104-
ret.setPaths(cp);
103+
if (postCp != null) addToCp(cp, postCp);
104+
ret.setPaths(cp);
105105

106-
return ret;
107-
}
106+
return ret;
107+
}
108108

109109
@Override
110110
public String toString() {

src/main/java/com/akathist/maven/plugins/launch4j/Jre.java

+104-104
Original file line numberDiff line numberDiff line change
@@ -27,120 +27,120 @@
2727
*/
2828
public class Jre {
2929

30-
/**
31-
* Use this property when you are bundling a jre with your application. It holds the path to the jre.
32-
* If relative, this path is from the executable.
33-
* <p>
34-
* If you specify path only and not minVersion, then the executable will show an error if the jre is not found.
35-
* <p>
36-
* If you specify path along with minVersion, then the executable will check the path first, and if no jre
37-
* is found there, it will search the local system for a jre matching minVersion. If it still doesn't
38-
* find anything, it will show the java download page. You may also specify maxVersion to further
39-
* constrain the search.
40-
*/
41-
String path;
42-
43-
/**
44-
* Use this property if you want the executable to search the system for a jre.
45-
* It names the minimum version acceptable, in x.x.x[_xx] format.
46-
* <p>
47-
* If you specify this property without giving a path, then the executable will search for a jre
48-
* and, none is found, display the java download page.
49-
* <p>
50-
* If you include a path also, the executable will try that path before searching for jre matching minVersion.
51-
* <p>
52-
* In either case, you can also specify a maxVersion.
53-
*/
54-
String minVersion;
55-
56-
/**
57-
* If you specify minVersion, you can also use maxVersion to further constrain the search for a jre.
58-
* This property should be in the format x.x.x[_xx].
59-
*/
60-
String maxVersion;
61-
62-
/**
63-
* Allows you to specify a preference for a public JRE or a private JDK runtime.
64-
* <p>
65-
* Valid values are:
66-
* <table border="1">
67-
* <tr>
68-
* <td>jreOnly</td>
69-
* <td>Always use a public JRE</td>
70-
* </tr>
71-
* <tr>
72-
* <td>preferJre</td>
73-
* <td>Prefer a public JRE, but use a JDK private runtime if it is newer than the public JRE</td>
74-
* </tr>
75-
* <tr>
76-
* <td>preferJdk</td>
77-
* <td>Prefer a JDK private runtime, but use a public JRE if it is newer than the JDK</td>
78-
* </tr>
79-
* <tr>
80-
* <td>jdkOnly</td>
81-
* <td>Always use a private JDK runtime (fails if there is no JDK installed)</td>
82-
* </tr>
83-
* </table>
84-
*/
85-
@Parameter(defaultValue="preferJre")
86-
String jdkPreference;
87-
88-
/**
89-
* Sets java's initial heap size in MB, like the -Xms flag.
90-
*/
91-
int initialHeapSize;
92-
93-
/**
94-
* Sets java's initial heap size in percent of free memory.
95-
*/
96-
int initialHeapPercent;
97-
98-
/**
99-
* Sets java's maximum heap size in MB, like the -Xmx flag.
100-
*/
101-
int maxHeapSize;
102-
103-
/**
104-
* Sets java's maximum heap size in percent of free memory.
105-
*/
106-
int maxHeapPercent;
107-
108-
/**
109-
* Use this to pass arbitrary options to the java/javaw program.
110-
* For instance, you can say:
111-
* <pre>
112-
* &lt;opt&gt;-Dlaunch4j.exedir="%EXEDIR%"&lt;/opt&gt;
113-
* &lt;opt&gt;-Dlaunch4j.exefile="%EXEFILE%"&lt;/opt&gt;
114-
* &lt;opt&gt;-Denv.path="%Path%"&lt;/opt&gt;
115-
* &lt;opt&gt;-Dsettings="%HomeDrive%%HomePath%\\settings.ini"&lt;/opt&gt;
116-
* </pre>
117-
*/
118-
List<String> opts;
30+
/**
31+
* Use this property when you are bundling a jre with your application. It holds the path to the jre.
32+
* If relative, this path is from the executable.
33+
* <p>
34+
* If you specify path only and not minVersion, then the executable will show an error if the jre is not found.
35+
* <p>
36+
* If you specify path along with minVersion, then the executable will check the path first, and if no jre
37+
* is found there, it will search the local system for a jre matching minVersion. If it still doesn't
38+
* find anything, it will show the java download page. You may also specify maxVersion to further
39+
* constrain the search.
40+
*/
41+
String path;
42+
43+
/**
44+
* Use this property if you want the executable to search the system for a jre.
45+
* It names the minimum version acceptable, in x.x.x[_xx] format.
46+
* <p>
47+
* If you specify this property without giving a path, then the executable will search for a jre
48+
* and, none is found, display the java download page.
49+
* <p>
50+
* If you include a path also, the executable will try that path before searching for jre matching minVersion.
51+
* <p>
52+
* In either case, you can also specify a maxVersion.
53+
*/
54+
String minVersion;
55+
56+
/**
57+
* If you specify minVersion, you can also use maxVersion to further constrain the search for a jre.
58+
* This property should be in the format x.x.x[_xx].
59+
*/
60+
String maxVersion;
61+
62+
/**
63+
* Allows you to specify a preference for a public JRE or a private JDK runtime.
64+
* <p>
65+
* Valid values are:
66+
* <table border="1">
67+
* <tr>
68+
* <td>jreOnly</td>
69+
* <td>Always use a public JRE</td>
70+
* </tr>
71+
* <tr>
72+
* <td>preferJre</td>
73+
* <td>Prefer a public JRE, but use a JDK private runtime if it is newer than the public JRE</td>
74+
* </tr>
75+
* <tr>
76+
* <td>preferJdk</td>
77+
* <td>Prefer a JDK private runtime, but use a public JRE if it is newer than the JDK</td>
78+
* </tr>
79+
* <tr>
80+
* <td>jdkOnly</td>
81+
* <td>Always use a private JDK runtime (fails if there is no JDK installed)</td>
82+
* </tr>
83+
* </table>
84+
*/
85+
@Parameter(defaultValue = "preferJre")
86+
String jdkPreference;
87+
88+
/**
89+
* Sets java's initial heap size in MB, like the -Xms flag.
90+
*/
91+
int initialHeapSize;
92+
93+
/**
94+
* Sets java's initial heap size in percent of free memory.
95+
*/
96+
int initialHeapPercent;
97+
98+
/**
99+
* Sets java's maximum heap size in MB, like the -Xmx flag.
100+
*/
101+
int maxHeapSize;
102+
103+
/**
104+
* Sets java's maximum heap size in percent of free memory.
105+
*/
106+
int maxHeapPercent;
107+
108+
/**
109+
* Use this to pass arbitrary options to the java/javaw program.
110+
* For instance, you can say:
111+
* <pre>
112+
* &lt;opt&gt;-Dlaunch4j.exedir="%EXEDIR%"&lt;/opt&gt;
113+
* &lt;opt&gt;-Dlaunch4j.exefile="%EXEFILE%"&lt;/opt&gt;
114+
* &lt;opt&gt;-Denv.path="%Path%"&lt;/opt&gt;
115+
* &lt;opt&gt;-Dsettings="%HomeDrive%%HomePath%\\settings.ini"&lt;/opt&gt;
116+
* </pre>
117+
*/
118+
List<String> opts;
119119

120120
/**
121121
* Sets JVM version to use: 32 bits, 64 bits or 64/32 bits
122122
* Possible values: 32, 64, 64/32 - it will fallback to default value if different option was used
123123
* Default value is: 64/32
124124
*/
125-
@Parameter(defaultValue="64/32")
125+
@Parameter(defaultValue = "64/32")
126126
String runtimeBits;
127127

128-
net.sf.launch4j.config.Jre toL4j() {
129-
net.sf.launch4j.config.Jre ret = new net.sf.launch4j.config.Jre();
130-
131-
ret.setPath(path);
132-
ret.setMinVersion(minVersion);
133-
ret.setMaxVersion(maxVersion);
134-
ret.setJdkPreference(jdkPreference);
135-
ret.setInitialHeapSize(initialHeapSize);
136-
ret.setInitialHeapPercent(initialHeapPercent);
137-
ret.setMaxHeapSize(maxHeapSize);
138-
ret.setMaxHeapPercent(maxHeapPercent);
139-
ret.setOptions(opts);
128+
net.sf.launch4j.config.Jre toL4j() {
129+
net.sf.launch4j.config.Jre ret = new net.sf.launch4j.config.Jre();
130+
131+
ret.setPath(path);
132+
ret.setMinVersion(minVersion);
133+
ret.setMaxVersion(maxVersion);
134+
ret.setJdkPreference(jdkPreference);
135+
ret.setInitialHeapSize(initialHeapSize);
136+
ret.setInitialHeapPercent(initialHeapPercent);
137+
ret.setMaxHeapSize(maxHeapSize);
138+
ret.setMaxHeapPercent(maxHeapPercent);
139+
ret.setOptions(opts);
140140
ret.setRuntimeBits(runtimeBits);
141141

142-
return ret;
143-
}
142+
return ret;
143+
}
144144

145145
@Override
146146
public String toString() {

0 commit comments

Comments
 (0)