English 中文(简体)
包括:在破碎装置后,在JAR中,有“properties”文档。
原标题:Including .properties files with .class in JAR after an mvn install

我有一个计划,我想利用马文建设。 不幸的是,我的项目不尊重ma的缺省。 因此,Im有两种来源文件:A & B,其中载有.properties文档和.java来源。

在<代码>mvn 安装后,我的<代码>.properties文档没有在焦尔与我的<代码>一起包装。 如果能自动做到这一点,你可能建议使用<代码><resources> 标签来解决这类问题;这显然行之有效。 我知道,但每次都须具体说明我的<代码>.properties档案存放在何处,如果我想将这些档案列入联合报告,这不是我的解决办法,因为我有多个来源文件(hundreds)定期更新。

<resource>
        <targetPath>comvermegjar2</targetPath>
        <filtering>true</filtering>
        <directory>${basedir}/a/jar2</directory>
        <includes>
          <include>*.properties</include>
        </includes>
        <excludes>
          <exclude>*.java</exclude>
        </excludes>
</resource>

对于每个消息来源来说,我是否在我的人力部中写这句话,谁知道这样做的更简单的自动方式?

关于

问题回答

相反,在父母的 p子中一度注明,所有子女都应继承同样的遗体......

不可能改变使用标准的Maven布局,在弧/main/资源下,将你的所有财产置于平行的一揽子结构中? 那么,你不需要具体说明任何内容;所有“properties”档案都将被包装。

如果你这样做的话,你需要能够在不履约的情况下进行过滤。 你可能必须再次明确宣布资源目录,正如你宣布的那样,这似乎凌驾于你自由获得的资源。

至于你的多重来源,一个多功能的Maven项目可能最合适,A和B是一些新的家长项目的儿童。

这似乎与许多工作一样,但《马文公约》相当合理,如果你反对,则往往是一种痛苦的经验。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签