maven的helloworld

http://wiki.caucho.com/Maven2
resin的应用

myeclipse9带的maven功能不全,至少import没有引入工程的选项
转http://www.fengfly.com/plus/view-191022-1.html
删除maven再添加http://m2eclipse.sonatype.org/sites/m2e

详细的看maven权威指南吧
源码:http://ishare.iask.sina.com.cn/f/12675822.htm
http://xly1981.iteye.com/blog/828934
这里是摘抄
环境变量设置M2_HOME=maven的安装目录,设置$M2_HOME/bin到path
mvn -v看版本
在~/.m2/下需要有个settings文件设置源,下载的jar可以指定目录
helloworld:
mvn archetype:create -DgroupId=com.hao.huawei.test1 -DartifactId=simple -DpackageName=com.hao.huawei

tree /F
卷 win7 的文件夹 PATH 列表
卷序列号为 000C-38A8
C:.
└─simple
│ pom.xml
│
└─src
├─main
│ └─java
│ └─com
│ └─hao
│ └─huawei
│ App.java
│
└─test
└─java
└─com
└─hao
└─huawei
AppTest.java

注意:这里依赖了junit的包
cd simple 到包含pom.xml的里面
mvn install
或mvn install -x 详细信息
或mvn install assembly:assembly
配合
<project>
[...]
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
[...]
</project>
把依赖包打到一起(估计eucalytpus1.6.2那个ext的包就是这么把hibernate的破包等打到一起的)
这个命令完成后不仅编译了,Maven会把我们项目的构件安装到本地仓库,去C:\Users\dean\.m2\repository看一下,多了com.hao.huawei.test1.simple
tree /F
卷 win7 的文件夹 PATH 列表
卷序列号为 000C-38A8
C:.
│ pom.xml
│
├─src
│ ├─main
│ │ └─java
│ │ └─com
│ │ └─hao
│ │ └─huawei
│ │ App.java
│ │
│ └─test
│ └─java
│ └─com
│ └─hao
│ └─huawei
│ AppTest.java
│
└─target
│ simple-1.0-SNAPSHOT.jar
│
├─classes
│ └─com
│ └─hao
│ └─huawei
│ App.class
│
├─maven-archiver
│ pom.properties
│
├─surefire-reports
│ com.hao.huawei.AppTest.txt
│ TEST-com.hao.huawei.AppTest.xml
│
└─test-classes
└─com
└─hao
└─huawei
AppTest.class

java -cp target/simple-1.0-SNAPSHOT.jar com.hao.huawei.App
mvn test
或mvn test -Dmaven.test.failure.ignore=true 忽略测试
或mvn install -Dmaven.test.skip=true 跳过测试
运行单元测试(注意:这里自动帮你引了包)

mvn help:effective-pom 得到详细的pom信息

概念:
一个Maven插件是一个单个或者多个目标的集合

站点生成和报告:
mvn site

mvn dependency:resolve
mvn dependency:tree
查看项目依赖

---------------------------web的helloworld-----------------------

mvn archetype:create -DgroupId=com.hao.huawei.test3 -DartifactId=simple-app -DpackageName=com.hao.huawei -DarchetypeArtifactId=maven-archetype-webapp

tree /F
卷 win7 的文件夹 PATH 列表
卷序列号为 000C-38A8
C:.
│ pom.xml
│
└─src
└─main
├─resources
└─webapp
│ index.jsp
│
└─WEB-INF
web.xml

修改pom.xml
<build>
<finalName>simple-app</finalName>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
</plugin>
</plugins>
</build>

mvn jetty:run 运行jetty(resin是否也能这样用)
http://localhost:8080/simple-app/
tree /F
卷 win7 的文件夹 PATH 列表
卷序列号为 000C-38A8
:.
│ pom.xml
│
├─src
│ └─main
│ ├─resources
│ └─webapp
│ │ index.jsp
│ │
│ └─WEB-INF
│ web.xml
│
└─target
├─classes
└─work
└─jsp
└─org
└─apache
└─jsp
index_jsp.class
YOLOv5源码逐行超详细注释与解读(2)——推理部分detect.py 全网最详细的YOLOv5之推理部分detect.py源码逐行注释,近四万字的超详细讲解!小白入门必看! 阅读详情

相关推荐

基于STM32F4通用定时器实现Livox激光雷达PPS硬件同步的工程实践

本文详细介绍了基于STM32F4通用定时器实现Livox激光雷达PPS硬件同步的工程实践。通过分析PPS信号的时序要求,对比不同定时器的特性,并提供完整的代码实现与调试技巧,帮助开发者解决多传感器数据融合中的时间同步问题。实测表明,该方案在车载环境中稳定运行超过2000小时。

