File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
src/main/java/com/browserstack/local Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 33 <groupId >com.browserstack</groupId >
44 <artifactId >browserstack-local-java</artifactId >
55 <packaging >jar</packaging >
6- <version >1.0.5 -SNAPSHOT</version >
6+ <version >1.0.4 -SNAPSHOT</version >
77
88 <name >browserstack-local-java</name >
99 <description >Java bindings for BrowserStack Local</description >
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 >
6368 </dependencies >
6469
6570 <profiles >
Original file line number Diff line number Diff line change 77import java .util .List ;
88import java .util .Map ;
99import org .json .*;
10+ import org .apache .maven .model .Model ;
11+ import org .apache .maven .model .io .xpp3 .MavenXpp3Reader ;
1012
1113/**
1214 * Creates and manages a secure tunnel connection to BrowserStack.
@@ -131,14 +133,19 @@ public boolean isRunning() throws Exception {
131133 *
132134 * @param options Options supplied for the Local instance
133135 */
134- private void makeCommand (Map <String , String > options , String opCode ) {
136+ private void makeCommand (Map <String , String > options , String opCode ) throws Exception {
135137 command = new ArrayList <String >();
136138 command .add (binaryPath );
137139 command .add ("-d" );
138140 command .add (opCode );
139141 command .add ("--key" );
140142 command .add (options .get ("key" ));
141143
144+ MavenXpp3Reader reader = new MavenXpp3Reader ();
145+ Model model = reader .read (new FileReader ("pom.xml" ));
146+ command .add ("--source" );
147+ command .add ("java-" + model .getVersion ());
148+
142149 for (Map .Entry <String , String > opt : options .entrySet ()) {
143150 String parameter = opt .getKey ().trim ();
144151 if (IGNORE_KEYS .contains (parameter )) {
You can’t perform that action at this time.
0 commit comments