<build>
<finalName>basic</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.0-beta-1</version>
<configuration>
<url>http://www.my.com:6789/manager/html</url>
<server>tomcat7</server>
</configuration>
</plugin>
</plugins> <resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.hbm.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</resource>
</resources> </build>

还看到有说这样做的,不过使用第一次加进来了,clean一次后又不打包hbm.xml文件。

如果是 jar 包,在 Plugin 中配置:

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</plugin>
</plugins>
</build>

如果是 war 包,在 Plugin 中配置:

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</plugin>
</plugins>
</build>

Maven项目不打包*.hbm.xml文件的更多相关文章

  1. Maven 项目不打包 *.hbm.xml 映射文件

    使用 Maven 部署 Java Web 项目时,Hibernate 的映射文件 *.hbm.xml 没有被打包部署到目标目录下,解决方法:在 pom.xml 文件中 <build> 节点 ...

  2. Maven 项目中的 pom.xml 文件内容说明

    下面是一个比较全面的 POM 文件的结构,当然常用的并不需要这么多配置,视自己的项目需求而定. <project xmlns="http://maven.apache.org/POM/ ...

  3. 使用idea搭建maven项目,结果spring-mybatis.xml文件报红“Cannot resolve file 'jdbc.properties' less... (Ctrl+F1) Inspection info:Spring XML model validation”

    错误如下图: 解决方案: 暂时只是使用右下角的highlightinglevel来屏蔽,拖动到最左边就行了

  4. Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):4、Maven项目转换与pom.xml配置

    文章目录: Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):1.JIRA账号注册 Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):2.PGP ...

  5. Maven项目中的pom.xml详解【转】

    什么是pom? pom作为项目对象模型.通过xml表示maven项目,使用pom.xml来实现.主要描述了项目:包括配置文件:开发者需要遵循的规则,缺陷管理系统,组织和licenses,项目的url, ...

  6. eclipse 如何对maven项目进行打包?

      eclipse 如何对maven项目进行打包? CreateTime--2018年4月19日22:02:50 Author:Marydon 1.方式一:使用eclipse中的maven插件(命令) ...

  7. Maven项目的打包发布到Nexus私服和服务器

    1.编写pom文件如下: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins< ...

  8. 通过MyEclipse生成Hibernate类文件和hbm.xml文件,或者annotation文件

    1.   前言 很多人都在使用myEclipse,很多公司也都使用hibernate框架,老版本的hibernate中,由于没有annotation,我们需要写两个文件来维护表与对象的关系,写一个类, ...

  9. intellij配置hibernate自动生成hbm.xml文件

    1.首先创建一个Java web项目,这里因为已经在整个项目中配置好tomcat了,所以我是直接创建module的,其实和创建project的配置方法一样,创建的时候选择Web Application ...

随机推荐

  1. poj 2456 Aggressive cows && nyoj 疯牛 最大化最小值 二分

    poj 2456 Aggressive cows && nyoj 疯牛 最大化最小值 二分 题目链接: nyoj : http://acm.nyist.net/JudgeOnline/ ...

  2. fiddler安装及配置+利用fiddler进行简单抓包(wawayaya阅读)

    1.工欲善其事必先利其器,fiddler安装 https://www.telerik.com/fiddler 2.安装exe(无脑下一步) 3.安装成功后配置fiddler(因为启动fiddler时链 ...

  3. vs2015 制作安装包额外需要安装的软件VSI_bundle

    vs2015 制作安装包额外需要安装的软件VSI_bundle 下载地址:http://files.cnblogs.com/files/sdner/VSI_bundle.rar

  4. 转载 Mysql安装过程

    目录 一.概述 二.MySQL安装 三.安装成功验证 四.NavicatforMySQL下载及使用 一.概述 MySQL版本:5.7.17 下载地址:http://rj.baidu.com/soft/ ...

  5. C++彩色数据流动界面

    一个数据流动界面 #include <windows.h> #include <time.h> #include <cstdio> #include <str ...

  6. pku 2488 A Knight&#39;s Journey (搜索 DFS)

    A Knight's Journey Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 28697   Accepted: 98 ...

  7. 使用storyboard设置button边框属性(颜色,宽度,圆角)

    通常使用Category时.仅仅能加入方法,不可加入属性.可是在使用Storyboard时我们可能会使用到keyPath,这里设置的key都须要是所设置视图的属性值.而且类型有所限制. 比如:我如今有 ...

  8. 【Sqlsever系列】日期和时间

    1   概述 本文将集合MSDN简要概述Sqlserver中日期和时间函数. 2   具体内容 2.1  date and time data types 2.2  日期和时间功能 3   参考文献 ...

  9. Java中File的使用

    File 代表文件或者目录的类 构造函数 File(File parent,String child)---代表了指定父目录下的指定的子文件或者子目录 File(String pathname)--- ...

  10. 「mysql优化专题」90%程序员没听过的存储过程和存储函数教学(7)

    一.MYSQL储存过程简介(技术文): 储存过程是一个可编程的函数,它在数据库中创建并保存.它可以有SQL语句和一些特殊的控制结构组成.当希望在不同的应用程序或平台上执行相同的函数,或者封装特定功能时 ...