Skip to content

The Unified and Autonomous Development Platform

fix issue #83: .bat file (windows batch) is seen as binary not as text

Robin Shen9ccf43237715
diff --git a/pom.xml b/pom.xml
index e82770b09d..e17b559811 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,584 +1,584 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>io.onedev</groupId>
- <artifactId>parent</artifactId>
- <version>1.0.5</version>
- </parent>
- <artifactId>server</artifactId>
- <version>3.1.0</version>
- <packaging>pom</packaging>
- <build>
- <finalName>${project.groupId}.${project.artifactId}-${project.version}</finalName>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.antlr</groupId>
- <artifactId>antlr4-maven-plugin</artifactId>
- <version>${antlr.version}</version>
- <executions>
- <execution>
- <goals>
- <goal>antlr4</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <sourceDirectory>${basedir}/src/main/java</sourceDirectory>
- <listener>true</listener>
- <visitor>true</visitor>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>io.onedev</groupId>
- <artifactId>plugin-maven</artifactId>
- <versionRange>[2.0.0,]</versionRange>
- <goals>
- <goal>populate-resources</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <execute>
- <runOnIncremental>true</runOnIncremental>
- <runOnConfiguration>true</runOnConfiguration>
- </execute>
- </action>
- </pluginExecution>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.codehaus.gmaven</groupId>
- <artifactId>groovy-maven-plugin</artifactId>
- <versionRange>[2.0,]</versionRange>
- <goals>
- <goal>execute</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <execute>
- <runOnIncremental>true</runOnIncremental>
- <runOnConfiguration>true</runOnConfiguration>
- </execute>
- </action>
- </pluginExecution>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <versionRange>[1.0.0,]</versionRange>
- <goals>
- <goal>jar</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore/>
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <version>3.0.2</version>
- <executions>
- <execution>
- <id>default-jar</id>
- <phase>never</phase>
- <configuration>
- <finalName>unwanted</finalName>
- <classifier>unwanted</classifier>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>io.onedev</groupId>
- <artifactId>plugin-maven</artifactId>
- <version>2.0.4</version>
- <executions>
- <execution>
- <id>populate-resources</id>
- <phase>compile</phase>
- <goals>
- <goal>populate-resources</goal>
- </goals>
- </execution>
- <execution>
- <id>package-artifacts</id>
- <phase>package</phase>
- <goals>
- <goal>package-artifacts</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- <resources>
- <resource>
- <directory>src/main/java</directory>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </resource>
- <resource>
- <directory>src/main/resources</directory>
- </resource>
- <resource>
- <directory>target/generated-sources/antlr4</directory>
- <includes>
- <include>*.tokens</include>
- </includes>
- </resource>
- </resources>
- </build>
- <modules>
- <module>server-core</module>
- <module>server-plugin</module>
- <module>server-product</module>
- </modules>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>io.onedev</groupId>
- <artifactId>commons-launcher-loader</artifactId>
- <version>${commons.version}</version>
- </dependency>
- <dependency>
- <groupId>io.onedev</groupId>
- <artifactId>commons-launcher-loader</artifactId>
- <type>test-jar</type>
- <version>${commons.version}</version>
- </dependency>
- <dependency>
- <groupId>io.onedev</groupId>
- <artifactId>commons-utils</artifactId>
- <version>${commons.version}</version>
- </dependency>
- <dependency>
- <groupId>io.onedev</groupId>
- <artifactId>commons-codeassist</artifactId>
- <version>${commons.version}</version>
- </dependency>
- <dependency>
- <groupId>io.onedev</groupId>
- <artifactId>commons-jsymbol</artifactId>
- <version>${commons.version}</version>
- </dependency>
- <dependency>
- <groupId>io.onedev</groupId>
- <artifactId>commons-jsyntax</artifactId>
- <version>${commons.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jul-to-slf4j</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- <version>${logback.version}</version>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <version>${logback.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-servlets</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-servlet</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty.websocket</groupId>
- <artifactId>websocket-server</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.wicket</groupId>
- <artifactId>wicket-core</artifactId>
- <version>${wicket.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.wicket</groupId>
- <artifactId>wicket-extensions</artifactId>
- <version>${wicket.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.wicket</groupId>
- <artifactId>wicket-request</artifactId>
- <version>${wicket.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.wicket</groupId>
- <artifactId>wicket-util</artifactId>
- <version>${wicket.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.wicket</groupId>
- <artifactId>wicket-devutils</artifactId>
- <version>${wicket.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.wicket</groupId>
- <artifactId>wicket-native-websocket-core</artifactId>
- <version>${wicket.version}</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.containers</groupId>
- <artifactId>jersey-container-servlet</artifactId>
- <version>${jersey.version}</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.ext</groupId>
- <artifactId>jersey-bean-validation</artifactId>
- <version>${jersey.version}</version>
- </dependency>
- <dependency>
- <groupId>org.dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>5.2.4.Final</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${hibernate.version}</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-jcache</artifactId>
- <version>${hibernate.version}</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-entitymanager</artifactId>
- <version>${hibernate.version}</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-hikaricp</artifactId>
- <version>${hibernate.version}</version>
- </dependency>
- <dependency>
- <groupId>org.ehcache</groupId>
- <artifactId>ehcache</artifactId>
- <version>3.8.0</version>
- </dependency>
- <dependency>
- <groupId>com.zaxxer</groupId>
- <artifactId>HikariCP</artifactId>
- <version>2.7.9</version>
- </dependency>
- <dependency>
- <groupId>de.agilecoders.wicket</groupId>
- <artifactId>wicket-bootstrap-core</artifactId>
- <version>${wicketbootstrap.version}</version>
- </dependency>
- <dependency>
- <groupId>de.agilecoders.wicket</groupId>
- <artifactId>wicket-bootstrap-extensions</artifactId>
- <version>${wicketbootstrap.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-collections4</artifactId>
- <version>4.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-compress</artifactId>
- <version>1.19</version>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>2.5</version>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>1.7</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- <version>3.8.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-text</artifactId>
- <version>1.6</version>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>25.1-android</version>
- </dependency>
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- <version>1.3.3</version>
- </dependency>
- <dependency>
- <groupId>commons-validator</groupId>
- <artifactId>commons-validator</artifactId>
- <version>1.4.0</version>
- </dependency>
- <dependency>
- <groupId>org.ocpsoft.prettytime</groupId>
- <artifactId>prettytime</artifactId>
- <version>4.0.1.Final</version>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>4.5.6</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish.hk2</groupId>
- <artifactId>guice-bridge</artifactId>
- <version>2.5.0</version>
- </dependency>
- <dependency>
- <groupId>org.jetbrains.xodus</groupId>
- <artifactId>xodus-entity-store</artifactId>
- <version>1.2.3</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tika</groupId>
- <artifactId>tika-core</artifactId>
- <version>1.22</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-email</artifactId>
- <version>1.4</version>
- </dependency>
- <dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- <version>1.7</version>
- </dependency>
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <version>3.1</version>
- </dependency>
- <dependency>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- <version>2.2</version>
- </dependency>
- <dependency>
- <groupId>org.yaml</groupId>
- <artifactId>snakeyaml</artifactId>
- <version>1.21</version>
- </dependency>
- <dependency>
- <groupId>org.bouncycastle</groupId>
- <artifactId>bcprov-jdk15on</artifactId>
- <version>1.62</version>
- </dependency>
- <dependency>
- <groupId>org.unbescape</groupId>
- <artifactId>unbescape</artifactId>
- <version>1.1.2.RELEASE</version>
- </dependency>
- <dependency>
- <groupId>org.quartz-scheduler</groupId>
- <artifactId>quartz</artifactId>
- <version>2.2.1</version>
- </dependency>
- <dependency>
- <groupId>org.webjars</groupId>
- <artifactId>font-awesome</artifactId>
- <version>4.7.0</version>
- </dependency>
- <dependency>
- <groupId>org.webjars.npm</groupId>
- <artifactId>codemirror</artifactId>
- <version>5.21.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shiro</groupId>
- <artifactId>shiro-core</artifactId>
- <version>${shiro.version}</version>
- </dependency>
- <dependency>
- <artifactId>lucene-core</artifactId>
- <groupId>org.apache.lucene</groupId>
- <version>${lucene.version}</version>
- </dependency>
- <dependency>
- <artifactId>lucene-queries</artifactId>
- <groupId>org.apache.lucene</groupId>
- <version>${lucene.version}</version>
- </dependency>
- <dependency>
- <artifactId>lucene-analyzers-common</artifactId>
- <groupId>org.apache.lucene</groupId>
- <version>${lucene.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shiro</groupId>
- <artifactId>shiro-web</artifactId>
- <version>${shiro.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shiro</groupId>
- <artifactId>shiro-guice</artifactId>
- <version>${shiro.version}</version>
- </dependency>
- <dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <version>2.3.0</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>javax.el</artifactId>
- <version>3.0.0</version>
- </dependency>
- <dependency>
- <groupId>org.hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <version>2.4.0</version>
- </dependency>
- <dependency>
- <groupId>jaxen</groupId>
- <artifactId>jaxen</artifactId>
- <version>1.1.6</version>
- </dependency>
- <dependency>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- <version>1.4.11.1</version>
- </dependency>
- <dependency>
- <groupId>com.joestelmach</groupId>
- <artifactId>natty</artifactId>
- <version>0.13</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy</artifactId>
- <version>${groovy.version}</version>
- </dependency>
- <dependency>
- <groupId>com.googlecode.juniversalchardet</groupId>
- <artifactId>juniversalchardet</artifactId>
- <version>1.0.3</version>
- </dependency>
- <dependency>
- <groupId>com.vladsch.flexmark</groupId>
- <artifactId>flexmark</artifactId>
- <version>${flexmark.version}</version>
- </dependency>
- <dependency>
- <groupId>com.vladsch.flexmark</groupId>
- <artifactId>flexmark-ext-autolink</artifactId>
- <version>${flexmark.version}</version>
- </dependency>
- <dependency>
- <groupId>com.vladsch.flexmark</groupId>
- <artifactId>flexmark-ext-anchorlink</artifactId>
- <version>${flexmark.version}</version>
- </dependency>
- <dependency>
- <groupId>com.vladsch.flexmark</groupId>
- <artifactId>flexmark-ext-definition</artifactId>
- <version>${flexmark.version}</version>
- </dependency>
- <dependency>
- <groupId>com.vladsch.flexmark</groupId>
- <artifactId>flexmark-ext-tables</artifactId>
- <version>${flexmark.version}</version>
- </dependency>
- <dependency>
- <groupId>com.vladsch.flexmark</groupId>
- <artifactId>flexmark-ext-gfm-tasklist</artifactId>
- <version>${flexmark.version}</version>
- </dependency>
- <dependency>
- <groupId>com.vladsch.flexmark</groupId>
- <artifactId>flexmark-ext-toc</artifactId>
- <version>${flexmark.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jgit</groupId>
- <artifactId>org.eclipse.jgit.http.server</artifactId>
- <version>${jgit.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jgit</groupId>
- <artifactId>org.eclipse.jgit.archive</artifactId>
- <version>${jgit.version}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <repositories>
- <repository>
- <id>onedev</id>
- <url>https://artifact.onedev.io/artifactory/onedev</url>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- <checksumPolicy>fail</checksumPolicy>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- <checksumPolicy>fail</checksumPolicy>
- </snapshots>
- </repository>
- </repositories>
- <properties>
- <commons.version>1.1.14</commons.version>
- <slf4j.version>1.7.5</slf4j.version>
- <logback.version>1.0.11</logback.version>
- <antlr.version>4.7.2</antlr.version>
- <jetty.version>9.4.24.v20191120</jetty.version>
- <wicket.version>7.14.0</wicket.version>
- <jersey.version>2.26</jersey.version>
- <hibernate.version>5.4.9.Final</hibernate.version>
- <wicketbootstrap.version>0.10.18</wicketbootstrap.version>
- <lucene.version>7.1.0</lucene.version>
- <shiro.version>1.4.2</shiro.version>
- <jgit.version>5.1.3.201810200350-r</jgit.version>
- <flexmark.version>0.18.3</flexmark.version>
- <groovy.version>2.4.14</groovy.version>
- <servlet.version>3.1.0</servlet.version>
- </properties>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>io.onedev</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0.5</version>
+ </parent>
+ <artifactId>server</artifactId>
+ <version>3.1.0</version>
+ <packaging>pom</packaging>
+ <build>
+ <finalName>${project.groupId}.${project.artifactId}-${project.version}</finalName>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr4-maven-plugin</artifactId>
+ <version>${antlr.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>antlr4</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <sourceDirectory>${basedir}/src/main/java</sourceDirectory>
+ <listener>true</listener>
+ <visitor>true</visitor>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>io.onedev</groupId>
+ <artifactId>plugin-maven</artifactId>
+ <versionRange>[2.0.0,]</versionRange>
+ <goals>
+ <goal>populate-resources</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <execute>
+ <runOnIncremental>true</runOnIncremental>
+ <runOnConfiguration>true</runOnConfiguration>
+ </execute>
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>groovy-maven-plugin</artifactId>
+ <versionRange>[2.0,]</versionRange>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <execute>
+ <runOnIncremental>true</runOnIncremental>
+ <runOnConfiguration>true</runOnConfiguration>
+ </execute>
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <versionRange>[1.0.0,]</versionRange>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore/>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.0.2</version>
+ <executions>
+ <execution>
+ <id>default-jar</id>
+ <phase>never</phase>
+ <configuration>
+ <finalName>unwanted</finalName>
+ <classifier>unwanted</classifier>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.onedev</groupId>
+ <artifactId>plugin-maven</artifactId>
+ <version>2.0.4</version>
+ <executions>
+ <execution>
+ <id>populate-resources</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>populate-resources</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>package-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>package-artifacts</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <resources>
+ <resource>
+ <directory>src/main/java</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <directory>target/generated-sources/antlr4</directory>
+ <includes>
+ <include>*.tokens</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+ <modules>
+ <module>server-core</module>
+ <module>server-plugin</module>
+ <module>server-product</module>
+ </modules>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>io.onedev</groupId>
+ <artifactId>commons-launcher-loader</artifactId>
+ <version>${commons.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.onedev</groupId>
+ <artifactId>commons-launcher-loader</artifactId>
+ <type>test-jar</type>
+ <version>${commons.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.onedev</groupId>
+ <artifactId>commons-utils</artifactId>
+ <version>${commons.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.onedev</groupId>
+ <artifactId>commons-codeassist</artifactId>
+ <version>${commons.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.onedev</groupId>
+ <artifactId>commons-jsymbol</artifactId>
+ <version>${commons.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.onedev</groupId>
+ <artifactId>commons-jsyntax</artifactId>
+ <version>${commons.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jul-to-slf4j</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-core</artifactId>
+ <version>${logback.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>${logback.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlets</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlet</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.websocket</groupId>
+ <artifactId>websocket-server</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wicket</groupId>
+ <artifactId>wicket-core</artifactId>
+ <version>${wicket.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wicket</groupId>
+ <artifactId>wicket-extensions</artifactId>
+ <version>${wicket.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wicket</groupId>
+ <artifactId>wicket-request</artifactId>
+ <version>${wicket.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wicket</groupId>
+ <artifactId>wicket-util</artifactId>
+ <version>${wicket.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wicket</groupId>
+ <artifactId>wicket-devutils</artifactId>
+ <version>${wicket.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wicket</groupId>
+ <artifactId>wicket-native-websocket-core</artifactId>
+ <version>${wicket.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.containers</groupId>
+ <artifactId>jersey-container-servlet</artifactId>
+ <version>${jersey.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.ext</groupId>
+ <artifactId>jersey-bean-validation</artifactId>
+ <version>${jersey.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <version>2.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>5.2.4.Final</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${hibernate.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-jcache</artifactId>
+ <version>${hibernate.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>${hibernate.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-hikaricp</artifactId>
+ <version>${hibernate.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ <version>3.8.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.zaxxer</groupId>
+ <artifactId>HikariCP</artifactId>
+ <version>2.7.9</version>
+ </dependency>
+ <dependency>
+ <groupId>de.agilecoders.wicket</groupId>
+ <artifactId>wicket-bootstrap-core</artifactId>
+ <version>${wicketbootstrap.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>de.agilecoders.wicket</groupId>
+ <artifactId>wicket-bootstrap-extensions</artifactId>
+ <version>${wicketbootstrap.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-collections4</artifactId>
+ <version>4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-compress</artifactId>
+ <version>1.19</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.5</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.7</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-text</artifactId>
+ <version>1.6</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>25.1-android</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>1.3.3</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-validator</groupId>
+ <artifactId>commons-validator</artifactId>
+ <version>1.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ocpsoft.prettytime</groupId>
+ <artifactId>prettytime</artifactId>
+ <version>4.0.1.Final</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>4.5.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.hk2</groupId>
+ <artifactId>guice-bridge</artifactId>
+ <version>2.5.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jetbrains.xodus</groupId>
+ <artifactId>xodus-entity-store</artifactId>
+ <version>1.2.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tika</groupId>
+ <artifactId>tika-core</artifactId>
+ <version>1.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-email</artifactId>
+ <version>1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.velocity</groupId>
+ <artifactId>velocity</artifactId>
+ <version>1.7</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>1.21</version>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk15on</artifactId>
+ <version>1.62</version>
+ </dependency>
+ <dependency>
+ <groupId>org.unbescape</groupId>
+ <artifactId>unbescape</artifactId>
+ <version>1.1.2.RELEASE</version>
+ </dependency>
+ <dependency>
+ <groupId>org.quartz-scheduler</groupId>
+ <artifactId>quartz</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>font-awesome</artifactId>
+ <version>4.7.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.webjars.npm</groupId>
+ <artifactId>codemirror</artifactId>
+ <version>5.21.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shiro</groupId>
+ <artifactId>shiro-core</artifactId>
+ <version>${shiro.version}</version>
+ </dependency>
+ <dependency>
+ <artifactId>lucene-core</artifactId>
+ <groupId>org.apache.lucene</groupId>
+ <version>${lucene.version}</version>
+ </dependency>
+ <dependency>
+ <artifactId>lucene-queries</artifactId>
+ <groupId>org.apache.lucene</groupId>
+ <version>${lucene.version}</version>
+ </dependency>
+ <dependency>
+ <artifactId>lucene-analyzers-common</artifactId>
+ <groupId>org.apache.lucene</groupId>
+ <version>${lucene.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shiro</groupId>
+ <artifactId>shiro-web</artifactId>
+ <version>${shiro.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shiro</groupId>
+ <artifactId>shiro-guice</artifactId>
+ <version>${shiro.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.3.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish</groupId>
+ <artifactId>javax.el</artifactId>
+ <version>3.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>2.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>jaxen</groupId>
+ <artifactId>jaxen</artifactId>
+ <version>1.1.6</version>
+ </dependency>
+ <dependency>
+ <groupId>com.thoughtworks.xstream</groupId>
+ <artifactId>xstream</artifactId>
+ <version>1.4.11.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.joestelmach</groupId>
+ <artifactId>natty</artifactId>
+ <version>0.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy</artifactId>
+ <version>${groovy.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.googlecode.juniversalchardet</groupId>
+ <artifactId>juniversalchardet</artifactId>
+ <version>1.0.3</version>
+ </dependency>
+ <dependency>
+ <groupId>com.vladsch.flexmark</groupId>
+ <artifactId>flexmark</artifactId>
+ <version>${flexmark.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.vladsch.flexmark</groupId>
+ <artifactId>flexmark-ext-autolink</artifactId>
+ <version>${flexmark.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.vladsch.flexmark</groupId>
+ <artifactId>flexmark-ext-anchorlink</artifactId>
+ <version>${flexmark.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.vladsch.flexmark</groupId>
+ <artifactId>flexmark-ext-definition</artifactId>
+ <version>${flexmark.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.vladsch.flexmark</groupId>
+ <artifactId>flexmark-ext-tables</artifactId>
+ <version>${flexmark.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.vladsch.flexmark</groupId>
+ <artifactId>flexmark-ext-gfm-tasklist</artifactId>
+ <version>${flexmark.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.vladsch.flexmark</groupId>
+ <artifactId>flexmark-ext-toc</artifactId>
+ <version>${flexmark.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.http.server</artifactId>
+ <version>${jgit.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.archive</artifactId>
+ <version>${jgit.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <repositories>
+ <repository>
+ <id>onedev</id>
+ <url>https://artifact.onedev.io/artifactory/onedev</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ <checksumPolicy>fail</checksumPolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>always</updatePolicy>
+ <checksumPolicy>fail</checksumPolicy>
+ </snapshots>
+ </repository>
+ </repositories>
+ <properties>
+ <commons.version>1.1.14</commons.version>
+ <slf4j.version>1.7.5</slf4j.version>
+ <logback.version>1.0.11</logback.version>
+ <antlr.version>4.7.2</antlr.version>
+ <jetty.version>9.4.24.v20191120</jetty.version>
+ <wicket.version>7.14.0</wicket.version>
+ <jersey.version>2.26</jersey.version>
+ <hibernate.version>5.4.9.Final</hibernate.version>
+ <wicketbootstrap.version>0.10.18</wicketbootstrap.version>
+ <lucene.version>7.1.0</lucene.version>
+ <shiro.version>1.4.2</shiro.version>
+ <jgit.version>5.1.3.201810200350-r</jgit.version>
+ <flexmark.version>0.18.3</flexmark.version>
+ <groovy.version>2.4.14</groovy.version>
+ <servlet.version>3.1.0</servlet.version>
+ </properties>
+</project>
diff --git a/server-core/src/main/java/io/onedev/server/util/ContentDetector.java b/server-core/src/main/java/io/onedev/server/util/ContentDetector.java
index 5f5c6fd7b8..849433735a 100644
--- a/server-core/src/main/java/io/onedev/server/util/ContentDetector.java
+++ b/server-core/src/main/java/io/onedev/server/util/ContentDetector.java
@@ -1,104 +1,105 @@
-package io.onedev.server.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.charset.Charset;
-
-import javax.annotation.Nullable;
-
-import org.apache.tika.Tika;
-import org.apache.tika.mime.MediaType;
-
-public class ContentDetector {
-
- private static final Tika tika = new Tika();
-
- /**
- * Read leading information of specified stream until the charset is detected.
- *
- * @param contentStream
- * stream to be read for charset detection
- * @return
- * detected charset, or <tt>null</tt> if charset can not be detected
- */
- public static @Nullable Charset detectCharset(InputStream contentStream) {
- try {
- return UniversalEncodingDetector.detect(contentStream);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Read leading information of specified content bytes to detect content charset.
- *
- * @param contentBytes
- * content to be detected
- * @return
- * charset of the content, or <tt>null</tt> if charset can not be detected
- */
- public static @Nullable Charset detectCharset(byte[] contentBytes) {
- if (contentBytes.length != 0) {
- try {
- return UniversalEncodingDetector.detect(contentBytes);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- } else {
- return null;
- }
- }
-
- public static boolean isBinary(byte[] contentBytes, @Nullable String fileName) {
- if (contentBytes.length == 0)
- return false;
-
- MediaType mediaType = detectMediaType(contentBytes, fileName);
-
- return !mediaType.getType().equalsIgnoreCase("text")
- && !mediaType.equals(MediaType.application("xhtml+xml"))
- && !mediaType.equals(MediaType.APPLICATION_XML)
- && !mediaType.equals(MediaType.application("json"))
- && !mediaType.equals(MediaType.application("x-sh"))
- && !mediaType.equals(MediaType.application("javascript"))
- && !mediaType.equals(MediaType.application("x-httpd-jsp"))
- && !mediaType.equals(MediaType.application("x-httpd-php"));
- }
-
- /**
- * Get text from specified content bytes, optionally with help of file name.
- *
- * @param contentBytes
- * content bytes to construct text from
- * @param fileName
- * file name to help deciding if supplied content bytes represents text
- * @return
- * text representation of content bytes, or <tt>null</tt> if content
- * can not be converted to text
- */
- @Nullable
- public static String convertToText(byte[] contentBytes, @Nullable String fileName) {
- if (!isBinary(contentBytes, fileName)) {
- Charset charset = detectCharset(contentBytes);
- if (charset != null)
- return new String(contentBytes, charset);
- else
- return new String(contentBytes);
- } else {
- return null;
- }
- }
-
- public static MediaType detectMediaType(byte[] contentBytes, @Nullable String fileName) {
- return MediaType.parse(tika.detect(contentBytes, fileName));
- }
-
- public static MediaType detectMediaType(InputStream contentStream, @Nullable String fileName) {
- try {
- return MediaType.parse(tika.detect(contentStream, fileName));
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
-
-}
+package io.onedev.server.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.Charset;
+
+import javax.annotation.Nullable;
+
+import org.apache.tika.Tika;
+import org.apache.tika.mime.MediaType;
+
+public class ContentDetector {
+
+ private static final Tika tika = new Tika();
+
+ /**
+ * Read leading information of specified stream until the charset is detected.
+ *
+ * @param contentStream
+ * stream to be read for charset detection
+ * @return
+ * detected charset, or <tt>null</tt> if charset can not be detected
+ */
+ public static @Nullable Charset detectCharset(InputStream contentStream) {
+ try {
+ return UniversalEncodingDetector.detect(contentStream);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Read leading information of specified content bytes to detect content charset.
+ *
+ * @param contentBytes
+ * content to be detected
+ * @return
+ * charset of the content, or <tt>null</tt> if charset can not be detected
+ */
+ public static @Nullable Charset detectCharset(byte[] contentBytes) {
+ if (contentBytes.length != 0) {
+ try {
+ return UniversalEncodingDetector.detect(contentBytes);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ } else {
+ return null;
+ }
+ }
+
+ public static boolean isBinary(byte[] contentBytes, @Nullable String fileName) {
+ if (contentBytes.length == 0)
+ return false;
+
+ MediaType mediaType = detectMediaType(contentBytes, fileName);
+
+ return !mediaType.getType().equalsIgnoreCase("text")
+ && !mediaType.equals(MediaType.application("xhtml+xml"))
+ && !mediaType.equals(MediaType.APPLICATION_XML)
+ && !mediaType.equals(MediaType.application("x-bat"))
+ && !mediaType.equals(MediaType.application("json"))
+ && !mediaType.equals(MediaType.application("x-sh"))
+ && !mediaType.equals(MediaType.application("javascript"))
+ && !mediaType.equals(MediaType.application("x-httpd-jsp"))
+ && !mediaType.equals(MediaType.application("x-httpd-php"));
+ }
+
+ /**
+ * Get text from specified content bytes, optionally with help of file name.
+ *
+ * @param contentBytes
+ * content bytes to construct text from
+ * @param fileName
+ * file name to help deciding if supplied content bytes represents text
+ * @return
+ * text representation of content bytes, or <tt>null</tt> if content
+ * can not be converted to text
+ */
+ @Nullable
+ public static String convertToText(byte[] contentBytes, @Nullable String fileName) {
+ if (!isBinary(contentBytes, fileName)) {
+ Charset charset = detectCharset(contentBytes);
+ if (charset != null)
+ return new String(contentBytes, charset);
+ else
+ return new String(contentBytes);
+ } else {
+ return null;
+ }
+ }
+
+ public static MediaType detectMediaType(byte[] contentBytes, @Nullable String fileName) {
+ return MediaType.parse(tika.detect(contentBytes, fileName));
+ }
+
+ public static MediaType detectMediaType(InputStream contentStream, @Nullable String fileName) {
+ try {
+ return MediaType.parse(tika.detect(contentStream, fileName));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+}