valtech / aem-easy-content-upgrade

AEM Easy Content Upgrade simplifies content migrations in AEM projects
Other
61 stars 25 forks source link

Add execution method which accepts json data #204

Closed DriesVanbilloen closed 1 year ago

DriesVanbilloen commented 1 year ago

This makes it possible to execute the migration with a data json object via code (Same functionality as in the groovy console)

Also added new filter based on rootpaths

royteeuwen commented 1 year ago

@gruberrolandvaltech could you tell us who the new maintainer is so that we can get this merged?

nhirrle commented 1 year ago

Hi @DriesVanbilloen

Thanks a lot for your contribution!

Some minor comments: When building I get a few complaints from the bnd plugin. Could you increase the version numbers in the package-info: de.valtech.aecu.api.groovy.console.bindings 4.8.0 --> 4.9.0 de.valtech.aecu.api.service 3.0.0 --> 3.1.0

and in the pom bundle version 6.2.0 to 6.3.0

Could you add an update within the Readme.md for the data option? As this is a neat feature I think it's worth mentioning it :) Also I would like to understand how it works, can we use this within Groovyconsole as well?

DriesVanbilloen commented 1 year ago

The data parameter is actually added to mimic the behaviour of the groovyconsole. This data (json object) can now be used within the java api to inject that data object in the scripts context :)

The groovy console already supports this data object. It's a separate "tab" where you can add a json object. This way, you can just define all variables above and those will be bound to the a data object in the groovy script context.

With this change, we can add global variables when executing all scripts defined underneath the /apps tree.

FYI: Currently it's only underneath /app, but this can be improved by adding an OSGI config that adds multiple path (Still wondering if that isn't overkill :D )

I will resolve the remarks today!

DriesVanbilloen commented 1 year ago

To make the data usage more clear, I will add a jmx method so it can also be explained in the docs!

DriesVanbilloen commented 1 year ago

Hi @DriesVanbilloen

Thanks a lot for your contribution!

Some minor comments: When building I get a few complaints from the bnd plugin. Could you increase the version numbers in the package-info: de.valtech.aecu.api.groovy.console.bindings 4.8.0 --> 4.9.0 de.valtech.aecu.api.service 3.0.0 --> 3.1.0

and in the pom bundle version 6.2.0 to 6.3.0

Could you add an update within the Readme.md for the data option? As this is a neat feature I think it's worth mentioning it :) Also I would like to understand how it works, can we use this within Groovyconsole as well?

What is the pom bundle version exactly?

nhirrle commented 1 year ago

To make the data usage more clear, I will add a jmx method so it can also be explained in the docs!

This would be appreciated, great idea.

nhirrle commented 1 year ago

Hi @DriesVanbilloen Thanks a lot for your contribution! Some minor comments: When building I get a few complaints from the bnd plugin. Could you increase the version numbers in the package-info: de.valtech.aecu.api.groovy.console.bindings 4.8.0 --> 4.9.0 de.valtech.aecu.api.service 3.0.0 --> 3.1.0 and in the pom bundle version 6.2.0 to 6.3.0 Could you add an update within the Readme.md for the data option? As this is a neat feature I think it's worth mentioning it :) Also I would like to understand how it works, can we use this within Groovyconsole as well?

What is the pom bundle version exactly?

Please have a look when running mvn clean install https://github.com/valtech/aem-easy-content-upgrade/actions/runs/4122005488/jobs/7275025541#step:6:23524

 Error:  Baseline mismatch for package de.valtech.aecu.api.groovy.console.bindings, MINOR change. Current is 4.8.0, repo is 4.8.0, suggest 4.9.0 or -
Error:  Baseline mismatch for package de.valtech.aecu.api.groovy.console.bindings.filters, MINOR change. Current is 3.1.0, repo is 3.1.0, suggest 3.2.0 or -
Error:  Baseline mismatch for package de.valtech.aecu.api.service, MINOR change. Current is 3.0.0, repo is 3.0.0, suggest 3.1.0 or -
Error:  The bundle version change (6.2.0 to 6.2.1) is too low, the new version must be at least 6.3.0

versions 6.2.1-SNAPSHOT should be changed to 6.3.0-SNAPSHOT in the different pom.xml's. Please also change it in sonar.projectVersion in sonar-project.properties file

nhirrle commented 1 year ago

@royteeuwen / @DriesVanbilloen : let me know if you want to finish this for the next aecu version or we release "just" with the new groovyconsole. I plan to do a new release on monday or tuesday in case

royteeuwen commented 1 year ago

@nhirrle both are fine by me. We already have an internal fork for as long as there is no public release :)! What is easiest for you

nhirrle commented 1 year ago

@nhirrle both are fine by me. We already have an internal fork for as long as there is no public release :)! What is easiest for you

OK good, in that case I just wait until you are done :)

DriesVanbilloen commented 1 year ago

@nhirrle Should be good to go :)

nhirrle commented 1 year ago

[ERROR] Baseline mismatch for package de.valtech.aecu.api.groovy.console.bindings.filters, MINOR change. Current is 3.1.0, repo is 3.1.0, suggest 3.2.0 Please update version in de/valtech/aecu/api/groovy/console/bindings/filters/package-info.java from 3.1.0 to 3.2.0

DriesVanbilloen commented 1 year ago

@nhirrle Checks have passed and the suggestions are applied. Are we waiting for a certain approval?

nhirrle commented 1 year ago

@nhirrle Checks have passed and the suggestions are applied. Are we waiting for a certain approval?

Hi @DriesVanbilloen Could you try to push again? I don't see the updated JMX method in Github yet. (https://github.com/valtech/aem-easy-content-upgrade/pull/204#discussion_r1113290816 )