0% found this document useful (0 votes)
26 views

Base Exercises-00 Intro

This document provides information about the tools and frameworks required for the CS544 exercises, including Java, MySQL, Python, Spring Tools Suite, JPA, Hibernate, Spring, and Maven. It outlines the directory structure used for Maven projects and provides an example pom.xml file that defines dependencies on JUnit, Hibernate, MySQL, and Log4j.

Uploaded by

oarrocha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Base Exercises-00 Intro

This document provides information about the tools and frameworks required for the CS544 exercises, including Java, MySQL, Python, Spring Tools Suite, JPA, Hibernate, Spring, and Maven. It outlines the directory structure used for Maven projects and provides an example pom.xml file that defines dependencies on JUnit, Hibernate, MySQL, and Log4j.

Uploaded by

oarrocha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CS544

Exercises

CS544 Exercises
April 2016

READ ME FIRST
For the lab projects we will use:
Tool

Version

Java JDK 8u74 or


later

URL
http://www.oracle.com/technetwork/java/javase/downloads/index.html

MySQL

Community http://dev.mysql.com/downloads/mysql/
Server
Python
5.7.x
https://www.python.org/downloads/

STS

3.7.3

https://spring.io/tools

JPA

2.1

Maven repository
GROUP ID: org.hibernate
hibernate-jpa-2.1-api 1.00.Final

Hibernate 5.1.0.Final Maven repository


GROUP ID: org.hibernate
hibernate-core
hibernate-entitymanager Use instead of core when using JPA
Spring

4.2.5

Maven repository
GROUP ID: org.springframework
spring-context
spring-core

5.1.37
MySql
JDBC
Connector

Maven repository
GROUP ID: mysql
mysql-connector-java

Required artifacts will be listed on the projects.

Maven:
All of the projects for this class will be based on Maven (http://maven.apache.org/).
Maven is a build automation tool (like Ant or Gradle) that helps organize a project and
its deployment.
Maven uses an XML file called pom.xml (Project Object Model), that describes how your
source code is built, and what dependencies (jar files/libraries) your project depends on.
It even download the dependencies for you.
Maven relies on convention: requires a predefine file structure for the project.
Directory name

Purpose

project home

Contains the pom.xml and all subdirectories.

src/main/java

Contains the deliverable Java sourcecode for the project.

src/main/resources

Contains the deliverable resources for the project, such


as property files.

src/main/filters

Resource filter files

src/main/config

Configuration files

src/main/scripts

Application/Library scripts

src/main/webapp

Web application sources

src/test/java

Contains the testing Java sourcecode (for example JUnit


or TestNG test cases)

src/test/resources

Contains resources necessary for testing

src/test/filters

Test resource filter files

src/assembly

Assembly descriptors

src/site

Site

Most IDEs come with Maven integration, you do not need to download it.

POM.XML Example
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>edu.mum.cs544</groupId>
<artifactId>exercise02_1</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

Basic project naming

<name>exercise02_1</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.1.0.Final</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.37</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
</dependencies>
</project>

Jar files that we


need for this project

You might also like