Bug 499497 - Acceleo Equinox launcher does not return an error code
Summary: Acceleo Equinox launcher does not return an error code
Status: RESOLVED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Maven (show other bugs)
Version: 3.6.0   Edit
Hardware: All All
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-10 07:35 EDT by Elie Richa CLA
Modified: 2016-09-15 11:34 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elie Richa CLA 2016-08-10 07:35:15 EDT
Hi,

I'm using the new Equinox launcher to launch an Acceleo generation from Maven.

It seems that not all errors cause an error code to be returned. In such situations Maven does not detect that an error occurred.

For example, if the given input file does not exist, an error message is displayed but no error code is returned.

Checking out the code in http://git.eclipse.org/c/acceleo/org.eclipse.acceleo.git/tree/plugins/org.eclipse.acceleo.equinox.launcher/src/org/eclipse/acceleo/equinox/AcceleoLauncher.java I notice that APPLICATION_ERROR is returned only in the case of invalid command line arguments.

The logic should be refactored such that all errors cause APPLICATION_ERROR to be returned so that the calling entity is notified of the failure.

Regards,
Elie
Comment 1 Cedric Brun CLA 2016-08-30 08:21:37 EDT
Hi,

good catch, indeed that's an oversight which could bring an interesting improvement !

We'll try to schedule this for the next release but I'm not sure right now to have the bandwith in the next few weeks.
That being said that's also an excellent candidate for a contribution so feel free to submit a patchset if you are interested to fix this, once it's integrated you should be able to easily point to the nightly or milestone update-site and use this fix in your continuous integration.

Thanks for your feedback !
Comment 2 Eclipse Genie CLA 2016-09-14 12:01:25 EDT
New Gerrit change created: https://git.eclipse.org/r/81110
Comment 4 Cedric Brun CLA 2016-09-15 11:34:49 EDT
This is now fixed and will be in the next release. 

You can use it right away using this update-site:

http://download.eclipse.org/acceleo//updates/nightly/3.6.5.201609151523


Cheers and thanks again for your feedback!