Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>musicstore</groupId>
- <artifactId>MVCMusicStore</artifactId>
- <packaging>war</packaging>
- <version>1.0</version>
- <name>MVCMusicStore Maven Webapp</name>
- <url>http://maven.apache.org</url>
- <repositories>
- <repository>
- <id>java.net2</id>
- <name>Repository hosting the jee6 artifacts</name>
- <url>http://download.java.net/maven/2</url>
- </repository>
- <repository>
- <url>http://ftp.ing.umu.se/mirror/eclipse/rt/eclipselink/maven.repo</url>
- <id>eclipselink</id>
- <layout>default</layout>
- <name>Repository for library Library[eclipselink]</name>
- </repository>
- <repository>
- <id>jboss-public-repository-group</id>
- <name>Jboss Public Maven Repository Group</name>
- <url>https://repository.jboss.org/nexus/content/groups/public</url>
- </repository>
- <repository>
- <id>java.net.glassfish</id>
- <name>Repository hosting the jee6 artifacts</name>
- <url>http://download.java.net/maven/glassfish</url>
- </repository>
- <repository>
- <id>mesir-repo</id>
- <name>Repository hosting the oracle ojdbc14.jar</name>
- <url>http://mesir.googlecode.com/svn/trunk/mavenrepo</url>
- </repository>
- <repository>
- <id>maven2-repository.dev.java.net</id>
- <name>Java.net Repository for Maven</name>
- <url>http://download.java.net/maven/2/</url>
- <layout>default</layout>
- </repository>
- </repositories>
- <dependencies>
- <!-- <dependency> -->
- <!-- <groupId>junit</groupId> -->
- <!-- <artifactId>junit</artifactId> -->
- <!-- <version>3.8.1</version> -->
- <!-- <scope>test</scope> -->
- <!-- </dependency> -->
- <!-- Prepare for Spring framework -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-webmvc</artifactId>
- <version>4.3.0.RELEASE</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>4.3.0.RELEASE</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-tx</artifactId>
- <version>4.3.0.RELEASE</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-orm</artifactId>
- <version>4.3.0.RELEASE</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>4.3.0.RELEASE</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-jdbc</artifactId>
- <version>4.3.0.RELEASE</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <version>4.3.0.RELEASE</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework.security</groupId>
- <artifactId>spring-security-core</artifactId>
- <version>4.1.0.RELEASE</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework.security</groupId>
- <artifactId>spring-security-config</artifactId>
- <version>4.1.0.RELEASE</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework.security</groupId>
- <artifactId>spring-security-web</artifactId>
- <version>4.1.0.RELEASE</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <!-- Prepare for Hibernate -->
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
- <version>3.5.4-Final</version>
- <type>pom</type>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>ejb3-persistence</artifactId>
- <version>1.0.2.GA</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-entitymanager</artifactId>
- <version>5.1.0.Final</version>
- </dependency>
- <dependency>
- <groupId>commons-dbcp</groupId>
- <artifactId>commons-dbcp</artifactId>
- <version>1.4</version>
- </dependency>
- <!-- prepare for database connection - Oracle - SQL - MySQL -->
- <!-- <dependency> -->
- <!-- <groupId>ojdbc</groupId> -->
- <!-- <artifactId>ojdbc</artifactId> -->
- <!-- <version>14</version> -->
- <!-- </dependency> -->
- <!-- <dependency> -->
- <!-- <groupId>javax.sql</groupId> -->
- <!-- <artifactId>jdbc-stdext</artifactId> -->
- <!-- <version>2.0</version> -->
- <!-- </dependency> -->
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>6.0.2</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- </dependency>
- <!-- prepare for Spring framwork -->
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>jsr250-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.2</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.12</version>
- <scope>test</scope>
- </dependency>
- <!-- AOP dependence -->
- <dependency>
- <groupId>aopalliance</groupId>
- <artifactId>aopalliance</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjweaver</artifactId>
- <version>1.8.9</version>
- </dependency>
- <dependency>
- <groupId>cglib</groupId>
- <artifactId>cglib</artifactId>
- <version>3.2.3</version>
- </dependency>
- <!-- Prepare for Spring Rest -->
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <version>1.10.19</version>
- </dependency>
- <!-- Prepare for log system -->
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.17</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <!-- This dependence is for Jsp configuration -->
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-core-asl</artifactId>
- <version>1.9.13</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>jstl</groupId>
- <artifactId>jstl</artifactId>
- <version>1.2</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>taglibs</groupId>
- <artifactId>standard</artifactId>
- <version>1.1.2</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- </dependencies>
- <build>
- <finalName>MVCMusicStore</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
- <configuration>
- <source>1.7</source>
- <target>1.7</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>maven-jetty-plugin</artifactId>
- <version>6.1.10</version>
- <configuration>
- <argLine>-javaagent D:/spring-agent.jar</argLine>
- <scanIntervalSeconds>10</scanIntervalSeconds>
- <stopKey>foo</stopKey>
- <stopPort>9999</stopPort>
- </configuration>
- <executions>
- <execution>
- <id>start-jetty</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <argLine>-javaagent D:/spring-agent.jar</argLine>
- <scanIntervalSeconds>0</scanIntervalSeconds>
- <daemon>true</daemon>
- </configuration>
- </execution>
- <execution>
- <id>stop-jetty</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- Use @Component annotation for bean definitions -->
- <context:component-scan base-package="com.MVCMusicStore" />
- <!-- @Controller annotaitons for MVC controller definitions -->
- <mvc:annotation-driven />
- <!--Add JPA support -->
- <bean id="emf"
- class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
- <property name="persistenceUnitName" value="MVCMusicStorePU" />
- <property name="jpaDialect" ref="jpaDialect" />
- <property name="jpaVendorAdapter" ref="jpaAdapter" />
- </bean>
- <bean id="jpaDialect" class="org.springframework.orm.jpa.vendor.HibernateJpaDialect"
- lazy-init="true" />
- <bean id="jpaAdapter"
- class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"
- lazy-init="true">
- <property name="databasePlatform" value="org.hibernate.dialect.MySQLInnoDBDialect" />
- <property name="database" value="MYSQL" />
- <property name="showSql" value="false" />
- </bean>
- <bean
- class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"
- lazy-init="true" />
- <!-- Add Transaction support -->
- <bean id="myTxManager" class="org.springframework.orm.jpa.JpaTransactionManager">
- <property name="entityManagerFactory" ref="emf" />
- </bean>
- <!-- Use @Transaction annotation for managing transactions -->
- <tx:annotation-driven transaction-manager="myTxManager"
- proxy-target-class="true" />
- <!-- Declare a view resolver -->
- <bean id="viewResolever"
- class="org.springframework.web.servlet.view.InternalResourceViewResolver"
- p:prefix="/WEB-INF/jsp/" p:suffix=".jsp" />
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- For MySQL -->
- <properties>
- <property name="hibernate.connection.username" value="root" />
- <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
- <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
- <property name="hibernate.connection.password" value="" />
- <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/springMusic" />
- <property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider" />
- <property name="show_sql" value="true"/>
- </properties>
- </persistence-unit>
- log4j:WARN Please initialize the log4j system properly.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement