[英]Maven and pom.xml
I'm using m2eclipse and trying to learn some tapestry. 我正在使用m2eclipse并尝试学习一些挂毯。 I'm trying to update my project to pull some different resources from maven.
我正在尝试更新我的项目以从maven中提取一些不同的资源。 (Or at least, I think that's what I'm trying to do).
(或者至少,我认为这就是我想要做的)。
Here's part of my pom.xml: 这是我的pom.xml的一部分:
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-hibernate</artifactId>
<version>${tapestry-release-version}</version>
</dependency>
The artifact id used to be tapestry-core, but the tutorial I'm using said to change it to tapestry-hibernate so I can use hibernate. 工件id曾经是tapestry-core,但我正在使用的教程说它将它改为tapestry-hibernate所以我可以使用hibernate。 I changed the pom.xml and saved it, but I'm not sure what command exactly I'm supposed to execute exactly.
我更改了pom.xml并保存了它,但我不确定究竟应该执行什么命令。 I tried using some of the plugin commands like "update dependencies", but I still don't have a hibernate.cfg.xml file generated, which I think I should have, right?
我尝试使用一些插件命令,如“更新依赖项”,但我仍然没有生成hibernate.cfg.xml文件,我认为我应该拥有,对吧?
I changed the pom.xml and saved it, but I'm not sure what command exactly I'm supposed to execute exactly.
我更改了pom.xml并保存了它,但我不确定究竟应该执行什么命令。
m2eclipse should setup the new dependencies (and download it if necessary) after you changed the pom.xml without any required action. 在没有任何必要操作的情况下更改pom.xml之后,m2eclipse应该设置新的依赖项(并在必要时下载它)。
I tried using some of the plugin commands like "update dependencies", but I still don't have a hibernate.cfg.xml file generated, which I think I should have, right?
我尝试使用一些插件命令,如“更新依赖项”,但我仍然没有生成hibernate.cfg.xml文件,我认为我应该拥有,对吧?
No, the hibernate.cfg.xml
won't get automagically generated just because you changed a dependency (it is possible to generate an hibernate.cfg.xml
with the hibernate3-maven-plugin
but I don't think you are using it and it's really not easy to use). 不,
hibernate.cfg.xml
不会因为你改变了一个依赖项而自动生成(可以使用hibernate3-maven-plugin
生成一个hibernate.cfg.xml
,但我不认为你正在使用它它真的不容易使用)。
You need both dependencies: tapestry-core and tapestry-hibernate. 你需要两个依赖:tapestry-core和tapestry-hibernate。 On the other hand, tapestry-hibernate depencds on tapestry-core, so the latter is included automatically by Maven.
另一方面,tapestry-hibernate依赖于tapestry-core,因此后者由Maven自动包含。 tapestry-hibernate doesn't create a hibernate.cfg.xml for you.
tapestry-hibernate不会为你创建一个hibernate.cfg.xml。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.