-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Torkel Berli edited this page Feb 19, 2019
·
9 revisions
- install mvn and java8 or later (you can use OpenJDK too)
- git clone
- you can run the following commands inside wovnjava
mvn test # run tests
mvn install # make jar file
mvn clean # delete compiled files
- make
pom.xml
as the following
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.wovn.java</groupId>
<artifactId>wovn</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>wovn Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>com.github.wovnio</groupId>
<artifactId>wovnjava</artifactId>
<version>0.4.0</version>
<!--<version>hotfix~location-SNAPSHOT</version> -->
<scope>system</scope>
<systemPath>${basedir}/../../../src/wovnjava/target/wovnjava-0.4.0-jar-with-dependencies.jar</systemPath>
</dependency>
</dependencies>
<build>
<finalName>wovn</finalName>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<path>/</path>
<update>true</update>
<url>http://localhost:8080/manager/wovn</url>
<username>test</username>
<password>test</password>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
<!-- These lines are not needed if you're using a SNAPSHOT version. -->
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
<!-- end -->
</repository>
</repositories>
</project>
- make
src/WEB-INF/web.xml
such as the following
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>Archetype Created Web Application</display-name>
<filter>
<filter-name>wovn</filter-name>
<filter-class>com.github.wovnio.wovnjava.WovnServletFilter</filter-class>
<init-param>
<param-name>userToken</param-name>
<param-value>NCmbvk</param-value>
</init-param>
<init-param>
<param-name>urlPattern</param-name>
<param-value>path</param-value>
</init-param>
<init-param>
<param-name>apiUrl</param-name>
<param-value>http://localhost:3001/v0/</param-value>
</init-param>
<init-param>
<param-name>connectTimout</param-name>
<param-value>10000</param-value>
</init-param>
<init-param>
<param-name>readTimeout</param-name>
<param-value>100000</param-value>
</init-param>
<init-param>
<param-name>secretKey</param-name>
<param-value>secret</param-value>
</init-param>
<init-param>
<param-name>supportedLangs</param-name>
<param-value>ar,bg,zh-CHS,zh-CHT,da,nl,en,fi,fr,de,el,he,id,it,ja,ko,ms,my,ne,no,pl,pt,ru,es,sv,th,hi,tr,uk,vi,tl</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>wovn</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
- make
index.html
such as the following
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>wovnjava</title>
</head>
<body>
<h1>wovnjava test</h1>
</body>
</html>
- lunch Tomcat by
mvn tomcat7:run
- you can see
http://localhost:8080/
- Merge changes to master branch
- Change version in pom.xml and Settings.java
- Go to https://github.com/WOVNio/wovnjava/releases and "Draft a new release"
- Enter information for tag version (example
0.4.1
), release title and description - You do not need to upload any files. Click "Publish Release"
- Wait about 10 minutes while jitpack compiles the release, then check it at https://jitpack.io/#WOVNio/wovnjava
- Confirm that the new version is working well with your local java project
- Announce release at developer channel and notify CS members