[英]To create Java project with Spring persistence using Maven?
Is it good idea to create Java project with Spring persistence using Maven? 使用Maven使用Spring持久性创建Java项目是个好主意吗?
What maven archetype to use? 使用哪种Maven原型? AppFuse is seemed to be freezed.
AppFuse似乎被冻结。
The principle of a Maven archetype is to create a skeleton of an application based on some specificities (for example the usage of Spring
in your case). Maven原型的原理是基于某些特殊性(例如,在您的情况下使用
Spring
)创建应用程序的框架。
This skeleton will generate the root pom.xml
, the basic directories structure ( src/main/resources
, src/main/java
, and so on), as well as some other files, which are specific to the archetype used, such as the applicationContext.xml
in the Spring case. 该框架将生成根
pom.xml
,基本目录结构( src/main/resources
, src/main/java
等),以及一些其他特定于所用原型的文件,例如在Spring案例中为applicationContext.xml
。
Of course, this is only a skeleton (which is however generally runnable to get some Hello World
stuff), so you will have to adapt it to your precise requirements: change the pom.xml
content (for example the versions of third libraries), add or remove some configuration files... 当然,这只是一个框架(不过通常可以运行以获取一些
Hello World
东西),因此您将不得不对其进行调整以适应您的确切要求:更改pom.xml
内容(例如,第三个库的版本),添加或删除一些配置文件...
Maybe you can give a try to any AppFuse archetype (what do you mean by freezed by the way?), and then remove everything that is not needed in your case. 也许您可以尝试使用任何AppFuse原型(顺便说一句冻结是什么意思?),然后删除您的案例中不需要的所有内容。
您可以使用Spring ROO创建基于Maven的Spring项目。
If you r using Netbeans 6.8 then follow below one 如果您使用Netbeans 6.8,请遵循以下一项
New Project->Maven->Maven PRoject->Default Archetype Catalog-> A simple J2EE Java application 新建项目-> Maven-> Maven PRoject->默认原型目录->一个简单的J2EE Java应用程序
Remove Other unused modules and modify it as per ur requirement... 删除其他未使用的模块,然后根据您的要求进行修改...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.