创建过滤器的Project


创建一个Java的maven project,然后在pom.xml中添加必要的元素,完整的内容如下:

<?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>

    <groupId>ubsi.demo</groupId>
    <artifactId>ubsi.demo.filter</artifactId>
    <version>1.0</version>

    <name>ubsi.demo.filter</name>
    <description>UBSI过滤器示例</description>

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <java.version>1.8</java.version>
        <ubsi.version>2.3.0</ubsi.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>utf-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>rewin.ubsi</groupId>
            <artifactId>rewin.ubsi.core</artifactId>
            <version>${ubsi.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <!-- mvn deploy使用的maven服务仓库 -->
    <distributionManagement>
        <repository>
            <id>maven-release</id>
            <name>release</name>
            <url>{your-maven-releases-repository-url}</url>
        </repository>
        <snapshotRepository>
            <id>maven-snapshot</id>
            <name>snapshot</name>
            <url>{your-maven-snapshots-repository-url}</url>
        </snapshotRepository>
    </distributionManagement>

</project>

results matching ""

    No results matching ""