maven指定构建的编码格式


pom.xml文件添加如下内容:

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

或者

<properties>
    <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
    <maven.compiler.target>1.6</maven.compiler.target>
    <maven.compiler.source>1.6</maven.compiler.source>
</properties>

 

<dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

 

 

解决项目中hbm文件用maven运行没有拷贝到target里面的问题

 

 

如果maven项目A依赖maven项目B,即是在A的pom.xml文件中配置了B的jar包,但是在Eclipse的工作区间中同时打开了项目A和项目B,那么发布项目A到wildfly中以debug模式启动后,调试发现项目A会直接读取项目B中的代码,而不是依赖的jar包中的代码。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM