10 Replies Latest reply on Mar 18, 2009 1:08 AM by rob.stryker

    Archive tool destination

    jackxxwu

      i am just curious as where the archive destination should be. what i used to do was use the jboss server deploy directory as the destination. is it supposed to be that way? i also tested setting the destination under project and do publish to the server. apparently this server synchronization does not work well yet. sometimes my updates does not get refreshed under deploy. for example. if i do exploded archive and publish to jboss. then if i go to jboss deploy directory and delete some class files. i can't re-synchronize.

      -jack

        • 1. Re: Archive tool destination
          maxandersen

          Both scenarioes are supported and have each their usage.

          If you could find a way to reproduce your problem with re-synchronize in a tiny project we would love to hear so we can try and help out seeing if it is expected or a bug.

          • 2. Re: Archive tool destination
            jackxxwu

            there are couple of issues when i use project as archive destination and publish to jboss server. looks like the synchronization is not working well.

            case 1:
            1. build archive in exploded form, publish to server. start server, everything works well.
            2. changed a html file, and a javascript file in eclipse. save them.
            3. go to jboss server deploy directory, check if those files are synchronized.
            4. the file timestamps are changed, but not the content.
            5. the files under the project archive direct are not changed.
            notice in this case there are three copies of a file.

            in source --- in exploded war under project -- in exploded war under server deploy

            • 3. Re: Archive tool destination
              jackxxwu

              case 2:

              1. build archive in exploded form, publish to server. start server, everything works well.
              2. delete the war directory under server deploy
              3. go to archive view and publish

              in this case, the exploded war in the project is still there. eclipse should only copy its content into the jboss server deploy directory. instead the archive tool deletes the exploded war under the project and rebuild.

              • 4. Re: Archive tool destination
                maxandersen

                Please report in jira with sample projects/.packages files so we can make sure we reproduce the same as you.

                • 5. Re: Archive tool destination
                  rob.stryker

                  It rebuilds the archive because other users got annoyed, if they didn't have automatic building on, that they'd have to build their project, then rebuild the archive, then republish the archive,

                  It was requested that instead of this, republish should also rebuild.

                  And so it does.

                  • 6. Re: Archive tool destination
                    maxandersen

                    rob - that doesn't explain the missing update content does it ?

                    And is publish the same as republish ?

                    • 7. Re: Archive tool destination
                      jackxxwu

                      another problem.
                      i have build automatically enabled. every time when i start up eclipse, "updating archives model" kicks in. which is kind of weird. because if i already have the archive in place, you don't have to build it. right?

                      • 8. Re: Archive tool destination
                        jackxxwu

                        Rob, i thought the purpose of the archive plugin is to do incremental builds. i have no problem with publish triggering a incremental build. but deleting the entire archive? is that really necessary?

                        • 9. Re: Archive tool destination
                          rob.stryker

                          After re-reading this thread from scratch, I've got a few comments.

                          >>then if i go to jboss deploy directory and delete some class files. i can't re-synchronize.

                          Yes... this scenerio *will not* *ever* work. The archives model is updated by the builder, which passes in changed workspace resources since the last build. Deleting files from the deploy folder will not trigger any resource change events and the builder will not alert archives as to the changes. This is not a supported use case and I doubt it ever will be.


                          > 2. delete the war directory under server deploy
                          > 3. go to archive view and publish

                          Again, in this case, the workspace / archives is not aware of what's changed in the deploy folder. It's only aware of what changes in the workspace. Just as deleting class files from the deploy folder will not trigger resource change events, neither will deleting a project from the deploy folder.

                          Publish and republish are both incremental publishes. They're incremental from the point of the workspace and source files, *not* from the point of the server / destination folder or module.


                          >> "updating archives model" kicks in. which is kind of weird. because if i already have the archive in place, you don't have to build it. right?

                          The tools cannot verify whether the workspace has changed when you were outside of eclipse. For this reason, upon startup, unless "build automatically" is not enabled, the model will rebuild that jar.

                          The reason for this is fairly obvious. If, for example, you deleted the destination jar when eclipse was not loaded, and then you start eclipse, and change one or two files, only those one or two changed files will be in the jar. If build automatically is enabled, upon starting the workspace,

                          • 10. Re: Archive tool destination
                            rob.stryker

                            >5. the files under the project archive direct are not changed.

                            It's possible the project is not being refreshed... the changes have happened but on a File api and not an eclipse IResource api and the project needs to be f5'd before the changes are reflected.