Ce contenu n'est pas disponible dans la langue sélectionnée.
3.2. Publish or Unpublish a Resource
3.2.1. Publish or Unpublish a Resource
3.2.2. Publish a Resource
Procedure 3.1. Publish files to a repository
Open ModeShape Publishing Wizard.
- Right-click one or more projects, folders, or files in your Eclipse workspace to view the context menu for those files. The Context menu now includes asubmenu that allows you to publish or unpublish the resources to your ModeShape repository.
Figure 3.4. ModeShape context submenu
Note
When only one resource is selected you can also view the locations where that resource has been published. The published locations of a resource can be viewed by right-clicking an individual resource and navigating the ModeShape context submenu to the Show Published Locations option. - Selectto open the ModeShape Publishing Wizard.
Figure 3.5. ModeShape publishing wizard
Choose ModeShape repository
The publishing wizard allows you to choose which ModeShape Java Content Repositories (JCR) type repository to interact with and displays the selected files the operation will be performed on. When a project or folder is selected, all their included files are acted upon.Choose Publish Area.
Publishing to a Publish Area will automatically sequence your files to extract useful information and make it available to our repository users. Extracted information depends upon the type of file and the configuration of the ModeShape repository. The location where files will be published is constructed by appending the server URL, the names of the JCR repository and workspace, the path to the publish area, and the path of the files and folders within your Eclipse workspace.Version the published files.
As ModeShape now allows for the versioning of published files, you will notice a checkbox labelled Version the published files (change default in your preferences). If you have selected to allow file versioning in your ModeShape preferences, then this checkbox will be checked automatically.If your server instance does not permit the versioning of files, regardless of the settings you choose in the Preferences dialog for ModeShape, the checkbox labelled Version the published files (change default in your preferences) will be inactive.Publish the files.
Choose any other options as appropriate and then select Finish to publish the files.
Warning
When a file is published, a blue arrow will appear next to the file in the tree view.
3.2.3. Unpublish a Resource
Procedure 3.2. Unpublish files to a repository
View the context menu.
To unpublish the files, right-click one or more projects, folders, or files in your Eclipse workspace to view the context menu for those files. The Context menu includes a ModeShape submenu that allows you to unpublish the resources to your ModeShape repository.Unpublish the files.
Selectto unpublish the files.
Warning
- If you are interacting with a multi-user repository, the version of the file you are unpublishing may have been updated by someone else after you.
- It is important to be sure that a file is no longer necessary when unpublishing, as the file in question will be deleted from the repository with this operation.
When a file is unpublished, the blue arrow next to the file in the tree view will be removed.
3.2.4. Viewing, Publishing or Unpublishing Output in Console View
- the repository where the operation took place,
- how long the operation took,
- the outcome for each file included in the operation,
- a hyperlink that allows you to open the file in an Eclipse editor, and
- a ModeShape repository workspace URL.
![Console output](https://access.redhat.com/webassets/avalon/d/Red_Hat_JBoss_Data_Virtualization-6.4-User_Guide_Volume_2_Modeshape_Tools-en-US/images/2207cacf69c26f165cb546a8743862d0/1470.png)
Figure 3.6. Console output