You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Christine <ch...@christine.nl> on 2009/09/03 13:58:58 UTC
Hibernate
I am trying to turn an existing app into a portlet. The app uses
Hibernate. I have added the jars to the class path manually because I
coulnd't figure out how to make maven incorporate them in the project
properly. What I now need to do is put the Hibernate config files into
the project. They are in my Eclipse, but when building and deploying the
project to Tomcat, these files aren't copied. Where in which pom file do
I need to add what line to have maven copy the files? I am not used to
using maven, nor am I particularly fond of it :-|
Thanks in advance.
Christine
--
dagdag is just a two-character rotation of byebye.
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: Hibernate
Posted by Christine <ch...@christine.nl>.
David Dyer wrote:
> I remember feeling that way about maven myself, it does get better as
> you get used to it.
I have used it in a project with others who were very good at it, and I
saw the advantages of using maven in a larger project. It's just one
more learning curve :-)
>
> The issue is most likely in the build section of the pom file. Where
> in the project structure are your hbm files and what does the build in
> the pom look like?
I use Hibernate and JPA. There's a hibernate.cfg.xml in the
{projectdir}/src directory and there's a persistence.xml in
{projectdir}/etc/META-INF. I suppose that as long as these are on the
classpath, I should be ok.
Thisis the pom file in my root dir, in which there are a -pa and a
-portal directory, each with their own pom file as generated by the
jetspeed mvn install script.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<prerequisites>
<maven>2.0.9</maven>
</prerequisites>
<groupId>org.bidnetwork</groupId>
<artifactId>bid</artifactId>
<name>bid portal project</name>
<version>1.0.0</version>
<packaging>pom</packaging>
<properties>
<org.apache.portals.jetspeed.version>2.2.0</org.apache.portals.jetspeed.version>
<org.apache.pluto.version>2.0.0</org.apache.pluto.version>
<org.apache.portals.applications.apa-logging.version>1.0</org.apache.portals.applications.apa-logging.version>
<ccpp.version>1.0</ccpp.version>
<org.apache.portals.bridges.common.version>1.0.4</org.apache.portals.bridges.common.version>
<servlet-api.version>2.4</servlet-api.version>
<portals.portlet2-api-spec.version>1.0</portals.portlet2-api-spec.version>
<javax.servlet.jstl.version>1.2</javax.servlet.jstl.version>
<portal.context.name>bid</portal.context.name>
<org.apache.jetspeed.server.home>/opt/apache-tomcat-5.5.27/</org.apache.jetspeed.server.home>
</properties>
<repositories>
<repository>
<id>bluesunrise</id>
<name>BlueSunrise Maven 2 Repository</name>
<url>http://bluesunrise.com/maven2</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.portals</groupId>
<artifactId>portlet-api_2.0_spec</artifactId>
<version>${portals.portlet2-api-spec.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Provided Dependencies -->
<dependency>
<groupId>org.apache.portals</groupId>
<artifactId>portlet-api_2.0_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Hibernate
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.6.ga</version>
</dependency>
-->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>3.0.0.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>ejb3-persistence</artifactId>
<version>1.0.2.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.4.0.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>3.3.0.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search</artifactId>
<version>3.1.0.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-tools</artifactId>
<version>3.2.3.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.4.0.GA</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<!-- Compiler -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<debug>true</debug>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<optimize>false</optimize>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.portals.jetspeed-2</groupId>
<artifactId>jetspeed-mvn-maven-plugin</artifactId>
<version>${org.apache.portals.jetspeed.version}</version>
<configuration>
<targets combine.children="append">
<target>
<id>install-pa</id>
<dir>@rootdir@/bid-pa</dir>
<goals>clean,install</goals>
</target>
<target>
<id>install-portal</id>
<dir>@rootdir@/bid-portal</dir>
<goals>clean,install</goals>
</target>
<target>
<id>install</id>
<depends>install-portal,install-pa</depends>
</target>
<target>
<id>db-portal</id>
<depends>install-portal</depends>
<name>portal</name>
<dir>@rootdir@/bid-portal</dir>
<profiles>db</profiles>
</target>
<target>
<id>db</id>
<depends>db-portal</depends>
</target>
<target>
<id>deploy-pa</id>
<depends>install-pa</depends>
<name>pa</name>
<dir>@rootdir@/bid-pa</dir>
<profiles>deploy</profiles>
</target>
<target>
<id>deploy-portal</id>
<depends>install</depends>
<name>portal</name>
<dir>@rootdir@/bid-portal</dir>
<profiles>deploy</profiles>
</target>
<target>
<id>portal-seed</id>
<depends>install-portal</depends>
<name>portal</name>
<dir>@rootdir@/bid-portal</dir>
<profiles>seed</profiles>
<properties>
<seed.file>j2-seed.xml</seed.file>
</properties>
</target>
<target>
<id>portal-seed-dbpsml</id>
<depends>install-portal</depends>
<name>portal</name>
<dir>@rootdir@/bid-portal</dir>
<profiles>seed-dbpsml</profiles>
</target>
<target>
<id>deploy-portal-dbpsml</id>
<depends>install-portal</depends>
<name>portal</name>
<dir>@rootdir@/bid-portal</dir>
<profiles>deploy-dbpsml</profiles>
</target>
<target>
<id>all</id>
<depends>install,db,deploy-portal,deploy-pa</depends>
</target>
</targets>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- ensure jetspeed:mvn plugin is installed automatically when
executing for the first time -->
<plugin>
<groupId>org.apache.portals.jetspeed-2</groupId>
<artifactId>jetspeed-mvn-maven-plugin</artifactId>
<version>${org.apache.portals.jetspeed.version}</version>
</plugin>
</plugins>
</build>
<modules>
<module>bid-portal</module>
<module>bid-pa</module>
</modules>
</project>
dagdag
Christine
>
> David Dyer
>
>
>
> Christine wrote:
>>
>> I am trying to turn an existing app into a portlet. The app uses
>> Hibernate. I have added the jars to the class path manually because I
>> coulnd't figure out how to make maven incorporate them in the project
>> properly. What I now need to do is put the Hibernate config files
>> into the project. They are in my Eclipse, but when building and
>> deploying the project to Tomcat, these files aren't copied. Where in
>> which pom file do I need to add what line to have maven copy the
>> files? I am not used to using maven, nor am I particularly fond of it
>> :-|
>> Thanks in advance.
>>
>> Christine
>>
>> ------------------------------------------------------------------------
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database:
>> 270.13.76/2342 - Release Date: 09/02/09 18:03:00
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
--
dagdag is just a two-character rotation of byebye.
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: Hibernate
Posted by David Dyer <dd...@artifact-software.com>.
I remember feeling that way about maven myself, it does get better as
you get used to it.
The issue is most likely in the build section of the pom file. Where in
the project structure are your hbm files and what does the build in the
pom look like?
David Dyer
Christine wrote:
>
> I am trying to turn an existing app into a portlet. The app uses
> Hibernate. I have added the jars to the class path manually because I
> coulnd't figure out how to make maven incorporate them in the project
> properly. What I now need to do is put the Hibernate config files into
> the project. They are in my Eclipse, but when building and deploying
> the project to Tomcat, these files aren't copied. Where in which pom
> file do I need to add what line to have maven copy the files? I am not
> used to using maven, nor am I particularly fond of it :-|
> Thanks in advance.
>
> Christine
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.409 / Virus Database: 270.13.76/2342 - Release Date: 09/02/09 18:03:00
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org