Maven原型插件不允许原型资源中的.resources通过 [英] Maven archetype plugin doesn't let .resources in archetype-resources through

查看:164
本文介绍了Maven原型插件不允许原型资源中的.resources通过的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何让.gitignore这样的资源成为结果项目的一部分吗?

Does anybody know how can I make resources like .gitignore be part of the resulting project ?

  1. 使用archetype-resources/.gitignore创建原型
  2. mvn安装
  3. mvn原型:生成
  4. 结果项目不包含.gitignore

PS.我确定它不存在.

PS. I'm sure it isn't there.

推荐答案

来自 https://issues.apache.org/jira/browse/MRESOURCES-190 似乎比持有要好后退版本升级:

This solution for upcoming maven-resources-plugin v3.0.0 (not yet released at the time of posting this; current is still 2.7) from https://issues.apache.org/jira/browse/MRESOURCES-190 seems better than holding back version upgrades:

<build>
  <plugins>
    <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-resources-plugin</artifactId>
       <configuration>
          <!-- Required so that .gitignore gets included in archetypes; see https://issues.apache.org/jira/browse/MRESOURCES-190 -->
          <addDefaultExcludes>false</addDefaultExcludes>

这篇关于Maven原型插件不允许原型资源中的.resources通过的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