zoukankan      html  css  js  c++  java
  • maven打jar包配置文件

    在pom.xml文件中添加如下配置


    <!--设置编码格式-->
    <properties>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>


    <build>
    <plugins>

    <!--打包时使用,需要配置bootclasspath中jdk路径-->
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
    <source>1.8</source>
    <target>1.8</target>
    <compilerArguments>
                <!--打包时使用的jdk路径-->
    <bootclasspath>D: oolsjavajdkjrelib t.jar</bootclasspath>
    </compilerArguments>
    </configuration>
    </plugin>



    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.12.4</version>
    <configuration>
    <suiteXmlFiles>
    <suiteXmlFile>
    ./src/main/resources/testng.xml
    </suiteXmlFile>
    <!--<suiteXmlFile>-->
    <!--testng.xml-->
    <!--</suiteXmlFile>-->
    </suiteXmlFiles>
    </configuration>
    </plugin>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>3.0.0</version>
    <configuration>
    <transformers>
    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
    <mainClass>org.testng.TestNG</mainClass>
    </transformer>
    </transformers>
    </configuration>
    <executions>
    <execution>
    <id>package_shade_profile</id>
    <phase>package</phase>
    <goals>
    <goal>shade</goal>
    </goals>
    </execution>
    </executions>
    </plugin>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
    <source>8</source>
    <target>8</target>
    </configuration>
    </plugin>

    </plugins>
    </build>
    关于fiddler使用的随笔
  • 相关阅读:
    jquery.cookie.js插件一个小bug
    MVC3的学习笔记
    枚举和位标志学习
    局域网中访问IIS站点
    文件内容比较
    未能加载文件或程序集“xxx”或它的某一个依赖项。生成此程序集的运行时比当前加载的运行时新,无法加载此程序集。
    MSSQLSERVER服务不能启动
    初步学习lock的见解
    “base64 字符数组的无效长度”错误解决方案
    获取服务IP
  • 原文地址:https://www.cnblogs.com/testerabner/p/12123213.html
Copyright © 2011-2022 走看看