简体   繁体   中英

Maven and pom.xml

I'm using m2eclipse and trying to learn some tapestry. I'm trying to update my project to pull some different resources from maven. (Or at least, I think that's what I'm trying to do).

Here's part of my 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. I changed the pom.xml and saved it, but I'm not sure what command exactly I'm supposed to execute exactly. 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?

I changed the pom.xml and saved it, but I'm not sure what command exactly I'm supposed to execute exactly.

m2eclipse should setup the new dependencies (and download it if necessary) after you changed the pom.xml without any required action.

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?

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).

You need both dependencies: tapestry-core and tapestry-hibernate. On the other hand, tapestry-hibernate depencds on tapestry-core, so the latter is included automatically by Maven. tapestry-hibernate doesn't create a hibernate.cfg.xml for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM