Arquivo

Posts Tagged ‘maven’

Adding DB2 jdbc drivers to a Maven Java project

You need to get the DB2 drivers, in my case db2jcc.jar and db2jcc_license_cu.jar, then, drop it to a folder at your file system, also, in my case I created a folder /opt/driveDB2 and drop the 2 files there.

Then, run the mvn install command, like in my examples (pay attention in your Version):

mvn install:install-file -Dfile=/opt/driveDB2/db2jcc.jar -DgroupId=com.ibm.db2.jcc -DartifactId=db2jcc4 -Dversion=10.1 -Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true

mvn install:install-file -Dfile=/opt/driveDB2/db2jcc_license_cu.jar -DgroupId=com.ibm.db2 -DartifactId=db2jcc_license_cu -Dversion=10.1 -Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true

At your project, just add the following lines to the pom.xml file:

<dependency>
    <groupId>com.ibm.db2.jcc</groupId>
    <artifactId>db2jcc4</artifactId>
    <version>10.1</version>
</dependency>

<dependency>
    <groupId>com.ibm.db2</groupId>
    <artifactId>db2jcc_license_cu</artifactId>
    <version>10.1</version>
</dependency>

Voa lá!

Categorias:DB2 / Banco de dados, JAVA Tags:, ,

Tutorial de Spring

Galera, encontrei um tutorial de Spring fantástico na Internet: http://maestric.com/doc/java/spring

Vale a pena dar uma olhada, tanto para quem vai aprender quanto para os já iniciados, pois existe uma parte na qual o autor fala sobre injeção de dependência, e isso não é um conhecimento muito comum entre os “javeiros” de plantão.

Para quem está interessado em Maven e Spring, um ótimo post é este http://blog.springsource.com/2011/01/17/green-beans-getting-started-with-maven-and-spring/.

E finalmente, um ótimo post sobre Spring MVC: http://blog.springsource.com/2011/01/04/green-beans-getting-started-with-spring-mvc/.

Enjoy!