Wednesday, 29 May 2013

sql server maven dependency

sql server maven dependency

<dependency>
<groupId>com.microsoft.sqlserver</groupId>
  <artifactId>sqljdbc4</artifactId>
  <version>2.0</version>
</dependency>


<hibernate-configuration>
<session-factory>
  <property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
  <property name="hibernate.connection.url">jdbc:sqlserver://127.0.0.0;databaseName=glproc</property>
  <property name="hibernate.connection.username">sa</property>
  <property name="hibernate.connection.password"> </property>
  <property name="hibernate.connection.pool_size">10</property>
  <property name="show_sql">true</property>
 <property name="hibernate.hbm2ddl.auto">create</property>
  <property name="dialect">org.hibernate.dialect.SQLServer2008Dialect</property>
  <!-- Mapping files -->
  <mapping resource="hbm/cXX.hbm.xml"/>
</session-factory>
</hibernate-configuration>


mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> 
    -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
 
mvn install:install-file -Dfile=sqljdbc4.jar -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc4 -Dversion=3.0 -Dpackaging=jar



No comments:

Post a Comment