Skip to content
This repository was archived by the owner on Dec 7, 2020. It is now read-only.

Commit 9cb1ffe

Browse files
author
Severi Haverila
committed
deploy library to github repo
1 parent 1e9cae3 commit 9cb1ffe

File tree

3 files changed

+59
-7
lines changed

3 files changed

+59
-7
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ Run Appium:
3939

4040

4141
```
42-
cd library
43-
mvn package
44-
mvn install:install-file -Dfile=target/mobile-opencv-image-recognition-library-1.0-SNAPSHOT.jar -DpomFile=pom.xml -Djavadoc=target/mobile-opencv-image-recognition-library-1.0-SNAPSHOT-javadoc.jar -Dsources=target/mobile-opencv-image-recognition-library-1.0-SNAPSHOT-sources.jar
45-
cd ../example
42+
cd example
4643
4744
# Install OpenCV (change path according to your platform)
4845
mvn install:install-file -Dfile=lib/linux/opencv/opencv-2413.jar -DgroupId=opencv -DartifactId=opencv -Dversion=2.4.13 -Dpackaging=jar

example/pom.xml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,22 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>com.testdroid</groupId>
66
<artifactId>image-recognition-library-project-example</artifactId>
7-
<version>2.0-SNAPSHOT</version>
7+
<version>2.0</version>
8+
<repositories>
9+
<repository>
10+
<id>opencv-library-mvn-repo</id>
11+
<url>https://raw.github.com/bitbar/opencv-library/mvn-repo/</url>
12+
<snapshots>
13+
<enabled>true</enabled>
14+
<updatePolicy>always</updatePolicy>
15+
</snapshots>
16+
</repository>
17+
</repositories>
818
<dependencies>
919
<dependency>
1020
<groupId>com.testdroid</groupId>
1121
<artifactId>mobile-opencv-image-recognition-library</artifactId>
12-
<version>1.0-SNAPSHOT</version>
22+
<version>1.0</version>
1323
</dependency>
1424
<dependency>
1525
<groupId>ch.qos.logback</groupId>

library/pom.xml

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>com.testdroid</groupId>
66
<artifactId>mobile-opencv-image-recognition-library</artifactId>
7-
<version>1.0-SNAPSHOT</version>
7+
<version>1.0</version>
88
<packaging>jar</packaging>
99
<name>OpenCV Mobile Image Recognition Library</name>
1010
<description>Library for image recognition that can be used in mobile testing with for example Appium</description>
@@ -19,6 +19,10 @@
1919
<scm>
2020
<url>https://github.com/severi/opencv_library</url>
2121
</scm>
22+
<properties>
23+
<!-- github server corresponds to entry in ~/.m2/settings.xml -->
24+
<github.global.server>github</github.global.server>
25+
</properties>
2226
<dependencies>
2327
<dependency>
2428
<groupId>net.sourceforge.tess4j</groupId>
@@ -96,6 +100,47 @@
96100
<additionalparam>-Xdoclint:none</additionalparam>
97101
</configuration>
98102
</plugin>
103+
<plugin>
104+
<artifactId>maven-deploy-plugin</artifactId>
105+
<version>2.8.1</version>
106+
<configuration>
107+
<altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
108+
</configuration>
109+
</plugin>
110+
<plugin>
111+
<groupId>com.github.github</groupId>
112+
<artifactId>site-maven-plugin</artifactId>
113+
<version>0.11</version>
114+
<configuration>
115+
<message>Maven artifacts for ${project.version}</message> <!-- git commit message -->
116+
<noJekyll>true</noJekyll> <!-- disable webpage processing -->
117+
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory> <!-- matches distribution management repository url above -->
118+
<branch>refs/heads/mvn-repo</branch> <!-- remote branch name -->
119+
<includes>
120+
<include>**/*</include>
121+
</includes>
122+
<repositoryName>opencv-library</repositoryName> <!-- github repo name -->
123+
<repositoryOwner>bitbar</repositoryOwner> <!-- github username -->
124+
<merge>true</merge>
125+
</configuration>
126+
<executions>
127+
<!-- run site-maven-plugin's 'site' target as part of
128+
the build's normal 'deploy' phase -->
129+
<execution>
130+
<goals>
131+
<goal>site</goal>
132+
</goals>
133+
<phase>deploy</phase>
134+
</execution>
135+
</executions>
136+
</plugin>
99137
</plugins>
100138
</build>
139+
<distributionManagement>
140+
<repository>
141+
<id>internal.repo</id>
142+
<name>Temporary Staging Repository</name>
143+
<url>file://${project.build.directory}/mvn-repo</url>
144+
</repository>
145+
</distributionManagement>
101146
</project>

0 commit comments

Comments
 (0)