3 Replies Latest reply on Sep 1, 2010 6:27 AM by Max Rydahl Andersen

    Project Archives "ModuleIDPropertyKey"

    Flavio Costa Newbie

      Hey,

       

      I'm wondering what is the meaning of this property: "org.jboss.ide.eclipse.as.core.packages.ModuleIDPropertyKey".

      Is there any problem having multiple projects with the same value for this property?

       

      You might say "this value is automagically generated, you shouldn't have to worry about that"

      But I do have to worry, because, at work, I have sort of a "template" project that already have Project Archive artifacts "configured" and when I need to start a new project I simply copy the template to a new location, doing some string substitution here and there. So, eventually, I end up with two (or more) projects that have veeery similar .packages (so similar that "org.jboss.ide.eclipse.as.core.packages.ModuleIDPropertyKey" is equals)

       

      I must add that I often have all this projects opened inside Eclipse and the "Building workspace" task takes too much time to complete due to Project Archives. Can this be releated to the fact that I have multiple artifacts with the same ModuleIDPropertyKey?

       

      I guess that is it.

        • 1. Re: Project Archives "ModuleIDPropertyKey"
          Rob Stryker Master

          If you're just using project archives standard, and not mixing use of project archives with the server's view, then you should be 100% fine. This ID is the module id for each archive. This is so when you deploy a module, it can remember which module you're deploying.

           

          Admittedly using an id like projectName:outputPath could have worked, but then any time hte package was changed, I'd have to refactor the id, or if the project was renamed, I'd have to refactor the id, and all of these things would lead to problems, specifically that if you had already deployed a project archives via the server's view, the OLD module would no longer be found (since hte module factory only has the new id) and, well, this is what we have now

           

          So if you're mixing use with the server's view to deploy your project archives, you should definitely have different id's for each archive                        

          • 2. Re: Project Archives "ModuleIDPropertyKey"
            Flavio Costa Newbie

            Thanks Rob, that was a good explanation!

             

            I'm indeed mixing Project Archives with the Server View and sometimes I do experience "problems" when undeploying an artifact.

            When I remove any Project Archive artifact from any server I usually have to manually undeploy the artifact (by accessing the folder and deleting it), so that was not a bug, it was actually a "work-as-expected".

             

            I'll spend some time to code some clever shell script to re-randomize all my ModuleIDPropertyKey.

             

            Again, thanks a lot!

            • 3. Re: Project Archives "ModuleIDPropertyKey"
              Max Rydahl Andersen Master

              Rob, haven't we fixed this yet ?

               

              The id should just be set to be the workspace path of the .archive file location if the ID is not specifically set (to work with existing ones).

               

              WTP servers seem to handles renames of modules fine, why cant we ?