注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

阿弥陀佛

街树飘影未见尘 潭月潜水了无声 般若观照心空静...

 
 
 

日志

 
 
关于我

一直从事气象预报、服务建模实践应用。 注重气象物理场、实况场、地理信息、本体知识库、分布式气象内容管理系统建立。 对Barnes客观分析, 小波,计算神经网络、信任传播、贝叶斯推理、专家系统、网络本体语言有一定体会。 一直使用Java、Delphi、Prolog、SQL编程。

网易考拉推荐
GACHA精选

NBDemoMaven71  

2012-04-03 17:54:21|  分类: Maven |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

NBDemoMaven71

Prep: make sure indices for local and Central repos are available. Run through all steps in advance so all dependencies are in local repo (makes things run faster and work better if network goes down), but delete ~/.m2/repository/org/duelengine/duel-runtime/0.6.0/duel-runtime-0.6.0-{sources,javadoc}.jar.

File > New Project > Maven. Explain that NB provides a few basic templates for empty projects, such as Web Application, but you can also work with many other technologies. Select Project from Archetype, click Next and expand Archetypes from Remote Repositories, select DUEL MVC Archetype (0.3.3), accept defaults on Name and Location panel, Finish.

Show Output Window where project is being created and soon opened. Will initially have some errors in Source Packages; click Build Project and show that Generated Sources (duel) appears, after which errors should disappear. RESTful Web Services should be shown too. Expand Dependencies and hover over nodes, showing tool tips; also right-click project root node and click Show Dependency Graph (zoom in a bit if needed), close.

Under the project's main source package, open AppContext.java in editor and get code completion on LinkInterceptor in import block. Should initially show no Javadoc, but click Attach Javadoc link and the docs should display. Ctrl-Click the class name in the editor and you will get "Showing generated source file"; click Attach Sources... and the editor should be replaced by the actual library source.

Add a line to the constructor (after the call to super):

   LogFactory.getLog(AppContext.class).info("started!"); 

"LogFactory" should be marked with an error line. Accept the first Alt-ENTER hint to "Search Dependency..." and pick commons-logging:commons-logging:1.1.1. Show the new node under Dependencies. Now accept the hint to "Add import..." and the error badges should clear. Note that Javadoc is now available on Log.info as well. Close editor.

Place caret on LogFactory, Edit > Find Usages. Besides the project usage just added, usages in the Maven repo are shown; expand commons-validator > commons-validator > 1.2.0 and double-click FormSetFactory to see examples of Commons Logging usage from another project.

File > Project Properties, select each panel in turn to show what can be customized from the GUI; Cancel. Under Project Files, open pom.xml. (Can show in Files tab that there are no NetBeans-specific files.) Pick a <dependency> and in the <version> field, press Ctrl-SPACE and show that available versions in the Maven repository are available. Also show Window > Other > Maven Repository Browser, click the Find button, enter "duel", show that similar information is available there. Going back to pom.xml, press Alt-INSERT and select Plugin; search on "html-to-pdf", pick org.apache.camel:maven-html-to-pdf:2.8.2, click OK; under <configuration>, delete placeholder text, type '<', and press Ctrl-SPACE to see a list of plugin parameters such as "styleSheets" with their documentation. Delete the new <plugin>.

Press F6 to run and select an app server to run the project with, e.g. GF 3.1. The web browser should open with the root URL of the app. Add "ping" to the URL and see that the response is "pong". Shut down Glassfish (Stop button in Output Window).

Open pom.xml and insert plugin; search on "jetty" and pick org.mortbay.jetty:maven-jetty-plugin:6.1.26. Under Project Properties > Actions, select Run Project; in Execute Goals, replace "package" with "jetty:run" (note that completion is offered for plugins with standard prefixes); clear text under Set Properties; click OK. Now press Run Project, wait for Output Window to say Jetty is ready, and open http://localhost:8080/ to see app deployment even without IDE support.


Companion
Projects:

MySQL - Open Source Database Server  GlassFish Community: an Open Source Application Server  Open JDK: an Open SourceJDK Hudson - Continuous Integration OpenOffice - The free and open productivity suite JavaFX Virtual Box - full virtualizer Sponsored by 
Sponsored by Oracle
  评论这张
 
阅读(912)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017