English 中文(简体)
Maven: How to “best” use maven also fordownloding “project related file” as formation xmls?
原标题:Maven: How to "best" use maven also for downloding "project related files" like configuration .xmls?
  • 时间:2012-01-15 19:40:14
  •  标签:
  • java
  • maven

I am new to maven and ran into the following question/problem:

例如: 当我使用晚餐时,我可以很容易地把Hibernate列为依赖物。 jar是完美的。 但是,印地安混凝土混杂着许多其他(混凝土)的档案,这些档案必须投入使用(如藏匿。

1.) Does Maven provide any solution to also download these files (so I can use them as a basis for my additions. It would not make sense writing these complexe xmls newly from the scratch). => For Example is there "goal/target" in maven that spits out these required "relataed config" files into a specifc directory?

b) 你们如何处理这一案件? 虽然我使用ave子,但这是否意味着我从来就不必下载通常用的齐普/gz项目-Files。 (如同过去一样)=>So maven只是管理/解决我在这方面拥有的部分“问题”。

最新情况:我所谈论的档案通常是我需要经常编辑的档案(配置文件)。 因此,他们大多没有在杰尔内作为静态公交文件提供。

UPDATE 2 => Real live example: I just started to write a POM for my project and googled the dependency-names, like "hibernate-core", "hibernate-validation", "rome" (RSS Lib), "tuckey" (Rewrite Filter) and included them in my POM. Now I have all the jars downloaded via maven (great!), but however I do not have any (sample/base) config files. The Web-app can not be run... Formerly (when I did not use maven) I downloaded the official distribution zip/gz package and they contained everything: jars and sample config files. Ok its great that maven helps me with the jars, but in the end I do have to navigate to every project webpage and also download the zip/gz distribuation package (as I did before) to only get the sample config files to include them in my project and then make some smaller changes... (without hibernate.cfg.xml hibernate does not start and writing it from scratch is an absolute nightmare, the best solution is take their sample file and update some specific stuff...

Thank you very much for any advice. Markus

问题回答

Most people handle this by including files like this inside their jars and referencing them via classpath.

如果这 does不 appeal地向你们发出呼吁,而且你有一席之地,Maven解决办法是:(a) 利用组装成jar或zi子;将由此产生的物品作为手工艺品与非豁免品,(b)利用玉米-独立-波ug来下载手工艺品,并按目标/some具包装。





相关问题
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 ...

热门标签