java集成开发环境常用操作集
1、简单搭建maven集成开发环境
一、 Jetty安装
下载地址(包涵windows和Linux各版本,Jetty9需要JDK7):http://download.eclipse.org/jetty/
Jetty安装非常简单,只需要解压安装包即可启动Jetty服务。
JETTY_VERSION=xxx wget http://download.eclipse.org/jetty/$JETTY_VERSION/dist/jetty-distribution-$JETTY_VERSION.tar.gz tarxfz jetty-distribution-$JETTY_VERSION.tar.gz cd jetty-distribution-$JETTY_VERSION java-jar start.jar
Jetty的简单测试(我们用Jetty8):

test.war模块里面有一个dump的Servlet,它可以查看当前请求的Request/Session/Cookie信息。http://c909511:8080/dump/info这里面返回信息非常丰富,后续可以使用此方法调试当前请求信息:

二、 Jetty与Eclipse集成
1、 下载Eclipse工具:
http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/SR1/eclipse-jee-luna-SR1-win32-x86_64.zip
2、 安装Jetty组件


3、 配置Jetty


4、 配置完成后启动Jetty服务

三、Maven与Eclipse集成
1、 下载Maven工具http://maven.apache.org/download.html
2、 安装Maven Integration for Eclipse插件

3、 安装Maven;
a) 解压Maven到本地目录,设置环境变量;
i. MAVEN_HOME为:D:/tools/apache-maven-3.2.1,将bin设置到PATH,在PATH末尾添加:;%MAVEN_HOME%/bin;
ii. 测试MAVEN是否设置成功,在Windows终端输入:mvn –v

b) 设置Maven本地仓库
i. 在D:\tools\apache-maven-3.2.1\conf\settings.xml文件中修改localRepository节点值为D:\study\maven\jar,制定本地仓库地址;

ii. 配置本地仓库nexus(可选)
Nexus下载地址:http://download.sonatype.com/nexus/oss/nexus-2.5.1-bundle.zip
安装Nexus只需解压配置即可运行
配置Nexus服务

启动Nexus服务(如果运行提示拒绝访问,右键-》管理员身份运行)

登陆Nexus

配置Nexus中心仓库

Nexus+Maven配置

<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<name>Nexus Mirror</name>
<url>http://maven.oschina.net/content/groups/public</url>
</mirror> </mirrors> <profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>nexus</id>
<name>Nexus</name>
<url>http://localhost:8082/nexus/content/groups/public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>Nexus</name>
<url>http://localhost:8082/nexus/content/groups/public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles> <!-- activeProfiles
| List of profiles that are active for all builds.
|
<activeProfiles>
<activeProfile>alwaysActiveProfile</activeProfile>
<activeProfile>anotherAlwaysActiveProfile</activeProfile>
</activeProfiles>
-->
<!--激活配置-->
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
4、 eclipse配置Maven;
a) 设置Maven的Installations

b) 设置Maven的User Settings

5、 导入项目工程
a) 在Myeclipse中选择import…依次导入项目工程;

b) 设置启动各个工程的Maven构建

c) 完成环境搭建,启动看效果

--------开发环境准备完毕end------------------------------
2、maven常用操作
a、引入项目中的jar包(使用这种方式引入的JAR包在打包时不会一起打包,所以打包后找不到该JAR包)
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>0.3</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/test.jar</systemPath>
</dependency>
打包引用包处理方法
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>0.3</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/test.jar</systemPath>
</dependency>
java集成开发环境常用操作集的更多相关文章
- JetBrains IntelliJ IDEA 2019 for Mac(Java集成开发环境) 2019.3.1
IntelliJ IDEA 2019中文激活版已全新上线,intellij idea mac是目前编程人员最喜欢的Java集成开发环境,具备智能代码助手.代码自动提示.重构.J2EE支持.Ant.JU ...
- 【JAVA零基础入门系列】Day2 Java集成开发环境IDEA
开发环境搭建好之后,还需要一个集成开发环境也就是IDE来进行编程.这里推荐的IDE是IDEA,那个老掉牙的Eclipse还是先放一边吧,(手动滑稽). IDEA的下载地址:http://www.jet ...
- Java 集成开发环境的介绍及下载
集成开发环境(integrated development environment,JDE) 之前成功运行了Java小程序是经历了先在笔记本中编写源代码,然后通过命令行运行打开javac编译源文件, ...
- Java集成开发环境IDEA
一,安装 1,从http://www.jetbrains.com/idea/download/下载最新的community(free)版本. 2,解压文件 3,进入解压目录下的bin目录 4,执行id ...
- 第一记 搭建Java集成开发环境
一.JDK JDK可以前往oracle官网进行下载并进行安装(我这边使用的是jdk1.8版本,也推荐使用jdk1.8及以上的) 下图是默认路径安装完成后的截图 安装完成会产生这两个文件夹 二.配置环境 ...
- Java集成开发环境--Eclipse for J2EE配置JRE运行环境
.d1 { border-style: none } .d2 { border-style: solid } .d3 { border-style: dotted } .d4 { border-sty ...
- Java - 集成开发环境Eclipse的使用方法和技巧
00 - Eclipse教程 Eclipse 教程 01 - Eclipse设置编译和运行的环境 建议编译和运行的版本保持一致,否则请特别注意: 低编译,高运行 ---> 可行. 高编译,低运行 ...
- Eclipse简明使用教程(java集成开发环境)
说明:我使用的是绿色便携版的Eclipse,免安装,解压就能用.链接:https://download.csdn.net/download/loongstyle/10700321 1_Eclipse中 ...
- mac下开发环境常用操作与命令
[1] 修改hosts文件 vim /private/etc/hosts
随机推荐
- find . -mtime +1 查找文件
N * 24+1 内表示 1 * 24 +24小时以外..+0 才表示 0 * 24 +24小时以外1 表示 1*24 + 24 到 24 之间..0 表示 0*24 + 24 到 0 之间..-1 ...
- What is required for a successful backup of all files during hoi backup?
There is a typo in the body of this question. It should be "Hot" instead of "hoi" ...
- JAVA逐行读取TXT文件
package help; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; imp ...
- MAVEN 配置阿里巴巴镜像
配置 修改maven根目录下的conf文件夹中的setting.xml文件,内容如下: <mirrors> <mirror> <id>alimaven</id ...
- java中Token验证
什么是Token:它是一个令牌,随机不可预测的. 为什么需要使用Token: 1,防止表单的重复提交 2:,防止跨站点的请求伪造 Token的使用流程是:首先在服务器端生成一个随机的token值并在服 ...
- VP9 Video Codec
http://www.webmproject.org/vp9/ WebM Repositories libvpx: VP8/VP9 Codec SDK pull http://git.chromi ...
- windows Visual Studio 2017 编译 HEVC cmake-3.8.1-win64-x64.msi 下载
ttps://github.com/OpenHEVC/openHEVC 下载一 直接下载源码(可选)或下载源码包,我这里下载的是源码 打开 Visual Studio () 去 github 找到源码 ...
- eclipse中使用mybatis-generator逆向代码生成工具问题解决记录
问题一: eclipse中使用mybatis-generator逆向代码生成工具出现waiting for "building workspace" 解决办法: 选择菜单栏的 ...
- java程序main方法的参数String[] args
public class ArgsTest { public static void main(String[] args) { System.out.println(args.length); fo ...
- 文字溢出显示省略号,兼容ie9以上浏览器
最近遇上一个问题,文字溢出展示省略号在ie上不管用,经过查找,是少了word-wrap: normal;这个css属性 width:100px; overflow: hidden; white-spa ...