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

Enable absolute path to genconf in command line arguments. #40

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

dsryzhov
Copy link

@dsryzhov dsryzhov commented Apr 2, 2024

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.

@ylussaud ylussaud merged commit 2d39213 into ObeoNetwork:master Apr 3, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants