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

The plugin is not working on windows machine #1

Open
DevHussein opened this issue Oct 1, 2019 · 4 comments
Open

The plugin is not working on windows machine #1

DevHussein opened this issue Oct 1, 2019 · 4 comments

Comments

@DevHussein
Copy link

Dear Anand,

I was facing an issue in the plugin while doing "mvn clean install" for a project. It's failing at executeReadBar stage. After i do deep investigation I found out that the Process exiting with exitValue=1 due to not able to run the command on windows because of the command was not built properly it was like this:
"C:\Program Files\IBM\ACE\11.0.0.5\server\bin/mqsiprofile&&mqsireadbar -b C:\Users\myuser\IBM\ACET11\workspace\ExampleApp\target\ace\ExampleApp.bar -r"

I update the code in ValidateConfigurablePropertiesMojo class to build the command as bvelow way in in case of windows:
executable = "cd " + this.aceRunDir + " && mqsiprofile&&mqsireadbar";

[DEBUG] executing command file: C:\Users\myuser\AppData\Local\Temp\readbarCommand-2f8cf671-f074-4393-9746-21e265d7158a.cmd
[DEBUG] executeMqsiApplyBarOverride command: cd C:\Program Files\IBM\ACE\11.0.0.5\server\bin && mqsiprofile&&mqsiapplybaroverride -b C:\Users\myuser\IBM\ACET11\workspace\ExampleApp\target\ace\ExampleApp.bar -o C:\Users\myuser\IBM\ACET11\workspace\ExampleApp\target\ace\DEV_0.0.1-SNAPSHOT.bar -p C:\Users\myuser\IBM\ACET11\workspace\ExampleApp\properties\DEV.properties -k ExampleApp -r -v C:\Users\myuser\IBM\ACET11\workspace\ExampleApp\target\applybaroverridetrace-DEV.txt

This is my observation and solution and the build was successful.
please your feedback.

Best regards,
Hussein

@awasthan
Copy link
Owner

awasthan commented Oct 7, 2019

@DevHussein
Hi Hussein,
Its probably happening due to a typo. For windows code snippet, please change the 'slash' to 'backward slash' at the line:
Current: executable = aceRunDir+"/mqsiprofile&&mqsiapplybaroverride";
It should be: executable = aceRunDir+"\mqsiprofile&&mqsiapplybaroverride";

This would be at few places. I have not tested this fix yet. Please test and let me know.

if (osName.contains("windows")){
cmdFile = new File(System.getProperty("java.io.tmpdir") + File.separator + "readbarCommand-" + UUID.randomUUID() + ".cmd");
cmdFile.deleteOnExit();
executable = aceRunDir+"/mqsiprofile&&mqsiapplybaroverride";

    }else if(osName.contains("linux")){
    	
    	executable = ". "+aceRunDir+"/mqsiprofile&&mqsiapplybaroverride";
    	
    }

@awasthan
Copy link
Owner

Please report if the fix worked

@danielechirivi
Copy link

I had the same problem, changed those lines and it worked.

@awasthan
Copy link
Owner

awasthan commented Oct 15, 2020

@danielechirivi You can get the documentation and plugin at this location now:
https://github.com/ot4i/ace-maven-plugin

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

No branches or pull requests

3 participants