[jboss-user] [JBoss Seam] - Re: Seam and maven projects

esfahan do-not-reply at jboss.com
Mon Oct 23 16:43:03 EDT 2006


I am having my problems with maven build as well.  I started out with this wiki page: http://wiki.jboss.org/wiki/Wiki.jsp?page=MavenBuildCreation. Unfortunately, the repository http://repository.jboss.com/maven2 does seem not to be up to date. It would be great if the repository would be always updated with the latest jar files. Is there any move within JBoss to 'formalize' the publishing of new artifacts into the maven repository? 

I also found http://vyzivus.host.sk/maven2-seam.html and got finally an intial maven2 build up and running, but I am still not quite happy. The provided build examples (the JBoss ant build scripts as well the maven2 scripts under vyzivus.host.sk) seem to be to simplified. For example, as part of the build I would like to (re-)create the database schema and populte it with reference data. I used to do this with hbm2ddl which is part of hibernate tools. After a quite some searching I found a repository with containing this dependecny:

  | 		<dependency>
  | 			<groupId>org.hibernate</groupId>
  | 			<artifactId>hibernate-tools</artifactId>
  | 			<version>3.2.0.beta6</version>
  | 			<scope>compile</scope>
  | 		</dependency>
  | 

I tried then run hbm2dll using this plugin configuration:
 
  | 			<plugin>
  | 				<artifactId>maven-antrun-plugin</artifactId>
  | 				<executions>
  | 					<execution>
  | 						<id>hbm2ddl</id>
  | 						<phase>test-compile</phase>
  | 						<configuration>
  | 							<tasks>
  | 								<taskdef name="hibernatetool"
  | 									classname="org.hibernate.tool.ant.HibernateToolTask"
  | 									classpathref="maven.test.classpath" />
  | 								<hibernatetool>
  | 									<ejb3configuration />
  | 									<hbm2ddl drop="true" create="true"
  | 										export="true" outputfilename="doubleEspresso.ddl"
  | 										delimiter=";" destdir="target" format="true" />
  | 								</hibernatetool>
  | 							</tasks>
  | 						</configuration>
  | 						<goals>
  | 							<goal>run</goal>
  | 						</goals>
  | 					</execution>
  | 				</executions>
  | 			</plugin>
  | 

I keep getting error messages along the line:
> javax.naming.NamingException: Local server is not initialized

I started to trace the code and I believe that the problem is actually in the ant EJB3ConfigurationTask. Basically there is a problem with initialising the dataSource specified in persistence.xml (I can actually generate the schema if I specify plain JDBC properties in persistence.xml, but I really want to keep the data source). So far I haven't found a work around for the problem. 

I start wondering if Seam is really production ready. Yes the provided builds work, but for real life case I also need things like filtering, schema creation, dependency management... All these things seem quite unstable and under constant development.

What do other people think? Has anyone successfully used hibernate tools for schema generation with maven2? Does anyone have similar problems?

Cheers
Hardy Ferentschik
 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980199#3980199

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980199



More information about the jboss-user mailing list