2013-03-13 34 views
0

最近我参与了一个项目的维护。
该项目非常陈旧,构建过程全部需要IBM RAD。
我们必须从头开始重建整个项目,但同时我们必须保留这个旧的项目。
我想转移到CI系统,并使用像Maven或Gradle(首选)这样的软件自动化构建过程。
问题是这个项目正在使用一些IBM库来处理EJB(一个我知之甚少的领域),并且我有一个完整的类,它们不在SVN并从RAD(所有存根类)自动生成。
存根的目的是什么?
看到这个之后,我不太确定是否有可能自动化构建过程,是否有人有这方面的经验?RAD的自动生成的EJB存根,它们是否有必要?

对不起,由于缺乏细节,我不知道我可以添加哪些更详细的内容,以及需要更多内容。

回答

1

我们必须使用EJB 2.0 RAD开发了一套系统,部署到WebSphere 6.1服务器

如果您有类似的建立你也许能够复制我们所用的结构。

我们使用maven作为构建工具,使用以下插件;

  1. 行家-EJB-插件
  2. WAS6-行家-插件
  3. 了XDoclet行家-插件

我们使用配置文件,以活性短截线的产生,当任何的接口改变时,和xdoclet来注释包括websphere特定绑定的bean类以生成ejb-jar.xml和其他ibm部署文件。

花了几个星期才能让它工作,我们有一个使用hudson-ci的自动构建,所以可能需要玩弄pom和插件的设置以适应您的项目。

我们的pom.xml样本;

<groupId>your.group.id</groupId> 
<artifactId>your.artifact.id</artifactId> 
<packaging>ejb</packaging> 

<build> 
    <plugins> 
     <plugin> 
      <artifactId>maven-ejb-plugin</artifactId> 
      <configuration> 
       <ejbVersion>2.0</ejbVersion> 
       <generateClient>true</generateClient> 
       <clientIncludes> 
        <clientInclude>**/interface/**</clientInclude> 
       </clientIncludes> 
      </configuration> 
     </plugin> 
    </plugins> 
</build> 

<profiles> 
    <profile> 
     <id>xdoclet</id> 
     <activation> 
      <property> 
       <name>xdoclet</name> 
      </property> 
     </activation> 
     <build> 
      <plugins> 
       <plugin> 
        <groupId>org.codehaus.mojo</groupId> 
        <artifactId>xdoclet-maven-plugin</artifactId> 
        <executions> 
         <execution> 
          <phase>generate-sources</phase> 
          <goals> 
           <goal>xdoclet</goal> 
          </goals> 
          <configuration> 
           <tasks> 
            <ejbdoclet 
             destDir="${project.build.sourceDirectory}" 
             force="true" ejbSpec="2.0" 
             verbose="true"> 
             <fileset 
              dir="${project.build.sourceDirectory}"> 
              <include name="**/*Bean.java" /> 
             </fileset> 
             <packageSubstitution 
              packages="service" useFirst="true" 
              substituteWith="interface" /> 
             <homeinterface /> 
             <remoteinterface /> 
             <deploymentdescriptor 
              displayname="Service Name" 
              description="" 
              destDir="${basedir}/src/main/resources/META-INF" 
              validateXML="true" useIds="true" /> 
             <websphere 
              destDir="${basedir}/src/main/resources/META-INF" 
              validateXML="true" /> 
            </ejbdoclet> 
           </tasks> 
          </configuration> 
          </execution> 
       </executions> 
       </plugin> 
    </profile> 

    <profile> 
     <id>was-ejb</id> 
     <activation> 
      <property> 
       <name>was-ejb</name> 
      </property> 
     </activation> 
     <build> 
      <plugins> 
       <plugin> 
        <groupId>org.codehaus.mojo</groupId> 
        <artifactId>was6-maven-plugin</artifactId> 
        <executions> 
         <execution> 
          <goals> 
           <goal>ejbdeploy</goal> 
          </goals> 
         </execution> 
        </executions> 
        <configuration> 
         <wasHome>C:/Program Files/IBM/WebSphere/AppServer</wasHome> 
        </configuration> 
       </plugin> 

      </plugins> 
    </profile> 

</profiles> 
相关问题