Skip to content

Commit ccae3ab

Browse files
committed
Merge branch '#272fix'
2 parents bd914ec + d8b989d commit ccae3ab

27 files changed

+424
-388
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ If you are using the Eclipse IDE, make sure you are using verison Luna or later.
113113
- bug fix and enhancements of io.appium.java_client.service.local.AppiumDriverLocalService
114114
- FIXED bug which was found and reproduced with Eclipse for Mac OS X. Please read about details here: [#252](https://github.com/appium/java-client/issues/252)
115115
Thanks to [saikrishna321](https://github.com/saikrishna321) for the bug report
116+
- FIXED bug which was found out by [Jonahss](https://github.com/Jonahss). Thanks for the reporting. Details: [#272](https://github.com/appium/java-client/issues/272)
117+
and [#273](https://github.com/appium/java-client/issues/273)
116118
- The ability to set additional output streams was provided
117119
- The additional __startActivity()__ method was added to AndroidDriver. It allows to start activities without the stopping of a target app
118120
Thanks to [deadmoto](https://github.com/deadmoto) for the contribution

pom.xml

Lines changed: 115 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
-->
1717

1818
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20-
<modelVersion>4.0.0</modelVersion>
19+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20+
<modelVersion>4.0.0</modelVersion>
2121

2222
<groupId>io.appium</groupId>
2323
<artifactId>java-client</artifactId>
@@ -65,130 +65,135 @@
6565
<description>Java client for Appium Mobile Webdriver</description>
6666
<url>http://appium.io</url>
6767

68-
<licenses>
69-
<license>
70-
<name>Apache License, Version 2.0</name>
71-
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
72-
<distribution>repo</distribution>
73-
</license>
74-
</licenses>
68+
<licenses>
69+
<license>
70+
<name>Apache License, Version 2.0</name>
71+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
72+
<distribution>repo</distribution>
73+
</license>
74+
</licenses>
7575

76-
<scm>
77-
<url>https://github.com/appium/java-client</url>
78-
<connection>scm:git:git://github.com/appium/java-client.git</connection>
79-
<developerConnection>scm:git:[email protected]:appium/java-client.git</developerConnection>
80-
</scm>
76+
<scm>
77+
<url>https://github.com/appium/java-client</url>
78+
<connection>scm:git:git://github.com/appium/java-client.git</connection>
79+
<developerConnection>scm:git:[email protected]:appium/java-client.git</developerConnection>
80+
</scm>
8181

82-
<developers>
83-
<developer>
84-
<email>[email protected]</email>
85-
<name>Jonah Stiennon</name>
86-
<url>https://github.com/jonahss</url>
87-
<id>jonahss</id>
88-
</developer>
82+
<developers>
83+
<developer>
84+
<email>[email protected]</email>
85+
<name>Jonah Stiennon</name>
86+
<url>https://github.com/jonahss</url>
87+
<id>jonahss</id>
88+
</developer>
8989
<developer>
9090
<email>[email protected]</email>
9191
<name>Sergey Tikhomirov</name>
9292
<url>https://github.com/TikhomirovSergey</url>
9393
<id>TikhomirovSergey</id>
9494
</developer>
95-
</developers>
95+
</developers>
9696

97-
<distributionManagement>
98-
<snapshotRepository>
99-
<id>ossrh</id>
100-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
101-
</snapshotRepository>
102-
<repository>
103-
<id>ossrh</id>
104-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
105-
</repository>
106-
</distributionManagement>
97+
<distributionManagement>
98+
<snapshotRepository>
99+
<id>ossrh</id>
100+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
101+
</snapshotRepository>
102+
<repository>
103+
<id>ossrh</id>
104+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
105+
</repository>
106+
</distributionManagement>
107107

108-
<build>
109-
<plugins>
110-
<plugin>
111-
<groupId>org.apache.maven.plugins</groupId>
112-
<artifactId>maven-source-plugin</artifactId>
113-
<version>2.2.1</version>
114-
<executions>
115-
<execution>
116-
<id>attach-sources</id>
117-
<goals>
118-
<goal>jar-no-fork</goal>
119-
</goals>
120-
</execution>
121-
</executions>
122-
</plugin>
123-
<plugin>
124-
<groupId>org.apache.maven.plugins</groupId>
125-
<artifactId>maven-javadoc-plugin</artifactId>
126-
<version>2.9.1</version>
127-
<executions>
128-
<execution>
129-
<id>attach-javadocs</id>
130-
<goals>
131-
<goal>jar</goal>
132-
</goals>
133-
</execution>
134-
</executions>
135-
</plugin>
136-
<plugin>
137-
<groupId>org.apache.maven.plugins</groupId>
138-
<artifactId>maven-gpg-plugin</artifactId>
139-
<version>1.5</version>
140-
<executions>
141-
<execution>
142-
<id>sign-artifacts</id>
143-
<phase>verify</phase>
144-
<goals>
145-
<goal>sign</goal>
146-
</goals>
147-
</execution>
148-
</executions>
149-
</plugin>
150-
<plugin>
151-
<groupId>org.apache.maven.plugins</groupId>
152-
<artifactId>maven-compiler-plugin</artifactId>
153-
<version>3.3</version>
154-
<configuration>
155-
<source>1.7</source>
156-
<target>1.7</target>
108+
<build>
109+
<resources>
110+
<resource>
111+
<directory>src/main/resources</directory>
112+
</resource>
113+
</resources>
114+
<plugins>
115+
<plugin>
116+
<groupId>org.apache.maven.plugins</groupId>
117+
<artifactId>maven-source-plugin</artifactId>
118+
<version>2.2.1</version>
119+
<executions>
120+
<execution>
121+
<id>attach-sources</id>
122+
<goals>
123+
<goal>jar-no-fork</goal>
124+
</goals>
125+
</execution>
126+
</executions>
127+
</plugin>
128+
<plugin>
129+
<groupId>org.apache.maven.plugins</groupId>
130+
<artifactId>maven-javadoc-plugin</artifactId>
131+
<version>2.9.1</version>
132+
<executions>
133+
<execution>
134+
<id>attach-javadocs</id>
135+
<goals>
136+
<goal>jar</goal>
137+
</goals>
138+
</execution>
139+
</executions>
140+
</plugin>
141+
<plugin>
142+
<groupId>org.apache.maven.plugins</groupId>
143+
<artifactId>maven-gpg-plugin</artifactId>
144+
<version>1.5</version>
145+
<executions>
146+
<execution>
147+
<id>sign-artifacts</id>
148+
<phase>verify</phase>
149+
<goals>
150+
<goal>sign</goal>
151+
</goals>
152+
</execution>
153+
</executions>
154+
</plugin>
155+
<plugin>
156+
<groupId>org.apache.maven.plugins</groupId>
157+
<artifactId>maven-compiler-plugin</artifactId>
158+
<version>3.3</version>
159+
<configuration>
160+
<source>1.7</source>
161+
<target>1.7</target>
157162
<compilerId>eclipse</compilerId>
158-
</configuration>
163+
</configuration>
159164
<dependencies>
160165
<dependency>
161166
<groupId>org.codehaus.plexus</groupId>
162167
<artifactId>plexus-compiler-eclipse</artifactId>
163168
<version>2.5</version>
164169
</dependency>
165170
</dependencies>
166-
</plugin>
167-
<plugin>
168-
<groupId>org.apache.maven.plugins</groupId>
169-
<artifactId>maven-surefire-plugin</artifactId>
170-
<version>2.18.1</version>
171-
<dependencies>
172-
<dependency>
173-
<groupId>org.apache.maven.surefire</groupId>
174-
<artifactId>surefire-junit47</artifactId>
175-
<version>2.18.1</version>
176-
</dependency>
177-
</dependencies>
178-
<executions>
179-
<execution>
180-
<goals>
181-
<goal>test</goal>
182-
</goals>
183-
<phase>integration-test</phase>
184-
<configuration>
185-
<includes>
186-
<include>**/*Test.java</include>
187-
</includes>
188-
</configuration>
189-
</execution>
190-
</executions>
191-
</plugin>
192-
</plugins>
193-
</build>
171+
</plugin>
172+
<plugin>
173+
<groupId>org.apache.maven.plugins</groupId>
174+
<artifactId>maven-surefire-plugin</artifactId>
175+
<version>2.18.1</version>
176+
<dependencies>
177+
<dependency>
178+
<groupId>org.apache.maven.surefire</groupId>
179+
<artifactId>surefire-junit47</artifactId>
180+
<version>2.18.1</version>
181+
</dependency>
182+
</dependencies>
183+
<executions>
184+
<execution>
185+
<goals>
186+
<goal>test</goal>
187+
</goals>
188+
<phase>integration-test</phase>
189+
<configuration>
190+
<includes>
191+
<include>**/*Test.java</include>
192+
</includes>
193+
</configuration>
194+
</execution>
195+
</executions>
196+
</plugin>
197+
</plugins>
198+
</build>
194199
</project>

src/main/java/io/appium/java_client/service/local/AppiumDriverLocalService.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,13 @@ public URL getUrl() {
8282
@Override
8383
public boolean isRunning() {
8484
lock.lock();
85-
if (process == null)
85+
if (process == null) {
8686
return false;
87+
}
88+
89+
if (!process.isRunning()) {
90+
return false;
91+
}
8792

8893
try {
8994
ping(500, TimeUnit.MILLISECONDS);
@@ -126,9 +131,11 @@ public void start() throws AppiumServerHasNotBeenStartedLocallyException {
126131
destroyProcess();
127132
String msgTxt = "The local appium server has not been started. " +
128133
"The given Node.js executable: " + this.nodeJSExec.getAbsolutePath() + " Arguments: " + nodeJSArgs.toString() + " " + "\n";
129-
String processStream = process.getStdOut();
130-
if (!StringUtils.isBlank(processStream))
131-
msgTxt = msgTxt + "Process output: " + processStream + "\n";
134+
if (process != null) {
135+
String processStream = process.getStdOut();
136+
if (!StringUtils.isBlank(processStream))
137+
msgTxt = msgTxt + "Process output: " + processStream + "\n";
138+
}
132139

133140
throw new AppiumServerHasNotBeenStartedLocallyException(msgTxt,
134141
e);

0 commit comments

Comments
 (0)