weixin_30540691的博客 325

maven入门之helloworld

概述: 搭建maven环境【linux-windows】 使用maven创建java工程运行helloworld 一、搭建maven环境二、创建maven项目并运行 在Windows下进入cmd mvn archetype:generate -DgroupId=com.scidata.helloworld -DartifactId=helloworld -Dpackage=com.scid

yjq_java的专栏 1318

Java 简易版 UDP 多人聊天室

【代码】Java 简易版 UDP 多人聊天室。

nmy15570188135的博客 1187

Maven| HelloWorld

编译第一个helloworld项目 Maven坐标详解 <modelVersion>4.0.0</modelVersion> <groupId>com.juvenxu.mvnbook</groupId> <artifactId>hello-world</artifactId> <version>1.0-SNAPSHOT</version> <name>Maven Hello Wo

YvesHe的专栏 714

用示波器抓一次MIPI D-PHY的波形,手把手教你读懂HS模式和LP模式的切换时序

本文详细解析了MIPI D-PHY信号的双模切换机制,包括高速模式(HS)和低功耗模式(LP)的波形捕获与诊断技巧。通过示波器设置、关键状态分析和实战案例,帮助工程师快速定位信号完整性问题,提升调试效率。

weixin_30696427的博客 457

微软Media Creation Tool 创建工具 1.3 升级:支持全新下载安装Win11 22H2 Build 22621.525

微软 Media Creation Tool 创建工具 1.3 升级:支持全新下载安装 Win11 22H2 Build 22621.525 ISO 镜像,如果今天运行使用 Media Creation Tool,则会下载 Windows 11 2022 版本 Build 22621.525,它不会向操作系统添加任何新内容,但会修复安装问题,下面来看看详细的更新内容。

zym0218的博客 4231

使用idea创建maven项目HelloWorld

1、maven普通项目 开发环境:idea 2020.1.1,jdk 1.8,maven3.6.0(jdk安装教程)(idea2020.1.1安装教程) (maven的安装配置) 1.1、创建项目 选择maven–>next 设置项目名称和存放路径 第一次创建maven项目的话可能会让你选择maven的配置 第一次创建会比较慢,需要下载依赖,等待出现这个即可 4.2、代码编写 创建包 创建helloworld.java package com.mystery.demo; public cl

qq_43430759的博客 3027

SSE 传输过程中,丢失空格和回车符,怎么解决?

Server - Sent Events(SSE)即服务器发送事件,是 HTML5 中的一项 Web API,用于实现服务器向客户端浏览器推送实时数据的功能。

934

Maven HelloWorld 项目学习

