• play framework系列之maven 构建


    一,文章内容

    1,Play framwwork 的好处就是构建java 项目简单快速。经过下边几步即可完成。

    play new testSimpleMvn

    选择2 java 项目即可。

    然后进入到 testSimpleMvn 目录, play eclipse, 这样项目就支持eclipse 导入了。

    然后我们知道play 集成了数据库Ebean 组件。直接使用即可,不用复杂的配置,一个高效的框架就这样搭建了。

    2, 但是了,如果遇到团队开发,那就需要mvn 的支持了。

    在testsimpleMvn 项目中我已经引入了pom文件, 这里大致罗列一下。 后边附有下载地址。

    <modelVersion>4.0.0</modelVersion>
    	<packaging>war</packaging>
    
    	<name>testSimpleMvn</name>
    	<groupId>testSimpleMvn</groupId>
    	<artifactId>testSimpleMvn</artifactId>
    	<version>0.0.1-SNAPSHOT</version>
    
    	<build>
    		<plugins>
    			<plugin>
    				<groupId>org.mortbay.jetty</groupId>
    				<artifactId>maven-jetty-plugin</artifactId>
    				<version>6.1.7</version>
    				<configuration>
    					<connectors>
    						<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
    							<port>8888</port>
    							<maxIdleTime>30000</maxIdleTime>
    						</connector>
    					</connectors>
    					<webAppSourceDirectory>${project.build.directory}/${pom.artifactId}-${pom.version}</webAppSourceDirectory>
    					<contextPath>/</contextPath>
    				</configuration>
    			</plugin>
    		</plugins>
    		<defaultGoal>compile</defaultGoal>
    	</build>
    	<dependencies>
    		<dependency>
    			<groupId>com.typesafe.play</groupId>
    			<artifactId>play_2.10</artifactId>
    			<version>2.4.0-M2</version>
    		</dependency>
    		<dependency>
    			<groupId>junit</groupId>
    			<artifactId>junit</artifactId>
    			<version>3.8.1</version>
    			<scope>test</scope>
    		</dependency>
    		<dependency>
    			<groupId>mysql</groupId>
    			<artifactId>mysql-connector-java</artifactId>
    			<version>5.1.18</version>
    		</dependency>
    		<dependency>
    			<groupId>aopalliance</groupId>
    			<artifactId>aopalliance</artifactId>
    			<version>1.0</version>
    		</dependency>
    		<dependency>
    			<groupId>asm</groupId>
    			<artifactId>asm</artifactId>
    			<version>3.1</version>
    		</dependency>
    		<dependency>
    			<groupId>ch.qos.logback</groupId>
    			<artifactId>logback-classic</artifactId>
    			<version>1.0.13</version>
    		</dependency>
    		<dependency>
    			<groupId>ch.qos.logback</groupId>
    			<artifactId>logback-core</artifactId>
    			<version>1.0.13</version>
    		</dependency>
    		<dependency>
    			<groupId>com.fasterxml</groupId>
    			<artifactId>classmate</artifactId>
    			<version>0.8.0</version>
    		</dependency>
    <dependency>
    	<groupId>com.fasterxml.jackson.core</groupId>
    	<artifactId>jackson-core</artifactId>
    	<version>2.2.2</version>
    </dependency>
    <dependency>
    	<groupId>com.fasterxml.jackson.core</groupId>
    	<artifactId>jackson-annotations</artifactId>
    	<version>2.2.2</version>
    </dependency>
    <dependency>
    	<groupId>com.fasterxml.jackson.core</groupId>
    	<artifactId>jackson-databind</artifactId>
    	<version>2.2.2</version>
    </dependency>
    <dependency>
    	<groupId>com.github.scala-incubator.io</groupId>
    	<artifactId>scala-io-core_2.10</artifactId>
    	<version>0.4.2</version>
    </dependency>
    <dependency>
    	<groupId>com.github.scala-incubator.io</groupId>
    	<artifactId>scala-io-file_2.10</artifactId>
    	<version>0.4.2</version>
    </dependency>
    <dependency>
    	<groupId>com.google.code.findbugs</groupId>
    	<artifactId>jsr305</artifactId>
    	<version>2.0.1</version>
    </dependency>
    

    下载地址:

    下载

  • 相关阅读:
    利用STM32播放音乐
    在MDK中使用$Sub$$和$Super$$的记录
    printf函数输出格式控制记录
    I2C软件实现
    C语言单项链表
    CreateEvent函数使用记录
    C语言宏定义使用记录
    GIT推送本地数据到远程空仓库
    2020-ECCV-Local Correlation Consistency for Knowledge Distillation阅读笔记
    2020-ECCV-Feature Normalized Knowledge Distillation for Image Classfication阅读笔记
  • 原文地址:https://www.cnblogs.com/csharponworking/p/4464267.html
Copyright © 2020-2023  润新知