Skip to content

Commit ce878bf

Browse files
Use constant for version
1 parent 04bd7cd commit ce878bf

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@
6060
<artifactId>json</artifactId>
6161
<version>20160212</version>
6262
</dependency>
63-
<dependency>
64-
<groupId>org.apache.maven</groupId>
65-
<artifactId>maven-model</artifactId>
66-
<version>3.3.9</version>
67-
</dependency>
6863
</dependencies>
6964

7065
<profiles>

src/main/java/com/browserstack/local/Local.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import java.util.List;
88
import java.util.Map;
99
import org.json.*;
10-
import org.apache.maven.model.Model;
11-
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
1210

1311
/**
1412
* Creates and manages a secure tunnel connection to BrowserStack.
@@ -24,6 +22,7 @@ public class Local {
2422

2523
private LocalProcess proc = null;
2624

25+
private final String packageVersion = "1.0.5";
2726
private final Map<String, String> parameters;
2827
private final Map<String, String> avoidValueParameters;
2928

@@ -133,18 +132,16 @@ public boolean isRunning() throws Exception {
133132
*
134133
* @param options Options supplied for the Local instance
135134
*/
136-
private void makeCommand(Map<String, String> options, String opCode) throws Exception {
135+
private void makeCommand(Map<String, String> options, String opCode) {
137136
command = new ArrayList<String>();
138137
command.add(binaryPath);
139138
command.add("-d");
140139
command.add(opCode);
141140
command.add("--key");
142141
command.add(options.get("key"));
143142

144-
MavenXpp3Reader reader = new MavenXpp3Reader();
145-
Model model = reader.read(new FileReader("pom.xml"));
146143
command.add("--source");
147-
command.add("java-" + model.getVersion());
144+
command.add("java-" + packageVersion);
148145

149146
for (Map.Entry<String, String> opt : options.entrySet()) {
150147
String parameter = opt.getKey().trim();

0 commit comments

Comments
 (0)