Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 0eb38fab by Tony Chemit at 2023-05-25T15:20:20+02:00 Add new action to replace referential usages only in data - Closes #2702 - - - - - d81054c9 by Tony Chemit at 2023-05-31T09:41:28+02:00 fix some vulnerabilities in transitive dependencies tidy pom update pom fix some compile dependencies - - - - - ccc5dd1f by Tony Chemit at 2023-05-31T09:41:28+02:00 Assistant sauvegarde qui ne zippe pas les bases - Closes #2709 - - - - - 26 changed files: - client/core/src/main/java/fr/ird/observe/client/datasource/api/ObserveSwingDataSource.java - client/datasource/actions/pom.xml - client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/save/actions/Start.java - client/datasource/editor/api/pom.xml - client/datasource/editor/api/src/main/i18n/getters/java.getter - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/ObserveKeyStrokesEditorApi.java - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUI.jaxx - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUIHandler.java - + client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/actions/ReplaceReferentialUsages.java - + client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/usage/UsageForReplaceUI.jaxx - + client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/usage/UsageForReplaceUIHandler.java - client/datasource/editor/common/pom.xml - client/datasource/editor/ll/pom.xml - client/datasource/editor/pom.xml - client/datasource/editor/ps/pom.xml - client/runner/pom.xml - client/runner/src/main/i18n/translations/client-runner_en_GB.properties - client/runner/src/main/i18n/translations/client-runner_es_ES.properties - client/runner/src/main/i18n/translations/client-runner_fr_FR.properties - core/api/validation/pom.xml - core/persistence/avdth/pom.xml - core/services/pom.xml - model/pom.xml - observe/pom.xml - pom.xml - server/runner/pom.xml Changes: ===================================== client/core/src/main/java/fr/ird/observe/client/datasource/api/ObserveSwingDataSource.java ===================================== @@ -509,7 +509,7 @@ public class ObserveSwingDataSource extends AbstractJavaBean implements ObserveS Files.deleteIfExists(dst); CreateDatabaseRequest request = CreateDatabaseRequest.builder(false, config.getModelVersion()).addGeneratedSchema().addStandaloneTables().addAllData().build(); SqlScript dataDump = getDataSourceService().produceCreateSqlScript(request); - dataDump.copy(dst); + dataDump.copyAndCompress(dst); } catch (Exception e) { throw new ObserveSwingTechnicalException(e); } ===================================== client/datasource/actions/pom.xml ===================================== @@ -160,6 +160,10 @@ <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-api</artifactId> </dependency> + <dependency> + <groupId>org.swinglabs</groupId> + <artifactId>jxlayer</artifactId> + </dependency> <dependency> <groupId>org.swinglabs.swingx</groupId> <artifactId>swingx-core</artifactId> ===================================== client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/save/actions/Start.java ===================================== @@ -90,7 +90,7 @@ public class Start extends SaveLocalUIActionSupport { DataSourceService dumpService = source.getDataSourceService(); CreateDatabaseRequest request = CreateDatabaseRequest.builder(false, source.getVersion()).addGeneratedSchema().addStandaloneTables().addAllData().build(); SqlScript dump = dumpService.produceCreateSqlScript(request); - dump.copy(backupFile.toPath()); + dump.copyAndCompress(backupFile.toPath()); } if (stepModel.containsStepForSave(AdminStep.SYNCHRONIZE)) { ===================================== client/datasource/editor/api/pom.xml ===================================== @@ -168,6 +168,10 @@ <groupId>org.geotools</groupId> <artifactId>gt-main</artifactId> </dependency> + <dependency> + <groupId>org.geotools</groupId> + <artifactId>gt-metadata</artifactId> + </dependency> <dependency> <groupId>org.geotools</groupId> <artifactId>gt-opengis</artifactId> ===================================== client/datasource/editor/api/src/main/i18n/getters/java.getter ===================================== @@ -84,6 +84,9 @@ observe.referential.Referential.action.delete.tip observe.referential.Referential.action.detail observe.referential.Referential.action.modify observe.referential.Referential.action.openType +observe.referential.Referential.action.replaceUsages +observe.referential.Referential.action.replaceUsages.no.data.usage +observe.referential.Referential.action.replaceUsages.tip observe.referential.Referential.action.show.usages.tip observe.referential.Referential.code observe.referential.Referential.disabled @@ -282,11 +285,13 @@ observe.ui.message.quit.valid.edit observe.ui.message.show.referential.usages observe.ui.message.show.usage.referential.delete observe.ui.message.show.usage.referential.disabled +observe.ui.message.show.usage.referential.replace observe.ui.message.table.editBean.modified observe.ui.message.table.editBean.modified.but.invalid observe.ui.move.selectTarget observe.ui.title.can.not.delete.referential observe.ui.title.can.not.export.obstuna +observe.ui.title.can.not.replace.referential observe.ui.title.choose.avdth.file observe.ui.title.choose.db.dump observe.ui.title.choose.db.dump.directory ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/ObserveKeyStrokesEditorApi.java ===================================== @@ -101,7 +101,8 @@ public class ObserveKeyStrokesEditorApi extends ObserveKeyStrokesSupport { public static final KeyStroke KEY_STROKE_CHANGE_ID = KeyStroke.getKeyStroke("pressed F7"); public static final KeyStroke KEY_STROKE_SHOW_TECHNICAL_INFORMATION = KeyStroke.getKeyStroke("pressed F10"); - public static final KeyStroke KEY_STROKE_SHOW_USAGES = KeyStroke.getKeyStroke("pressed F8"); + public static final KeyStroke KEY_STROKE_REPLACE_REFERENTIAL = KeyStroke.getKeyStroke("pressed F8"); + public static final KeyStroke KEY_STROKE_SHOW_USAGES = KeyStroke.getKeyStroke("pressed F9"); public static final KeyStroke KEY_STROKE_SHOW_UNIQUE_KEYS = KeyStroke.getKeyStroke("pressed F9"); public static final KeyStroke KEY_STROKE_SELECT_TARGET = KeyStroke.getKeyStroke("pressed F2"); ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUI.jaxx ===================================== @@ -19,43 +19,43 @@ --> <fr.ird.observe.client.datasource.editor.api.content.ContentUI - abstract='true' - beanScope="bean" - i18n="fr.ird.observe.dto.referential.ReferentialDto" - genericType='D extends ReferentialDto, R extends ReferentialDtoReference, U extends ContentReferentialUI<D, R, U>' - implements="fr.ird.observe.client.datasource.editor.api.content.EditableContentUI<D>"> - <import> - fr.ird.observe.dto.referential.ReferentialDto - fr.ird.observe.dto.reference.ReferentialDtoReference - fr.ird.observe.dto.referential.ReferenceStatus - fr.ird.observe.client.util.UIHelper - fr.ird.observe.client.util.ObserveBlockingLayerUI - fr.ird.observe.client.datasource.validation.ObserveSwingValidator - - org.nuiton.jaxx.widgets.text.NormalTextEditor - org.nuiton.jaxx.validator.swing.SwingValidator - io.ultreia.java4all.jaxx.widgets.choice.BeanCheckBox - io.ultreia.java4all.jaxx.widgets.combobox.BeanEnumEditor - - io.ultreia.java4all.jaxx.widgets.list.ListHeader - - javax.swing.DefaultListModel - javax.swing.ListSelectionModel - javax.swing.JTable - javax.swing.JTextField - javax.swing.UIManager - javax.swing.table.TableCellRenderer - - static io.ultreia.java4all.i18n.I18n.t - </import> - - <ContentReferentialUIModel id='model' genericType='D, R'/> - <ContentReferentialUIModelStates id='states' genericType='D, R'/> - <ReferentialDto id='bean' initializer='getStates().getBean()'/> - <ObserveBlockingLayerUI id='editKeyTableLayerUI' styleClass="blockBlockLayerUI"/> - <CardLayout2Ext id='viewLayout' constructorParams='this, "contentBody"'/> - - <script><![CDATA[ + abstract='true' + beanScope="bean" + i18n="fr.ird.observe.dto.referential.ReferentialDto" + genericType='D extends ReferentialDto, R extends ReferentialDtoReference, U extends ContentReferentialUI<D, R, U>' + implements="fr.ird.observe.client.datasource.editor.api.content.EditableContentUI<D>"> + <import> + fr.ird.observe.dto.referential.ReferentialDto + fr.ird.observe.dto.reference.ReferentialDtoReference + fr.ird.observe.dto.referential.ReferenceStatus + fr.ird.observe.client.util.UIHelper + fr.ird.observe.client.util.ObserveBlockingLayerUI + fr.ird.observe.client.datasource.validation.ObserveSwingValidator + + org.nuiton.jaxx.widgets.text.NormalTextEditor + org.nuiton.jaxx.validator.swing.SwingValidator + io.ultreia.java4all.jaxx.widgets.choice.BeanCheckBox + io.ultreia.java4all.jaxx.widgets.combobox.BeanEnumEditor + + io.ultreia.java4all.jaxx.widgets.list.ListHeader + + javax.swing.DefaultListModel + javax.swing.ListSelectionModel + javax.swing.JTable + javax.swing.JTextField + javax.swing.UIManager + javax.swing.table.TableCellRenderer + + static io.ultreia.java4all.i18n.I18n.t + </import> + + <ContentReferentialUIModel id='model' genericType='D, R'/> + <ContentReferentialUIModelStates id='states' genericType='D, R'/> + <ReferentialDto id='bean' initializer='getStates().getBean()'/> + <ObserveBlockingLayerUI id='editKeyTableLayerUI' styleClass="blockBlockLayerUI"/> + <CardLayout2Ext id='viewLayout' constructorParams='this, "contentBody"'/> + + <script><![CDATA[ public static final String LIST_VIEW = "listView"; @@ -87,110 +87,114 @@ viewLayout.addLayoutComponent(editView, DETAIL_VIEW); ]]></script> - <JPanel id="contentBody" layout="{viewLayout}"> + <JPanel id="contentBody" layout="{viewLayout}"> - <JPanel id="listView" constraints="LIST_VIEW" layout="{new BorderLayout()}"> - <JScrollPane id='listPane' constraints='BorderLayout.CENTER' columnHeaderView='{referentialListHeader}' decorator="boxed"> - <JList id='list' genericType='R'/> - <ListHeader id='referentialListHeader' genericType='R' constructorParams="list"/> - </JScrollPane> - </JPanel> + <JPanel id="listView" constraints="LIST_VIEW" layout="{new BorderLayout()}"> + <JScrollPane id='listPane' constraints='BorderLayout.CENTER' columnHeaderView='{referentialListHeader}' + decorator="boxed"> + <JList id='list' genericType='R'/> + <ListHeader id='referentialListHeader' genericType='R' constructorParams="list"/> + </JScrollPane> + </JPanel> - <Table id="editView" insets="0" weightx="1" fill="both" constraints="DETAIL_VIEW"> - <row> - <cell anchor='north'> - <Table id='editTable'> + <Table id="editView" insets="0" weightx="1" fill="both" constraints="DETAIL_VIEW"> <row> - <cell anchor="west"> - <JLabel id='codeAndHomeIdLabel'/> - </cell> - <cell anchor='east' weightx="1" fill="both"> - <JPanel id='codeAndHomeIdPanel' layout='{new GridLayout()}'> - <NormalTextEditor id='code' decorator="boxed"/> - <NormalTextEditor id='homeId' decorator="boxed"/> - </JPanel> - </cell> + <cell anchor='north'> + <Table id='editTable'> + <row> + <cell anchor="west"> + <JLabel id='codeAndHomeIdLabel'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JPanel id='codeAndHomeIdPanel' layout='{new GridLayout()}'> + <NormalTextEditor id='code' decorator="boxed"/> + <NormalTextEditor id='homeId' decorator="boxed"/> + </JPanel> + </cell> + </row> + <row> + <cell anchor="west"> + <JLabel id='statusLabel'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JPanel id='statusAndNeedCommentPanel' layout='{new GridLayout()}'> + <BeanEnumEditor id='status' constructorParams='ReferenceStatus.class' + genericType='ReferenceStatus' decorator="boxed"/> + <JPanel id='needCommentPanel' layout='{new BorderLayout()}'> + <JLabel id='needCommentLabel' constraints="BorderLayout.WEST"/> + <BeanCheckBox id='needComment' decorator="boxed" + constraints="BorderLayout.EAST"/> + </JPanel> + </JPanel> + </cell> + </row> + <row> + <cell anchor='west'> + <JLabel id='uriLabel'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <NormalTextEditor id='uri' decorator="boxed"/> + </cell> + </row> + </Table> + </cell> </row> <row> - <cell anchor="west"> - <JLabel id='statusLabel'/> - </cell> - <cell anchor='east' weightx="1" fill="both"> - <JPanel id='statusAndNeedCommentPanel' layout='{new GridLayout()}'> - <BeanEnumEditor id='status' constructorParams='ReferenceStatus.class' genericType='ReferenceStatus' decorator="boxed"/> - <JPanel id='needCommentPanel' layout='{new BorderLayout()}'> - <JLabel id='needCommentLabel' constraints="BorderLayout.WEST"/> - <BeanCheckBox id='needComment' decorator="boxed" constraints="BorderLayout.EAST"/> - </JPanel> - </JPanel> - </cell> + <cell anchor='north'> + <Table id='editExtraTable' fill='both'/> + </cell> </row> <row> - <cell anchor='west'> - <JLabel id='uriLabel'/> - </cell> - <cell anchor='east' weightx="1" fill="both"> - <NormalTextEditor id='uri' decorator="boxed"/> - </cell> + <cell anchor='north'> + <Table id='editI18nTable' fill='both'/> + </cell> </row> - </Table> - </cell> - </row> - <row> - <cell anchor='north'> - <Table id='editExtraTable' fill='both'/> - </cell> - </row> - <row> - <cell anchor='north'> - <Table id='editI18nTable' fill='both'/> - </cell> - </row> - <row> - <cell anchor='north' weighty="1"> - <Table id='editMoreExtraTable' fill='both'> <row> - <cell> - <JLabel styleClass="skipI18n"/> - </cell> + <cell anchor='north' weighty="1"> + <Table id='editMoreExtraTable' fill='both'> + <row> + <cell> + <JLabel styleClass="skipI18n"/> + </cell> + </row> + </Table> + </cell> </row> - </Table> - </cell> - </row> - </Table> - </JPanel> - <Table id='actions' fill='both' weightx='1' insets='0'> - <row> - <cell> - <JPanel id="listActions" layout="{new GridLayout(1, 0)}"> - <JButton id='modify'/> - <JButton id='detail'/> - </JPanel> - </cell> - </row> - <row> - <cell> - <Table id="detailActions" fill='both' insets="1,4,1,1"> - <row> - <cell fill="both" weightx="1"> - <JPanel id="detailRealActions" layout="{new GridLayout(1, 0)}"> - <JButton id='reset'/> - <JButton id='save'/> - </JPanel> + </Table> + </JPanel> + <Table id='actions' fill='both' weightx='1' insets='0'> + <row> + <cell> + <JPanel id="listActions" layout="{new GridLayout(1, 0)}"> + <JButton id='modify'/> + <JButton id='detail'/> + </JPanel> </cell> - </row> - <row> - <cell fill="both" weightx="1"> - <JButton id='backToList'/> + </row> + <row> + <cell> + <Table id="detailActions" fill='both' insets="1,4,1,1"> + <row> + <cell fill="both" weightx="1"> + <JPanel id="detailRealActions" layout="{new GridLayout(1, 0)}"> + <JButton id='reset'/> + <JButton id='save'/> + </JPanel> + </cell> + </row> + <row> + <cell fill="both" weightx="1"> + <JButton id='backToList'/> + </cell> + </row> + </Table> </cell> - </row> - </Table> - </cell> - </row> - </Table> - <JMenuItem id='delete'/> - <JMenuItem id='showTechnicalInformations'/> - <JMenuItem id='changeId'/> - <JMenuItem id="showUsages"/> - <JMenuItem id='create'/> + </row> + </Table> + <JMenuItem id='delete'/> + <JMenuItem id='showTechnicalInformations'/> + <JMenuItem id='replaceUsages'/> + <JMenuItem id='changeId'/> + <JMenuItem id="showUsages"/> + <JMenuItem id='create'/> </fr.ird.observe.client.datasource.editor.api.content.ContentUI> ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUIHandler.java ===================================== @@ -39,6 +39,7 @@ import fr.ird.observe.client.datasource.editor.api.content.referential.actions.D import fr.ird.observe.client.datasource.editor.api.content.referential.actions.DetailReferential; import fr.ird.observe.client.datasource.editor.api.content.referential.actions.ModifyReferential; import fr.ird.observe.client.datasource.editor.api.content.referential.actions.ReferentialResetAdapter; +import fr.ird.observe.client.datasource.editor.api.content.referential.actions.ReplaceReferentialUsages; import fr.ird.observe.client.datasource.editor.api.content.referential.actions.SaveContentReferentialUIAdapter; import fr.ird.observe.client.datasource.editor.api.content.referential.actions.ShowUsagesReferential; import fr.ird.observe.client.util.UIHelper; @@ -168,6 +169,7 @@ public class ContentReferentialUIHandler<D extends ReferentialDto, R extends Ref DetailReferential.installAction(ui); DeleteReferential.installAction(ui); ChangeId.installAction(ui); + ReplaceReferentialUsages.installAction(ui); ui.getConfigurePopup().addSeparator(); ShowUsagesReferential.installAction(ui); ShowTechnicalInformations.installAction(ui); ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/actions/ReplaceReferentialUsages.java ===================================== @@ -0,0 +1,142 @@ +package fr.ird.observe.client.datasource.editor.api.content.referential.actions; + +/*- + * #%L + * ObServe Client :: DataSource :: Editor :: API + * %% + * Copyright (C) 2008 - 2023 IRD, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import fr.ird.observe.client.datasource.api.ObserveSwingDataSource; +import fr.ird.observe.client.datasource.editor.api.ObserveKeyStrokesEditorApi; +import fr.ird.observe.client.datasource.editor.api.content.actions.ConfigureMenuAction; +import fr.ird.observe.client.datasource.editor.api.content.referential.ContentReferentialUI; +import fr.ird.observe.client.datasource.editor.api.content.referential.ContentReferentialUIModel; +import fr.ird.observe.client.datasource.editor.api.content.referential.ContentReferentialUIModelStates; +import fr.ird.observe.client.datasource.editor.api.content.referential.usage.UsageForReplaceUIHandler; +import fr.ird.observe.dto.I18nDecoratorHelper; +import fr.ird.observe.dto.ToolkitIdDtoBean; +import fr.ird.observe.dto.ToolkitIdLabel; +import fr.ird.observe.dto.reference.ReferentialDtoReference; +import fr.ird.observe.dto.referential.ReferentialDto; +import fr.ird.observe.services.service.UsageCount; +import fr.ird.observe.services.service.UsageService; +import io.ultreia.java4all.i18n.I18n; +import org.apache.commons.lang3.tuple.Pair; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import javax.swing.JOptionPane; +import java.awt.event.ActionEvent; +import java.util.List; +import java.util.stream.Collectors; + +import static io.ultreia.java4all.i18n.I18n.n; + +/** + * To replace referential usages by another one. + * Created on 20/05/2023. + * + * @author Tony Chemit - dev@tchemit.fr + * @since 9.1.4 + */ +public class ReplaceReferentialUsages<D extends ReferentialDto, R extends ReferentialDtoReference, U extends ContentReferentialUI<D, R, U>> extends ContentReferentialUIActionSupport<D, R, U> implements ConfigureMenuAction<U> { + + private static final Logger log = LogManager.getLogger(DeleteReferential.class); + + private ToolkitIdLabel replaceReference; + + public ReplaceReferentialUsages(Class<D> dataType) { + super(dataType, n("observe.referential.Referential.action.replaceUsages"), I18n.t("observe.referential.Referential.action.replaceUsages.tip", I18nDecoratorHelper.getType(dataType)), "move", ObserveKeyStrokesEditorApi.KEY_STROKE_REPLACE_REFERENTIAL); + } + + public static <D extends ReferentialDto, R extends ReferentialDtoReference, U extends ContentReferentialUI<D, R, U>> void installAction(U ui) { + ReplaceReferentialUsages<D, R, U> action = new ReplaceReferentialUsages<>(ui.getModel().getScope().getMainType()); + init(ui, ui.getReplaceUsages(), action); + ui.getModel().getStates().addPropertyChangeListener(ContentReferentialUIModelStates.PROPERTY_SELECTED_BEAN_REFERENCE, evt -> { + ReferentialDtoReference newValue = (ReferentialDtoReference) evt.getNewValue(); + ObserveSwingDataSource mainDataSource = ui.getModel().getDataSourcesManager().getMainDataSource(); + action.setEnabled(newValue != null && (mainDataSource.isLocal() || mainDataSource.canWriteData())); + }); + } + + @Override + protected void doActionPerformed(ActionEvent event, U ui) { + ContentReferentialUIModel<D, R> model = ui.getModel(); + R selectedBeanReference = model.getStates().getSelectedBeanReference(); + askToReplace(ui, selectedBeanReference); + if (replaceReference != null) { + doReplace(ui, selectedBeanReference, replaceReference); + } + } + + private void askToReplace(U ui, R bean) { + + ContentReferentialUIModel<D, R> model = ui.getModel(); + + // recherche des utilisation du bean dans la base + UsageService usageService = getServicesProvider().getUsageService(); + ToolkitIdDtoBean request = model.getStates().toUsageRequest(bean.getId()); + UsageCount usages = usageService.countReferentialInData(request); + replaceReference = null; + + Class<D> beanType = model.getScope().getMainType(); + Class<R> referenceType = model.getScope().getMainReferenceType(); + if (usages.isEmpty()) { + JOptionPane.showMessageDialog(getMainUI(), I18n.t("observe.referential.Referential.action.replaceUsages.no.data.usage", bean)); + return; + } + + // some usages were found + + // get replacements + List<R> referentialReferences = ui.getHandler().getReferentialReferences(referenceType); + List<R> referenceList = referentialReferences + .stream() + .filter(ReferentialDtoReference::isEnabled) + .filter(r -> !bean.getId().equals(r.getId())) + .collect(Collectors.toList()); + + ToolkitIdLabel dtoToReplaceLabel = bean.toLabel(); + getDecoratorService().installToolkitIdLabelDecorator(beanType, dtoToReplaceLabel); + Pair<Boolean, ToolkitIdLabel> result = UsageForReplaceUIHandler.showUsages(usageService, dtoToReplaceLabel, request, usages, referenceList.stream().map(ReferentialDtoReference::toLabel).collect(Collectors.toList())); + Boolean canContinue = result.getLeft(); + if (!canContinue) { + log.debug("user refuse to continue"); + return; + } + + replaceReference = result.getRight(); + if (replaceReference == null) { + log.debug("user did not select replace"); + } + } + + private void doReplace(U ui, ReferentialDtoReference bean, ToolkitIdLabel replaceReference) { + + String id = bean.getId(); + Class<D> beanType = ui.getModel().getScope().getMainType(); + if (replaceReference == null) { + return; + } + String replaceId = replaceReference.getId(); + log.info(String.format("Do replace reference (%s → %s)", id, replaceId)); + getServicesProvider().getReferentialService().replaceReferenceInData(beanType, id, replaceId); + } + +} ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/usage/UsageForReplaceUI.jaxx ===================================== @@ -0,0 +1,58 @@ +<!-- + #%L + ObServe Client :: DataSource :: Editor :: API + %% + Copyright (C) 2008 - 2023 IRD, Ultreia.io + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> +<org.jdesktop.swingx.JXTitledPanel id="usagesPane" contentContainer='{internalContent}'> + <JPanel id="internalContent" layout='{new BorderLayout()}'> + + <import> + + fr.ird.observe.dto.ToolkitIdLabel + fr.ird.observe.client.datasource.usage.UsagesGetter + fr.ird.observe.client.datasource.usage.UsagePanel + org.nuiton.jaxx.runtime.context.JAXXInitialContext + io.ultreia.java4all.jaxx.widgets.combobox.FilterableComboBox + java.util.List + + static io.ultreia.java4all.i18n.I18n.t + </import> + + <script><![CDATA[ + +public static UsageForReplaceUI build(Class<?> type, String message, UsagesGetter getter, List references) { + return new UsageForReplaceUI(new JAXXInitialContext().add(type).add(message).add(getter).add(references)); +} + +public ToolkitIdLabel getSelectedReplace() { return (ToolkitIdLabel) replace.getModel().getSelectedItem(); } + +public void destroy() { + log.debug("destroy ui " + getName()); + SwingUtil.destroy(this); + usagesPanel.removeAll(); +} +]]> + </script> + + <Boolean id="canApply" javaBean="false"/> + <UsagePanel id='usagesPanel' constraints="BorderLayout.CENTER"/> + <JPanel id="replacePanel" border='{new TitledBorder(t("observe.ui.usage.replaceTitle"))}' + constraints="BorderLayout.SOUTH" layout="{new GridLayout(0, 1)}"> + <FilterableComboBox id="replace" genericType="ToolkitIdLabel"/> + </JPanel> + </JPanel> +</org.jdesktop.swingx.JXTitledPanel> ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/usage/UsageForReplaceUIHandler.java ===================================== @@ -0,0 +1,134 @@ +package fr.ird.observe.client.datasource.editor.api.content.referential.usage; + +/*- + * #%L + * ObServe Client :: DataSource :: Editor :: API + * %% + * Copyright (C) 2008 - 2023 IRD, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import fr.ird.observe.client.datasource.usage.UsagePanel; +import fr.ird.observe.client.datasource.usage.UsageUIHandlerSupport; +import fr.ird.observe.client.datasource.usage.UsagesGetter; +import fr.ird.observe.dto.BusinessDto; +import fr.ird.observe.dto.ToolkitIdDtoBean; +import fr.ird.observe.dto.ToolkitIdLabel; +import fr.ird.observe.services.service.UsageCount; +import fr.ird.observe.services.service.UsageCountWithLabel; +import fr.ird.observe.services.service.UsageService; +import fr.ird.observe.spi.module.ObserveBusinessProject; +import io.ultreia.java4all.i18n.I18n; +import io.ultreia.java4all.jaxx.widgets.combobox.FilterableComboBox; +import io.ultreia.java4all.jaxx.widgets.combobox.FilterableComboBoxModel; +import io.ultreia.java4all.util.SingletonSupplier; +import org.apache.commons.lang3.tuple.Pair; + +import javax.swing.JOptionPane; +import java.util.Collection; +import java.util.List; + +import static io.ultreia.java4all.i18n.I18n.t; + +/** + * Created on 20/05/2023. + * + * @author Tony Chemit - dev@tchemit.fr + * @since 9.1.4 + */ +public class UsageForReplaceUIHandler extends UsageUIHandlerSupport<UsageForReplaceUI> { + + public static Pair<Boolean, ToolkitIdLabel> showUsages(UsageService usageService, + ToolkitIdLabel dto, + ToolkitIdDtoBean request, + UsageCount usages, + List<ToolkitIdLabel> referenceList) { + ObserveBusinessProject businessProject = ObserveBusinessProject.get(); + UsageCountWithLabel realUsages = new UsageCountWithLabel(I18n.getDefaultLocale(), businessProject, usages); + UsageForReplaceUIHandler.ReplaceReferentialUsagesGetter getter = new UsageForReplaceUIHandler.ReplaceReferentialUsagesGetter(realUsages, usageService, request); + Class<? extends BusinessDto> dtoType = dto.getType(); + String type = businessProject.getLongTitle(dtoType); + String message = t("observe.ui.message.show.usage.referential.replace", type, dto); + + UsageForReplaceUI usagesUI = UsageForReplaceUI.build(dtoType, message, getter, referenceList); + + String replaceText = t("observe.ui.choice.replace"); + Object[] options = {replaceText, t("observe.ui.choice.cancel")}; + JOptionPane pane = new JOptionPane(usagesUI, JOptionPane.WARNING_MESSAGE, JOptionPane.DEFAULT_OPTION, null, options, options[0]); + + usagesUI.getHandler().attachToOptionPane(pane, replaceText); + + usagesUI.getHandler().setUISize(pane); + int response = usagesUI.getHandler().askToUser(pane, t("observe.ui.title.can.not.replace.referential"), options); + if (response == 0) { + // will replace and replace + ToolkitIdLabel selectedReplace = usagesUI.getSelectedReplace(); + return Pair.of(true, selectedReplace); + } + // any other case : do not replace, do not replace + return Pair.of(false, null); + } + + @Override + protected UsagePanel getUsages() { + return ui.getUsagesPanel(); + } + + @Override + protected FilterableComboBox<ToolkitIdLabel> getReplace() { + return ui.getReplace(); + } + + @Override + public void afterInit(UsageForReplaceUI ui) { + super.afterInit(ui); + getReplace().getModel().addPropertyChangeListener(FilterableComboBoxModel.PROPERTY_SELECTED_ITEM, evt -> updateCanApply()); + } + + @Override + public void attachToOptionPane(JOptionPane pane, String message) { + super.attachToOptionPane(pane, message); + updateCanApply(); + } + + private void updateCanApply() { + boolean canApply = getReplace().getModel().getSelectedItem() != null; + ui.setCanApply(canApply); + } + + public static class ReplaceReferentialUsagesGetter implements UsagesGetter { + private final UsageCountWithLabel usages; + private final UsageService usageService; + private final ToolkitIdDtoBean request; + + public ReplaceReferentialUsagesGetter(UsageCountWithLabel usages, UsageService usageService, ToolkitIdDtoBean request) { + this.usages = usages; + this.usageService = usageService; + this.request = request; + } + + @Override + public UsageCountWithLabel getCount() { + return usages; + } + + @Override + public <D extends BusinessDto> SingletonSupplier<Collection<ToolkitIdLabel>> getUsages(Class<D> dtoType) { + return SingletonSupplier.of(() -> usageService.findReferential(request, dtoType)); + } + } +} ===================================== client/datasource/editor/common/pom.xml ===================================== @@ -81,6 +81,10 @@ <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-api</artifactId> </dependency> + <dependency> + <groupId>org.swinglabs</groupId> + <artifactId>jxlayer</artifactId> + </dependency> <dependency> <groupId>${project.groupId}</groupId> <artifactId>client-datasource-editor-api-test</artifactId> ===================================== client/datasource/editor/ll/pom.xml ===================================== @@ -147,6 +147,10 @@ <groupId>org.locationtech.jts</groupId> <artifactId>jts-core</artifactId> </dependency> + <dependency> + <groupId>org.swinglabs</groupId> + <artifactId>jxlayer</artifactId> + </dependency> <dependency> <groupId>org.swinglabs.swingx</groupId> <artifactId>swingx-core</artifactId> ===================================== client/datasource/editor/pom.xml ===================================== @@ -91,6 +91,11 @@ <artifactId>gt-main</artifactId> <version>${lib.version.geoTools}</version> </dependency> + <dependency> + <groupId>org.geotools</groupId> + <artifactId>gt-metadata</artifactId> + <version>${lib.version.geoTools}</version> + </dependency> <dependency> <groupId>org.geotools</groupId> <artifactId>gt-opengis</artifactId> ===================================== client/datasource/editor/ps/pom.xml ===================================== @@ -160,6 +160,10 @@ <groupId>org.locationtech.jts</groupId> <artifactId>jts-core</artifactId> </dependency> + <dependency> + <groupId>org.swinglabs</groupId> + <artifactId>jxlayer</artifactId> + </dependency> <dependency> <groupId>org.swinglabs.swingx</groupId> <artifactId>swingx-core</artifactId> ===================================== client/runner/pom.xml ===================================== @@ -75,6 +75,10 @@ <groupId>io.ultreia.java4all</groupId> <artifactId>application-context</artifactId> </dependency> + <dependency> + <groupId>io.ultreia.java4all</groupId> + <artifactId>java-util</artifactId> + </dependency> <dependency> <groupId>io.ultreia.java4all.i18n</groupId> <artifactId>i18n-runtime</artifactId> @@ -383,7 +387,7 @@ <phase>generate-resources</phase> <configuration> <target> - <copy failonerror="true" file="../../CHANGELOG.md" overwrite="true" tofile="${project.build.outputDirectory}/META-INF/${applicationName}-CHANGELOG.md" /> + <copy failonerror="true" file="../../CHANGELOG.md" overwrite="true" tofile="${project.build.outputDirectory}/META-INF/${applicationName}-CHANGELOG.md"/> </target> </configuration> </execution> @@ -397,7 +401,7 @@ <target> <copy failonerror="true" overwrite="true" todir="${project.build.outputDirectory}/META-INF/configuration/"> <fileset dir="${config.targetDirectory}"> - <include name="${applicationName}.*" /> + <include name="${applicationName}.*"/> </fileset> </copy> </target> @@ -411,7 +415,7 @@ <phase>integration-test</phase> <configuration> <target> - <copy failonerror="true" file="${project.build.directory}/${project.build.finalName}.jar" overwrite="true" tofile="${project.build.directory}/${applicationJarName}.jar" /> + <copy failonerror="true" file="${project.build.directory}/${project.build.finalName}.jar" overwrite="true" tofile="${project.build.directory}/${applicationJarName}.jar"/> </target> </configuration> </execution> @@ -445,7 +449,7 @@ <phase>integration-test</phase> <configuration> <target> - <copy failonerror="true" file="${project.build.directory}/${project.build.finalName}.exe" overwrite="true" tofile="${project.build.directory}/${applicationJarName}.exe" /> + <copy failonerror="true" file="${project.build.directory}/${project.build.finalName}.exe" overwrite="true" tofile="${project.build.directory}/${applicationJarName}.exe"/> </target> </configuration> </execution> ===================================== client/runner/src/main/i18n/translations/client-runner_en_GB.properties ===================================== @@ -273,6 +273,9 @@ observe.info.validation.credentials=To validate referentiel (resp. data), You mu observe.init.no.initial.dump.detected=Internal data source %1$s not detected. observe.init.no.local.db.detected=Local data source %1$s not detected. observe.ll.data.observation.SetDetailCompositionUI.generateTabValid=Templates +observe.referential.Referential.action.replaceUsages=Replace in data with another reference +observe.referential.Referential.action.replaceUsages.no.data.usage=No usage of reference «%s» found +observe.referential.Referential.action.replaceUsages.tip=Replace current usages of this reference «%s» with another one observe.referential.Referential.type=<html><body>Referential of type <i>%s</i> observe.runner.action.showConfig.title=Configuration observe.runner.config.loaded=Configuration d'ObServe v. %1$s chargée. @@ -866,6 +869,7 @@ observe.ui.message.show.data.compositions.usages=List of required dependencies f observe.ui.message.show.referential.usages=List of usage of referential %1$s\: '%2$s' observe.ui.message.show.usage.referential.delete=Referential %1$s "%2$s" can be deleted until you choose a replacement. observe.ui.message.show.usage.referential.disabled=Referential %1$s "%2$s" will be disabled. +observe.ui.message.show.usage.referential.replace=Choose a replacement for referential %1$s "%2$s" observe.ui.message.table.editBean.modified=Current entry is modified and valid. observe.ui.message.table.editBean.modified.but.invalid=Current entry is modified but not valid. observe.ui.move.selectTarget=Select new parent node after move? @@ -873,6 +877,7 @@ observe.ui.textArea.tip=<html><body><ul><li>To focus on next widget, use acceler observe.ui.title.about=About observe.ui.title.can.not.delete.referential=Impossible to delete a referentiel data... observe.ui.title.can.not.export.obstuna=Could not export data... +observe.ui.title.can.not.replace.referential=Select referential replacement observe.ui.title.choose.avdth.file=Select avdth file observe.ui.title.choose.db.dump=Choose a database backup observe.ui.title.choose.db.dump.directory=Choose directory of backup ===================================== client/runner/src/main/i18n/translations/client-runner_es_ES.properties ===================================== @@ -273,6 +273,9 @@ observe.info.validation.credentials=Para validar el referencial (resp. los datos observe.init.no.initial.dump.detected=fuente de datos interna %1$s no detectada. observe.init.no.local.db.detected=Base local %1$s no detectada. observe.ll.data.observation.SetDetailCompositionUI.generateTabValid=Templates \#TODO +observe.referential.Referential.action.replaceUsages=Replace in data with another reference \#TODO +observe.referential.Referential.action.replaceUsages.no.data.usage=No usage of reference «%s» found \#TODO +observe.referential.Referential.action.replaceUsages.tip=Replace current usages of this reference «%s» with another one \#TODO observe.referential.Referential.type=<html><body>Referencial de tipo <i>%s</i> observe.runner.action.showConfig.title=Configuración observe.runner.config.loaded=Configuración de Observe v. %1$s cargada. @@ -866,6 +869,7 @@ observe.ui.message.show.data.compositions.usages=List of required dependencies f observe.ui.message.show.referential.usages=Listas de usos de referenciales %1$s \: '%2$s' observe.ui.message.show.usage.referential.delete=El referencial %1$s "%2$s" no se puede eliminar sin hacer una sustitución antes. observe.ui.message.show.usage.referential.disabled=El referencial %1$s "%2$s" se desactivará. +observe.ui.message.show.usage.referential.replace=Choose a replacement for referential %1$s "%2$s" \#TODO observe.ui.message.table.editBean.modified=El registro actual se ha modificado y es válido. observe.ui.message.table.editBean.modified.but.invalid=El registro actual se ha modificado pero no es válido. observe.ui.move.selectTarget=Select new parent node after move? \#TODO @@ -873,6 +877,7 @@ observe.ui.textArea.tip=<html><body><ul><li>To focus on next widget, use acceler observe.ui.title.about=A proposito de ObServe... observe.ui.title.can.not.delete.referential=Impossible eliminar un referencial en proceso de utilización... observe.ui.title.can.not.export.obstuna=Impossible exportar los datos... +observe.ui.title.can.not.replace.referential=Select referential replacement \#TODO observe.ui.title.choose.avdth.file=Select avdth file \#TODO observe.ui.title.choose.db.dump=Seleccionar una copia de seguridad de base local observe.ui.title.choose.db.dump.directory=Seleccionar e directorio de destinación de la copia de seguridad ===================================== client/runner/src/main/i18n/translations/client-runner_fr_FR.properties ===================================== @@ -273,6 +273,9 @@ observe.info.validation.credentials=Pour valider le référentiel (resp. les don observe.init.no.initial.dump.detected=Base embarquée %1$s non détectée. observe.init.no.local.db.detected=Base locale %1$s non détectée. observe.ll.data.observation.SetDetailCompositionUI.generateTabValid=Templates +observe.referential.Referential.action.replaceUsages=Remplacer dans les données par une autre référence +observe.referential.Referential.action.replaceUsages.no.data.usage=Aucune utilisation de la référence «%s» détectée +observe.referential.Referential.action.replaceUsages.tip=Remplacer les utilisations actuelles de cette référence «%s» par une autre observe.referential.Referential.type=<html><body>Référentiel de type <i>%s</i> observe.runner.action.showConfig.title=Configuration observe.runner.config.loaded=Configuration d'ObServe v. %1$s chargée. @@ -866,6 +869,7 @@ observe.ui.message.show.data.compositions.usages=Liste des dépendances requises observe.ui.message.show.referential.usages=Listes des utilisations du référentiel %1$s de type '%2$s' observe.ui.message.show.usage.referential.delete=Le référentiel %1$s "%2$s" ne peut pas être supprimé sans effectuer au préalable un remplacement. observe.ui.message.show.usage.referential.disabled=Le référentiel %1$s "%2$s" va être désactivé. +observe.ui.message.show.usage.referential.replace=Le référentiel %1$s "%2$s" va être remplacé dans les données métiers observe.ui.message.table.editBean.modified=L'entrée en cours d'édition a été modifiée et est valide. observe.ui.message.table.editBean.modified.but.invalid=L'entrée en cours d'édition a été modifiée, mais n'est pas valide. observe.ui.move.selectTarget=Se positionner sur le nœud destination après le déplacement ? @@ -873,6 +877,7 @@ observe.ui.textArea.tip=<html><body><ul><li>Pour accéder au composant suivant, observe.ui.title.about=A propos d'ObServe... observe.ui.title.can.not.delete.referential=Impossible de supprimer un référentiel en cours d'utilisation... observe.ui.title.can.not.export.obstuna=Impossible d'exporter des données... +observe.ui.title.can.not.replace.referential=Choisir le référentiel de remplacement observe.ui.title.choose.avdth.file=Choisir une base AVDTH observe.ui.title.choose.db.dump=Choisir une sauvegarder de base locale observe.ui.title.choose.db.dump.directory=Choisir le répertoire de destination de la sauvegarde ===================================== core/api/validation/pom.xml ===================================== @@ -63,6 +63,11 @@ <artifactId>toolkit-api-services</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>toolkit-api-validation</artifactId> + <version>${project.version}</version> + </dependency> <dependency> <groupId>${project.groupId}</groupId> <artifactId>model</artifactId> ===================================== core/persistence/avdth/pom.xml ===================================== @@ -66,6 +66,10 @@ <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </dependency> + <dependency> + <groupId>io.ultreia.java4all</groupId> + <artifactId>java-bean</artifactId> + </dependency> <dependency> <groupId>io.ultreia.java4all</groupId> <artifactId>java-lang</artifactId> ===================================== core/services/pom.xml ===================================== @@ -36,7 +36,7 @@ <module>client</module> </modules> <properties> - <serviceClassifier /> + <serviceClassifier/> </properties> <profiles> <profile> ===================================== model/pom.xml ===================================== @@ -91,11 +91,11 @@ <target> <copy failonerror="true" filtering="true" overwrite="true" todir="${project.build.outputDirectory}/models"> <filterset> - <filter token="persistence.model.version" value="${persistence.model.version}" /> - <filter token="model.name" value="${model.name}" /> + <filter token="persistence.model.version" value="${persistence.model.version}"/> + <filter token="model.name" value="${model.name}"/> </filterset> <fileset dir="${basedir}/src/main/models"> - <include name="**/*" /> + <include name="**/*"/> </fileset> </copy> </target> @@ -111,12 +111,12 @@ <target> <delete includeEmptyDirs="true"> <fileset dir="${project.build.outputDirectory}/models/${model.name}"> - <include name="${model.dto.classifier}/*/*" /> - <include name="${model.dto.classifier}/*" /> - <include name="${model.dto.classifier}" /> - <include name="${model.persistence.classifier}/*/*" /> - <include name="${model.persistence.classifier}/*" /> - <include name="${model.persistence.classifier}" /> + <include name="${model.dto.classifier}/*/*"/> + <include name="${model.dto.classifier}/*"/> + <include name="${model.dto.classifier}"/> + <include name="${model.persistence.classifier}/*/*"/> + <include name="${model.persistence.classifier}/*"/> + <include name="${model.persistence.classifier}"/> </fileset> </delete> </target> ===================================== observe/pom.xml ===================================== @@ -31,7 +31,7 @@ <description>ObServe Release</description> <properties> <deploy>false</deploy> - <deployFileSuffix /> + <deployFileSuffix/> </properties> <build> <plugins> @@ -183,9 +183,6 @@ <skipNexusStagingDeployMojo>false</skipNexusStagingDeployMojo> <!-- <deployFileSuffix />--> </properties> - <build> - <plugins /> - </build> </profile> </profiles> </project> ===================================== pom.xml ===================================== @@ -23,7 +23,7 @@ <parent> <groupId>io.ultreia.maven</groupId> <artifactId>pom</artifactId> - <version>2023.23</version> + <version>2023.26</version> </parent> <groupId>fr.ird.observe</groupId> <artifactId>ird-observe</artifactId> @@ -543,6 +543,11 @@ <artifactId>commons-lang3</artifactId> <version>${lib.version.commons-lang3}</version> </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-text</artifactId> + <version>1.10.0</version> + </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> @@ -735,6 +740,11 @@ <artifactId>jboss-logging</artifactId> <version>${lib.version.jboss-logging}</version> </dependency> + <dependency> + <groupId>org.jdom</groupId> + <artifactId>jdom2</artifactId> + <version>2.0.6.1</version> + </dependency> <dependency> <groupId>org.locationtech.jts</groupId> <artifactId>jts-core</artifactId> @@ -1653,7 +1663,7 @@ <phase>pre-site</phase> <configuration> <target> - <copy failonerror="true" file="README.md" overwrite="true" tofile="${project.basedir}/src/site/markdown/index.md" verbose="true" /> + <copy failonerror="true" file="README.md" overwrite="true" tofile="${project.basedir}/src/site/markdown/index.md" verbose="true"/> </target> </configuration> </execution> @@ -1683,11 +1693,11 @@ <phase>pre-site</phase> <configuration> <target> - <copy failonerror="true" file="CHANGELOG.md" overwrite="true" todir="${project.basedir}/src/site/markdown" /> - <copy failonerror="true" file="${project.basedir}/client/runner/src/main/assembly/dist/config/observe-client.md" overwrite="true" todir="${project.basedir}/src/site/markdown/" /> - <copy failonerror="true" file="${project.basedir}/client/runner/src/main/assembly/dist/config/observe-client.conf" overwrite="true" todir="${project.basedir}/src/site/resources/" /> - <copy failonerror="true" file="${project.basedir}/server/runner/src/main/assembly/dist/config/observe-server.md" overwrite="true" todir="${project.basedir}/src/site/markdown/" /> - <copy failonerror="true" file="${project.basedir}/server/runner/src/main/assembly/dist/config/observe-server.conf" overwrite="true" todir="${project.basedir}/src/site/resources/" /> + <copy failonerror="true" file="CHANGELOG.md" overwrite="true" todir="${project.basedir}/src/site/markdown"/> + <copy failonerror="true" file="${project.basedir}/client/runner/src/main/assembly/dist/config/observe-client.md" overwrite="true" todir="${project.basedir}/src/site/markdown/"/> + <copy failonerror="true" file="${project.basedir}/client/runner/src/main/assembly/dist/config/observe-client.conf" overwrite="true" todir="${project.basedir}/src/site/resources/"/> + <copy failonerror="true" file="${project.basedir}/server/runner/src/main/assembly/dist/config/observe-server.md" overwrite="true" todir="${project.basedir}/src/site/markdown/"/> + <copy failonerror="true" file="${project.basedir}/server/runner/src/main/assembly/dist/config/observe-server.conf" overwrite="true" todir="${project.basedir}/src/site/resources/"/> </target> </configuration> </execution> ===================================== server/runner/pom.xml ===================================== @@ -256,7 +256,7 @@ <phase>generate-resources</phase> <configuration> <target> - <copy failonerror="true" file="../../CHANGELOG.md" overwrite="true" tofile="${project.build.outputDirectory}/META-INF/${applicationName}-CHANGELOG.md" /> + <copy failonerror="true" file="../../CHANGELOG.md" overwrite="true" tofile="${project.build.outputDirectory}/META-INF/${applicationName}-CHANGELOG.md"/> </target> </configuration> </execution> @@ -270,7 +270,7 @@ <target> <copy failonerror="true" overwrite="true" todir="${project.build.outputDirectory}/META-INF/configuration/"> <fileset dir="${config.targetDirectory}"> - <include name="${applicationName}.*" /> + <include name="${applicationName}.*"/> </fileset> </copy> </target> View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/6b37ef2209eff9bf2b05f6992... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/6b37ef2209eff9bf2b05f6992... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT (@tchemit)