Is it possible to create one .war file with postbyte libraries (hibernate) 8.4 and 9.0?

We have used maven dependencies to define libraries so far, i.e.:

<dependency>
  <groupId>org.hibernate</groupId>
  <artifactId>hibernate-core</artifactId>
  <version>3.6.10.Final</version>
</dependency>
<dependency>
  <groupId>org.hibernate</groupId>
  <artifactId>hibernate-c3p0</artifactId>
  <version>3.6.10.Final</version>
  <type>jar</type>
  <scope>compile</scope>
</dependency>
<dependency>
  <groupId>postgresql</groupId>
  <artifactId>postgresql</artifactId>
  <version>8.4-702.jdbc4</version>
</dependency>

However, now we run the same .war file on different machines and would like to keep the same file One-war-file-to-rule-them-all, but do not want to remove the problems using the older driver when installing postgres 9.1 (especially when, for example, the default values ​​for a byte array have changed). Cliff-Claven is information that probably doesn't matter, but is added anyway: the OS for both of these installations is Mac OS X Server, and Postgres 8.4 is 10.6, 9.1 is 10.7. We do not need to update the data (individual instances start from scratch).

, maven, - , . , Hibernate 3.5, .

+5
3

PostgreSQL JDBC , .

http://jdbc.postgresql.org/download.html#current :

. ( JVM), . Postgresql 7.2 1.4 JVM.

PostgreSQL JDBC, , . JDBC .

, JDBC , , JDBC .

+5

, . . /:

  • , , , (tomcat ..)
  • , .
  • , - JNDI .
  • One-war-file-to-rule-them-all, , .

, - , .

+3

, , jdbc lib , . , provided.

You can define build profiles in your pom with different dependency versions, but for this you will need to call the assembly twice and result in two different war files.

+1
source

All Articles