Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove default value for imagesdir configuration. #296

Closed
2 tasks
sjoerdtalsma opened this issue Apr 13, 2017 · 9 comments · Fixed by #431
Closed
2 tasks

Remove default value for imagesdir configuration. #296

sjoerdtalsma opened this issue Apr 13, 2017 · 9 comments · Fixed by #431
Milestone

Comments

@sjoerdtalsma
Copy link
Contributor

sjoerdtalsma commented Apr 13, 2017

This default value ("images") caused some issues where documents were no longer able to specify an :imagesdir: attribute. For details, see the comments in #294, which has been resolved by at least making the default overridable.

What should happen for version 1.6.0:

  • Rename the setting from imagesDir to imagesdir to correspond to the attribute name.
  • Remove the default value from the maven plugin configuration as defaults (if any) should be specified by asciidoctor core and not the maven plugin.
@abelsromero abelsromero added this to the 1.6.0 milestone Apr 13, 2017
@abelsromero
Copy link
Member

Just for the record...

I run some -unsuccessful- tests to see if we can get IDE auto-completion for properties inside the <attributes> section while allowing to add any attribute freely.
In order to get some auto-completaion, instead of defining attributes as a Map<String, Object> inside the Mojo I created a custom class (called AttributesMap) that extended from HashMap<String,Object> and added a custom setImagesdir(String) method.
The results are:

  • It seems IntelliJ does not recognize properties inside classes in any way. It's the same for the resources block, it does not provide any help (opened a post to ask about it).
  • Eclipse does recognize them under some cases:
    It is able to recognize properties in normal beans provided the set method is present. No need to additional annotations.
    It does not recognize them when the class extends HashMap. That is, when AttributesMap only contains setters it works (shows the images property), as soon as I add the extends HasMap clause, eclipse does not provide any help.

@tsegismont
Copy link

@sjoerdtalsma
Copy link
Contributor Author

@tsegismont Thank you for the well-intended workaround. I was aware of it (see #294 😉) but was advised to open this issue to get it fixed properly for 1.6.0.

@tsegismont
Copy link

tsegismont commented May 22, 2017 via email

@mojavelinux
Copy link
Member

What's the verdict with this issue?

@abelsromero
Copy link
Member

Scheduled for 1.6.0 since it breaks backward compatibility.
Since there's not much on the maven side for 1.5.8, maybe if it makes sense to skip it and start working for 1.6.0.

@mojavelinux
Copy link
Member

Excellent. Though I would recommend that you start looking towards 2.0.0 (and semantic versioning) instead of 1.6.0. I'll be posting information on the list about this shortly, but the main message is, 2.0.0 is planned before the end of the year.

@gebezs
Copy link

gebezs commented Jun 8, 2019

I am using 1.6.0 and the {imagesdir} is still set to images.
Is this postponed or will the maven plugin behave differently in the future?
In case of removal will there be any backward compatible solution?
I am using the .asciidoctorconfig to make the Idea plugin behave as the Maven plugin.
Will the Maven plugin support the same config mechanism?

My .asciidoctorconfig config:

ifndef::imagesdir[:imagesdir: images]

@mojavelinux
Copy link
Member

I believe 2.0 is a good opportunity to change this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants