Advertisement
Guest User

Untitled

a guest
Oct 11th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.28 KB | None | 0 0
  1. Index: pom.xml
  2. ===================================================================
  3. --- pom.xml (revision 164)
  4. +++ pom.xml (working copy)
  5. @@ -62,5 +62,123 @@
  6. <version>1.7.0</version>
  7. </dependency>
  8.  
  9. +
  10. </dependencies>
  11. + <build>
  12. + <plugins>
  13. + <plugin>
  14. + <groupId>org.codehaus.mojo</groupId>
  15. + <artifactId>sql-maven-plugin</artifactId>
  16. + <version>1.4</version>
  17. + <dependencies>
  18. + <dependency>
  19. + <groupId>postgresql</groupId>
  20. + <artifactId>postgresql</artifactId>
  21. + <version>9.0-801.jdbc4</version>
  22. + </dependency>
  23. + </dependencies>
  24. +
  25. + <configuration>
  26. + <driver>org.postgresql.Driver</driver>
  27. + <url>jdbc:postgresql://localhost:5432:arcops</url>
  28. + <username>postgres</username>
  29. + <password>novell</password>
  30. + <!-- You can comment out username/password configurations and
  31. + have maven to look them up in your settings.xml using ${settingsKey}
  32. + -->
  33. + <settingsKey>sensibleKey</settingsKey>
  34. + <!--all executions are ignored if -Dmaven.test.skip=true-->
  35. + <skip>${maven.test.skip}</skip>
  36. + </configuration>
  37. + <executions>
  38. + <execution>
  39. + <id>drop-db-before-test-if-any</id>
  40. + <phase>process-test-resources</phase>
  41. + <goals>
  42. + <goal>execute</goal>
  43. + </goals>
  44. + <configuration>
  45. + <!-- need another database to drop the targeted one -->
  46. + <url>jdbc:postgresql://localhost:5432:bootstrapdb</url>
  47. + <autocommit>true</autocommit>
  48. + <sqlCommand>drop database arcops</sqlCommand>
  49. + <!-- ignore error when database is not avaiable -->
  50. + <onError>continue</onError>
  51. + </configuration>
  52. + </execution>
  53. + <execution>
  54. + <id>create-db</id>
  55. + <phase>process-test-resources</phase>
  56. + <goals>
  57. + <goal>execute</goal>
  58. + </goals>
  59. + <configuration>
  60. + <url>jdbc:postgresql://localhost:5432:arcops</url>
  61. + <!-- no transaction -->
  62. + <autocommit>true</autocommit>
  63. + <sqlCommand>create database arcops</sqlCommand>
  64. + </configuration>
  65. + </execution>
  66. + <execution></execution>
  67. + </executions>
  68. + </plugin>
  69. + <plugin>
  70. + <groupId>org.codehaus.mojo</groupId>
  71. + <artifactId>hibernate3-maven-plugin</artifactId>
  72. + <version>2.2</version>
  73. + <dependencies>
  74. + <dependency>
  75. + <groupId>org.hibernate</groupId>
  76. + <artifactId>hibernate-entitymanager</artifactId>
  77. + <version>3.6.5.Final</version>
  78. + <exclusions>
  79. + <exclusion>
  80. + <groupId>cglib</groupId>
  81. + <artifactId>cglib</artifactId>
  82. + </exclusion>
  83. + <exclusion>
  84. + <groupId>commons-logging</groupId>
  85. + <artifactId>commons-logging</artifactId>
  86. + </exclusion>
  87. + </exclusions>
  88. + </dependency>
  89. + <dependency>
  90. + <groupId>org.hibernate</groupId>
  91. + <artifactId>hibernate-core</artifactId>
  92. + <version>3.6.5.Final</version>
  93. + <exclusions>
  94. + <exclusion>
  95. + <groupId>cglib</groupId>
  96. + <artifactId>cglib</artifactId>
  97. + </exclusion>
  98. + <exclusion>
  99. + <groupId>commons-logging</groupId>
  100. + <artifactId>commons-logging</artifactId>
  101. + </exclusion>
  102. + </exclusions>
  103. + </dependency>
  104. + </dependencies>
  105. + <executions>
  106. + <execution>
  107. + <phase>install</phase>
  108. + <goals>
  109. + <goal>hbm2ddl</goal>
  110. + </goals>
  111. + </execution>
  112. + </executions>
  113. + <configuration>
  114. + <hibernate>
  115. + <configurationFile>src/main/resources/ops.postgres.cfg.xml</configurationFile>
  116. + </hibernate>
  117. + <outputDirectory>
  118. + <hbm2dll>src/main/resources</hbm2dll>
  119. + </outputDirectory>
  120. + <outputFile>dbcreate.sql</outputFile>
  121. + <update>true</update>
  122. + <drop>true</drop>
  123. + <format>true</format>
  124. + </configuration>
  125. + </plugin>
  126. + </plugins>
  127. + </build>
  128. </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement