open-dm-mi
  1. open-dm-mi
  2. OPEN_DM_MI-340

Cannot build a Master Index Project once it has been checked into Subversion

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: midm
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      340

      Description

      Scenario:
      1. Create a typical Master Index Project using standard Person template
      2. Observe you can 'Clean and Build' successfully
      3. Do a 'Clean' (to delete build artifacts)
      4. Import (check in) project into a Subversion (SVN) repository (steps presented
      below on how to install a SVN VCS if necessary)
      5. At another disk location, check out the project from SVN.
      6. Open the project and try doing a 'Clean and Build'
      7. Observe the following error:
      <user home directory>\My
      Documents\NetBeansProjects\mytest\nbproject\build-impl.xml:131: Container
      error: com.sun.inti.container.ContainerException: Missing type deployment
      descriptor file
      8. Remove recursively all the .svn/ folders (created by SVN) by doing a Windows
      Search for .svn folders (remember to enable 'Search hidden files and folders' under
      Advanced options) and deleting
      9. Observe that Master Index project can now be 'Clean and Build' successfully

      SVN Notes:
      1. Download SVN server and client from
      http://www.collab.net/downloads/subversion/
      2. Follow configuration instruction on
      http://blogs.vertigosoftware.com/teamsystem/archive/2006/01/16/Setting_up_a_Su
      bversion_Server_under_Windows.aspx
      3. Install TortoiseSVN client from http://tortoisesvn.tigris.org/
      4. Import project into SVN by right-clicking over folder:
      a. Select TortoiseSVN -> Import...
      b. For URL of repository, enter "svn://<SVN install hostname>/<SVN project
      name>/trunk"
      5. To check out, similarly right-click | SVN Checkout ... and use same URL as in
      4b.
      6. Or if within SWAN, you can use mine at: svn://caps-soa-test (I'll need to create
      a new user for you though so send me email: Ed.Wong@Sun.COM)

        Activity

        Hide
        nathankopp added a comment -

        I can confirm this problem. It seems to be related to the existence of ".svn"
        files within the <Project>-ejb/src folders

        Show
        nathankopp added a comment - I can confirm this problem. It seems to be related to the existence of ".svn" files within the <Project>-ejb/src folders
        Hide
        gw194542 added a comment -

        I had to modify the "clean" code recently for another issue, so I thought I'd
        take a look. The code that is causing the problem in question is probably:

        File destDir = new File(mEjbdir, "src/java/com/sun/mdm/index/ejb");
        Delete delete = (Delete) getProject().createTask("delete");
        delete.setDir(destDir);
        delete.init();
        delete.setLocation(getLocation());
        delete.execute();

        String srcPath = mTemplateDir + File.separator + "repository"
        + File.separator + "ejb-source.zip";
        File srcFile = new File(srcPath);
        destDir = new File(mEjbdir, "src/java");
        Expand expand = (Expand) getProject().createTask("unzip");
        expand.init();
        expand.setSrc(srcFile);
        expand.setDest(destDir);
        expand.setLocation(getLocation());
        expand.execute();

        I suspect that the problem is that the "delete" step isn't working because it
        can't remove the .svn directories.

        I don't know Subversion, but is it possible to exclude the following
        directories, as the contents are simply replaced from the zip file each time you
        need to do a "clean" and therefore should not be under revision control:

        <EJBdir>/src/java/com/sun/mdm/index/ejb
        <EJBdir>/src/java/com/sun/mdm/index/ejb/codelookip
        <EJBdir>/src/java/com/sun/mdm/index/ejb/master
        <EJBdir>/src/java/com/sun/mdm/index/ejb/page
        <EJBdir>/src/java/com/sun/mdm/index/ejb/report
        <EJBdir>/src/java/com/sun/mdm/index/ejb/sequence

        You shouldn't need to modify these directly (if you want to, create a new
        package and classes that wrap these, rather than modifying the generated code).

        You can test this by removing the .svn from only these seven directories (rather
        than the complete project) and then trying a clean-and-build.

        As an aside, there is one other EJB source directory that is generated:

        <EJBdir>/src/java/com/sun/mdm/index/webservice

        Again, this shouldn't be modified, so it probably shouldn't be in the Subversion
        source control repository.

        Show
        gw194542 added a comment - I had to modify the "clean" code recently for another issue, so I thought I'd take a look. The code that is causing the problem in question is probably: File destDir = new File(mEjbdir, "src/java/com/sun/mdm/index/ejb"); Delete delete = (Delete) getProject().createTask("delete"); delete.setDir(destDir); delete.init(); delete.setLocation(getLocation()); delete.execute(); String srcPath = mTemplateDir + File.separator + "repository" + File.separator + "ejb-source.zip"; File srcFile = new File(srcPath); destDir = new File(mEjbdir, "src/java"); Expand expand = (Expand) getProject().createTask("unzip"); expand.init(); expand.setSrc(srcFile); expand.setDest(destDir); expand.setLocation(getLocation()); expand.execute(); I suspect that the problem is that the "delete" step isn't working because it can't remove the .svn directories. I don't know Subversion, but is it possible to exclude the following directories, as the contents are simply replaced from the zip file each time you need to do a "clean" and therefore should not be under revision control: <EJBdir>/src/java/com/sun/mdm/index/ejb <EJBdir>/src/java/com/sun/mdm/index/ejb/codelookip <EJBdir>/src/java/com/sun/mdm/index/ejb/master <EJBdir>/src/java/com/sun/mdm/index/ejb/page <EJBdir>/src/java/com/sun/mdm/index/ejb/report <EJBdir>/src/java/com/sun/mdm/index/ejb/sequence You shouldn't need to modify these directly (if you want to, create a new package and classes that wrap these, rather than modifying the generated code). You can test this by removing the .svn from only these seven directories (rather than the complete project) and then trying a clean-and-build. As an aside, there is one other EJB source directory that is generated: <EJBdir>/src/java/com/sun/mdm/index/webservice Again, this shouldn't be modified, so it probably shouldn't be in the Subversion source control repository.
        Hide
        bschroeder1978 added a comment -

        I was able to resolve this issue by removing the .svn folder from the
        src/StandardizationEngine folder, before calling the generate-mdm-index-files
        ant task.
        I believe that the generate-mdm-index-files task expects each subfolder in the
        src/StandardizationEngine folder to describe a Standardisation Type, which .svn
        does not and hence causes the task to fail.
        For now I have overriden the "gen-mdm-index-files" target to move the .svn
        folder to a temporary location before executig the generate-mdm-index-files
        task, and moving it back thereafter:
        <move todir="$

        {basedir}/tmpsvn"
        file="${basedir}

        /$

        {src.dir}/StandardizationEngine/.svn"
        preserveLastModified="true"/>
        <generate-mdm-index-files srcdir="${src.dir}

        " ejbdir="$

        {ejb.dir}

        "
        wardir="$

        {war.dir}

        " />
        <move todir="$

        {basedir}/${src.dir}/StandardizationEngine"
        file="${basedir}

        /tmpsvn/.svn" preserveLastModified="true"/>

        HTH

        Show
        bschroeder1978 added a comment - I was able to resolve this issue by removing the .svn folder from the src/StandardizationEngine folder, before calling the generate-mdm-index-files ant task. I believe that the generate-mdm-index-files task expects each subfolder in the src/StandardizationEngine folder to describe a Standardisation Type, which .svn does not and hence causes the task to fail. For now I have overriden the "gen-mdm-index-files" target to move the .svn folder to a temporary location before executig the generate-mdm-index-files task, and moving it back thereafter: <move todir="$ {basedir}/tmpsvn" file="${basedir} /$ {src.dir}/StandardizationEngine/.svn" preserveLastModified="true"/> <generate-mdm-index-files srcdir="${src.dir} " ejbdir="$ {ejb.dir} " wardir="$ {war.dir} " /> <move todir="$ {basedir}/${src.dir}/StandardizationEngine" file="${basedir} /tmpsvn/.svn" preserveLastModified="true"/> HTH

          People

          • Assignee:
            kevinkaoatsun
            Reporter:
            sunsoabi_edwong
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: