Status of Resource Importer

We keep noticing that there is some confusion around the status of Resource Importer and other components, the Site Initializers, Accelerators and Fragments ZIP that people tend to consider as replacement for the Resource Importer. The goal of this post is to provide a clarification about the current status and our future plans.

The Resource Importer has been deprecated a long time ago. Yeah, it is a fact. The main reason for deprecating the Resource Importer was that it was an old component which originally had not been designed for a robust importing tool. It had not been improved that much for a longer time period before the decision was made and the cost/value rate of keeping that supported was high.

Unfortunately, the decision of the replacement has not been made carefully at that time. Now, we are about finding the way out of this situation, however that will not be fast, sorry.

As for the current state of the Resource Importer, having that deprecated does not mean that we dropped completely. Unintended behavior may or may not be resolved depending on the level of effort. It stays with us for a while. It means that we investigate all the requests coming in and will do our best to handle them, however it is not on top priority.

Whenever the Resource Importer meets your needs it is fine to to use it. When we develop a more flexible alternative we’ll facilitate instructions to migrate. However, anytime the Resource Importer does not meet the needs then API based solutions should be used first.

We would like to highlight that also, Site Initializers just provides an API that 3rd party developers can use to execute code to initialize a site after its creation. They are not intended to be a replacement to Resource Importer, although it could be used that way by writing the necessary code to create pages, content and other data that can be defined in the Resource Importer JSON. We have plans to make this easier in the future, requiring less coding, but we are not there yet.

Finally, as it has been mentioned already, we are working on implementing alternatives for which we need all of your feedback. Please, share all of your requests, needs and we will definitely consider them in the future implementations.

Blogs

I had an interesting discussion with David Nebinger at the DEVCON 2019 about how to import resources. One of our main purpose to use the resources importer is to be able to update existing resources in a portal. The Site Initialiser does not help here because it runs only once when creating new sites. 

 

We also discussed to write Groovy scripts or to write UpgradeProcesses to update resources in a portal. For us it is important to have something that is file based, because most of the resources (like Journal Templates, ADTs and so on) are created by our designers and they do not want to write Java or Groovy code.

 

As a result of the discussion I started to write an "advanced" resources importer. It is more ore less a re-implementation of the existing resources importer, but with a fully modular approach. That means that developers can add their own type of resources they want to import by just adding a new OSGi component. It is mostly compatible with the known directory structure of the "old" resources importer, so our designers do not need to change the existing projects.

 

If this project is interesting to you I will probably put it public on github at some time.

I'd be very curious to see this modular importer. I see many solutions to the same problem with all kinds of installations, and having one that doesn't solve all problems, but provides an interface to hook into it, might be just what's needed.

 

Probably nobody can get it right for all intents and purposes, but if it gets 70% of the way, and the rest can be custom: Great.

 

Has that been shared somewhere in any way already?

I put my current implementation here: 

 

https://github.com/dmarks2/advanced-resources-importer

 

Feel free to try it and give feedback.

This sounds really interesting! We are on the search of a way to align structures/templates/fractures etc. with a Git based CI/CD pipeline. As the old ResourceImporter was only ably to initiate a state, it takes me wonder if this one is also able to update the resources without potential data loss? I will definitely give it a try :)