HelloWorldpublic class HelloWorld { public String sayHello() { return "hello wolrd! I'm RoBY"; } public static void main(String[] args) { System.out.println(new HelloWorld

知行天下 727

DJI O2协议物理层逆向工程解析:揭开无人机通信的神秘面纱

DJI的O2协议是其OcuSync传输技术的最新演进,应用于Mini 2、Mavic Air 2、Mavic Air 2s和Mavic 3等无人机模型。这种协议结合了多种先进无线通信技术,能够在远距离提供稳定可靠的低延迟连接。O2协议物理层(PHY)是OSI模型的最底层,负责在物理媒介上传输原始数据比特流。它定义了电气特性、调制方式、编码方案、数据传输速率和同步机制等。DJI O2协议的物理层逆向工程是一个复杂但极具价值的领域。

QQ_778132974的博客 2389

AI学习指南RAG篇(19)-API调用与集成

通过上述API调用示例,您可以方便地将RAGFlow与其他系统集成,实现数据集管理、文档处理、会话管理等功能。希望本文的介绍能帮助您更好地理解和使用RAGFlow的API。

俞兆鹏的博客 2546

MAVEN的HelloWorld实现过程

MAVEN的HelloWorld实现过程modelVersion POM 模型版本4.0.0固定 groupId:一般指某个公司或者某个组织的某个项目 org.springframework artifactId:一般指某个具体项目的某个具体模块,比如spring-context Version:项目的版本 Maven常见命令 mvn compile

Su*yWGAtH26Q 567

【项目实战】功能安全目标有四个ASIL等级:A、B、C、D,ASIL D是最高的等级

功能安全是一种关注产品在异常情况下如何避免造成伤害的概念功能安全在汽车电子行业中非常重要。功能安全涉及到系统、电子和软件三个部分。(1)系统部分主要涉及概念设计(2)而具体的实施则是在电子和软件部分完成。

奶爸的编程之路,也就一周冷个三天 2828

在IntelliJ IDEA上使用Maven创建Spring项目HelloWorld

因为IDEA自带Maven插件,所以使用IDEA是不需要在下载Maven的文件的,也可使用自己下载的Maven。Spring我们则是通过Maven来下载构建,所以不需要下载jar包的。 大神勿喷,请自行绕道,本博客面向第一次接触spring的小白。刚学习Spring ,请赐教。 开始搭建第一个项目并使用Spring的bean实现HelloWorld在控制台的输出 1.点击File---New

IT业的爬虫的博客 2万+

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

Maven 3 入门 -- HelloWorld

第一个Maven项目 -- HelloWorld 这里只是通过一个简单例子来初探maven的面目,具体介绍参考后文 创建约定的目录结构 Maven的源代码目录组织结构是固定的,我们不能随便修改,一个简单的java程序目录结构如下 项目名 --------------src                           ----------------------------

云智禅师的专栏 494

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

Maven(二)Maven的第一个HelloWorld

1. Maven的第一个HelloWorld 1.1 Maven与MyEclipse的整合 1.2 构建Maven的JaveSE项目 选择骨架 定义坐标 SNAPSHOT 测试版 RELEASE 稳定版 1.3约定的项目结构 需要增加JDK1.7的支持 注意:前提是当前环境安装了JDK1.7 &lt;plugin&gt;        &l...

weixin_37908713的博客 222

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

HelloWorld of Maven(Maven环境搭建案例)

HelloWorld of Maven(Maven环境搭建案例) 背景 :#JAVA #Maven #Mac **Step1**: download #Maven from http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip

Rocky_Zhang1993的博客 516

Maven+SpringMVC整合之helloworld

一、废话 算是一个入门的例子,虽然难度不大,但对于我这种刚接触Maven和SpringMVC的菜鸟来讲还是费了点时间。貌似网上很多教程都是关于在Eclipse下搭建的,不过像我这样的屌丝还是坚持我的Myeclipse之旅吧。Eclipse神马的,=日后再说吧。废话不多说,切入主题。 二、项目搭建流程 都是流程上的东西,记住便可了。下面步骤没有非常细化,自认为比较重要 Step1: S

TechBirds在路上 1万+

使用maven模版创建和管理java helloworld 项目

在上文中(https://blog.youkuaiyun.com/solinger/article/details/100935057),我们没有使用模版,而直接使用maven对helloworld项目进行了管理和构建。 本文中,我们将使用maven模版达到我们的目标。 [wlin@wlin ~]$ mvn archetype:generate -DgroupId=com.example.cara -D...

5911

[maven学习笔记]第一节,认识maven,搭建maven开发环境,写第一个HelloWorld

maven是一个项目依赖构建系统,通过使用maven,可以有效的管理项目的引用中jar文件等依赖信息,可以方便的对项目进行移植等操作。是一个目前比较流行的项目研发使用框架,该文实现了maven命令行创建项目和使用myeclipse创建maven项目的HelloWorld工程。

苏生-苏米沿的专栏 1万+

Maven helloworld

以HelloWorld为例: 代码路劲:  D:\NewTechnique\hello-world   --src      --main --java --com\juvenxu\mvnbook\helloworld --HelloWorld.java package com.juvenxu.mvnbook.helloword; public class HelloWo

weibkreuz的专栏 520

Maven之HelloWorld

Maven项目结构根据上图创建Maven项目新建MavenProject01的maven项目,如下图 上图已经把maven的项目结构建立完成,我们来写点代码吧 在src/main/java下新建package com.zzq.maven.mode 建立HelloWorld类如下package com.zzq.maven.model; public class HelloWorld{

强强强子的博客 1287

03-Eclipse中maven的helloWorld

配置Eclipse中Maven的settings文件位置 然后next 然后会自动创建一个HelloWorld的实例。 在pom.xml文件上面右击执行maven的命令即可。

高调做事,低调做人! 1284

Maven安装与Maven HelloWorld入门实例

本文主要讲了Maven的安装过程,以及一些基础的概念。并用两个例子讲解了Maven在java项目中的使用。

Evankaka的专栏 7242

Maven HelloWorld(未完成)

Maven HelloWorld

iteye_7017的博客 118
上一篇: acer ubuntu11.04
下一篇: 转发-百度搜索研发部门官方博客-日志分析方法概述-hadoop
linux内核控
博客等级 码龄19年 41粉丝 638原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值