Enable absolute path to genconf in command line arguments. #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR concern with arguments handling when launching m2doc publishing from command line.
Currently it’s not possible to use absolute file path to genconf (file:///) .
It's possible to use only workspace path with current realization of M2DocCommandLine.
As a result it's not possible to launch publication without workspace creation and project import to it.
It's not good for use case when m2doc command line publishing is used in automatic scripts (in Jenkins for example)
In the current realization platform type “platform:/resource/” is added to the genconf file path provided in command line arguments
genconfs[0] = “platform:/resource/” + CommandLineArgumentHelper.getInstance().getFilePath();
This line needs to be changed to
genconfs[0] = CommandLineArgumentHelper.getInstance().getFilePath();
After that absolute path usage to genconf in command line arguments becomes also possible.
file:///publish/capella_project/genconfs/test.genconf
In this case -data arguments can point to non existing folder for new eclipse workspace or
to the existing one (event without projects imported).
When absolute path to genconf is used relative paths to aird and capella files should be used inside genconf file.
I've tested this modification.
Document with diargams was successfully published based on absolute path to genconf.
This modification has a side effects.
After this modification users should used “platform:/resource/” prefix in command line arguments to genconf file
when path is defined relative to workspace.
Previous workspace paths (without platform:/resource/) will not continue to work.
So this modification crashes existing command line API.
May be we need to add platform:/resource/ in the code in case file:/// is not used for genconf
to save current API.