Dashboard > SpringSide3 Wiki > ... > Developer Quickstart > make archetype
  SpringSide3 Wiki Log In | Sign Up   View a printable version of the current page.  
  make archetype
Added by Calvin, last edited by Calvin on 2008-10-28  (view change)
Labels: 
(None)

0.一次过的修改

  • 改archetype根目录的pom.xml文件的artifact-id 和name,如service-archetype
  • 删archetype src\main\resources\META-INF\maven\archetype.xml

1.删除多余源码

   mini-service 和 mini-web的target, WEB-INF/classes ,  /lib, WEB-INF/lib , mini-service的 soap-ui 和client,wsdl 目录

2. 生成archetype

将parent的pom.xml 改名pom-parent.xml,放入mini-service/mini-web的根目录里

mvn archetype:create-from-project -DpackageName=org.springside.examples.miniservice
mvn archetype:create-from-project -DpackageName=org.springside.examples.miniweb

检查packageName 是否正确,否则尝试mvn clean先。

3.复制archetype

         删除以前的archetype的archetype-resources目录并复制新的archetype-resources

         复制archetype-metadata.xml

4.手工修改列表:

total:

  • archetype-metadata.xml恢复archetype-descriptor的name属性,.setting处的filter=true
  • 制作pom-parent.xml:  修改为${groupId},${artifactId}-parent,${version}
  • 修改pom.xml, <name>与<final-name>.处也改为${artifactId}
  • 修改pom.xml,修正parent的artifactId为${artifactId}-parent, groupid为${groupId} version 为 version,路径为pom-parent.xml
  • 修改.setting/org.eclipse.wst.common.compontnt, 两处需改为${artifactId}

mini-service:
archetype-metadata.xml 增加namespace变量,修改ws/Contants.java,binding.xml 使用该变量
  <requiredProperties>
        <requiredProperty key="webservice-namespace"/>
  </requiredProperties>

public static final String NS = "${webservice-namespace}";

*build-client.bat,build.xml  修改 ${artifactId}

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 2006-09-07) - Bug/feature request - Contact Administrators