This article describes the different ways CSV mapping template files can be handled in different versions.
Support Article - CSV Product Import with ISML Mapping Templates
Support Article - CSV Catalog and Category Import with ISML Mapping Templates
CSV mapping template files that are stored in <IS_SHARE>/sites/*/1/templates/default/CSVMappingTemplates/* are compiled once during the first processing. These files (*.isml, *.jsp) may remain in an old state after deployment to the target (live) system, although they should be modified during deployment.
The following applies to live systems only since Gradle Tools 2.0:
Files in <IS_SHARE>/sites/*/1 will also be deployed to <IS_SHARE>/sites/*/2.
Staged content in <IS_SHARE>/sites/*/[1,2] (including the .active flag) will not be overwritten by deployment.
Live systems means that the systemType for a server deployment is set to 'live'.
config {
staging {
systemType = 'live'
}
}
The background of the behavior described in the second point is the following modification handling strategy:
0062 if (extension.systemType == 'live') {
0063 modification {
0064 keep('stagedFiles') {
0065 priority 'intershop'
0066 dir target.shareDirectory
0067 include 'sites/*/.active'
0068 include 'sites/*/?/**'
0069 }
0070 }
0071
0072 directories
0073 {
0074 sitesFolder {
0075 path new File(target.shareDirectory, 'sites')
0076 }
0077 }
0078 }
Recompiling CSV mapping template files in the target system addresses two aspects:
Change the modification handling strategy for all CSV mapping template files during deployment of a live system (see step 1 and 2).
Enable recompilation of the CSV mapping template files in the pagecompile directory (see step 3).
Note
Instead of performing Step 1 to 3, an alternative solution for the handling of CSV mapping templates was introduced with ICM 7.9.4.22 and 7.10.18.2 and is required since 7.10.31.2. See section New Mapping Template Handling for details.
Create a higher modificationPriority than 'intershop' (e.g. 'myProject') by simply adding a priority name to the end of the modificationPriorities.
Development Environment
<cartridge>/deployment/deploy.gradle
apply plugin: com.intershop.deploy.infrastructure.InfrastructureDeploymentPlugin
apply plugin: com.intershop.deploy.cartridge.CartridgeDeploymentPlugin
apply plugin: com.intershop.deploy.assembly.TargetPlugin
deployment {
assemblyDeployment {
modificationPriorities = ['default', 'intershop', 'myProject']
}
}
Deployment Environment
settings.gradle
assemblyDeployment {
modificationPriorities = ['default', 'intershop', 'myProject']
}
Note
The modificationPriorities are an ordered list of priority levels for modification handling. Levels that are listed later are preferred over levels listed earlier, propagated to property modificationPriorities of the ResourceDeploymentExtension of this and all child projects.
Override the default modification handling strategy on live systems only for CSV mapping template files by using a higher priority.
Development Environment
<cartridge>/deployment/deploy.gradle
apply plugin: com.intershop.deploy.infrastructure.InfrastructureDeploymentPlugin
apply plugin: com.intershop.deploy.cartridge.CartridgeDeploymentPlugin
apply plugin: com.intershop.deploy.assembly.TargetPlugin
deployment {
modification {
overwrite('CSVMappingTemplates') {
priority 'myProject'
dir target.shareDirectory
include 'sites/*/1/templates/default/CSVMappingTemplates/**'
}
}
}
Deployment Environment
settings.gradle
deployment {
modification {
overwrite('CSVMappingTemplates') {
priority 'myProject'
dir target.shareDirectory
include 'sites/*/1/templates/default/CSVMappingTemplates/**'
}
}
}
Enable the recompilation of all .jsp files simply by adding a deletion step in the deployment section. This step is necessary to apply the changes to the CSV mapping templates to the system, as they are recompiled only once during the first processing and not during the deployment.
Note
It would also be possible to execute the CompileTemplates job, which recompiles the CSV mapping templates in the active directory. However, this job would also recompile all templates on the server.
Development Environment
<cartridge>/deployment/deploy.gradle
apply plugin: com.intershop.deploy.infrastructure.InfrastructureDeploymentPlugin
apply plugin: com.intershop.deploy.cartridge.CartridgeDeploymentPlugin
apply plugin: com.intershop.deploy.assembly.TargetPlugin
deployment {
// specify all relevant .jsp files to be deleted during deployment
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/1/pagecompile/default/CSVMappingTemplates/CategoryCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/2/pagecompile/default/CSVMappingTemplates/CategoryCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/1/pagecompile/default/CSVMappingTemplates/CouponCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/2/pagecompile/default/CSVMappingTemplates/CouponCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/1/pagecompile/default/CSVMappingTemplates/CustomerCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/2/pagecompile/default/CSVMappingTemplates/CustomerCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/1/pagecompile/default/CSVMappingTemplates/PriceListCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/2/pagecompile/default/CSVMappingTemplates/PriceListCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/1/pagecompile/default/CSVMappingTemplates/ProductCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/2/pagecompile/default/CSVMappingTemplates/ProductCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/1/pagecompile/default/CSVMappingTemplates/VariationTypeCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/2/pagecompile/default/CSVMappingTemplates/VariationTypeCSVConvert.jsp'
}
Deployment Environment
settings.gradle
deployment {
// specify all relevant .jsp files to be deleted during deployment
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/1/pagecompile/default/CSVMappingTemplates/CategoryCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/2/pagecompile/default/CSVMappingTemplates/CategoryCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/1/pagecompile/default/CSVMappingTemplates/CouponCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/2/pagecompile/default/CSVMappingTemplates/CouponCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/1/pagecompile/default/CSVMappingTemplates/CustomerCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/2/pagecompile/default/CSVMappingTemplates/CustomerCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/1/pagecompile/default/CSVMappingTemplates/PriceListCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/2/pagecompile/default/CSVMappingTemplates/PriceListCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/1/pagecompile/default/CSVMappingTemplates/ProductCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/2/pagecompile/default/CSVMappingTemplates/ProductCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/1/pagecompile/default/CSVMappingTemplates/VariationTypeCSVConvert.jsp'
delete "$target.shareDirectory"+'/sites/inSPIRED-Site/2/pagecompile/default/CSVMappingTemplates/VariationTypeCSVConvert.jsp'
}
Note
This new handling is valid from 7.9.4.22 and 7.10.18.2 and mandatory since 7.10.31.2. The old location still works and no immediate migration is necessary (until ICM 7.10.30.2).
Starting with ICM 7.9, it is possible to place the CSV mapping template files into a project cartridge which is assigned to the back office. This way the ISML files are no longer part of the sites directory and are always updated and compiled during deployment.
The location of each CSV mapping template file can be specified in the cartridge properties file (<cartridge>/src/main/resources/cartridges/<cartridge>.properties). This way it is still possible to apply the properties and thus the CSV mapping templates application type and domain specific.
An example cartridge can be downloaded here: a_responsive_csv.zip
Example Cartridge Location of CSV Mapping Template Files
<cartridge>/src/staticfiles/cartridge/templates/default/impex/CSVMappingTemplates
C:...\<cartridge>\staticfiles\cartridge\templates\default\impex\CSVMappingTemplates>dir 27.01.2020 23:52 2.628 CategoryCSVConvert.isml 27.01.2020 23:52 1.583 CouponCSVConvert.isml 27.01.2020 23:52 6.914 CustomerCSVConvert.isml 27.01.2020 23:52 15.514 PriceListCSVConvert.isml 27.01.2020 23:52 17.373 ProductCSVConvert.isml 27.01.2020 23:52 5.827 VariationTypeCSVConvert.isml
Example <cartridge>.properties File
<cartridge>/src/main/resources/cartridges/<cartridge>.properties
# specify each csv mapping template file separately with: # intershop.csvmapping.<name>=default/path/to/file.isml intershop.csvmapping.1=default/impex/CSVMappingTemplates/CategoryCSVConvert.isml intershop.csvmapping.2=default/impex/CSVMappingTemplates/CouponCSVConvert.isml intershop.csvmapping.3=default/impex/CSVMappingTemplates/CustomerCSVConvert.isml intershop.csvmapping.4=default/impex/CSVMappingTemplates/PriceListCSVConvert.isml intershop.csvmapping.5=default/impex/CSVMappingTemplates/ProductCSVConvert.isml intershop.csvmapping.6=default/impex/CSVMappingTemplates/VariationTypeCSVConvert.isml
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Website, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.