Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.

Fixing issues on Solaris 10 (Sparc) #40

Merged
merged 1 commit into from Apr 17, 2017
Merged

Fixing issues on Solaris 10 (Sparc) #40

merged 1 commit into from Apr 17, 2017

Conversation

rpelisse
Copy link

Issue: JBEAP-8937

It was a bit painful to get to this point, so here is some clarification / explanation:

1) Current master is not "Solaris" proof (see Build #22 - if you have access to it)

So first of all, I can confirm that the master of maven-wrapper
0085e9f9....a6 is not passing on both on Solaris 10 and 11, for two different reasons.

On Solaris 11, apparently the keyword 'local' is not recognized:

+ ./mvnw clean install
08:06:28 ./mvnw[175]: local: not found [No such file or directory]
08:06:28 ./mvnw[176]: local: not found [No such file or directory]
08:06:28 Build step 'Execute shell' marked build as failure

Here is a snippet of the code not being recognized by the Solaris interpreter:

local basedir="$1"
local wdir="$1"
while [ "$wdir" != '/' ] ; do

On Solaris 10, we are running in our now familliar substituion issue (see JBEAP-8937) - but on a different line:

08:06:31 + ./mvnw clean install
08:06:32 ./mvnw: syntax error at line 182: `wdir=$' unexpected

Here is a snippet of the code being not recognized in Solaris 10:

wdir=$(cd "$wdir/.."; pwd)

Note:

  • So, yes, 'local' appears to work on Solaris 10, but fails on Solaris 11. No comment.
  • Builds on Solaris 10 and 11 with x86_64 have no issues.

2) Removes local and switch substitution to backtick (Build #25)

This fixed the build on Solaris 11, but Solaris 10 stil chocked on the substituion:

./mvnw: syntax error at line 182: wdir=$' unexpected`

Note: On Solaris 11, Maven fails to download some dependencies, but script fully works and does fire mvn, so, for the matter at hands, it works.

3) Adding a surrounding - useless, 'if' statement - as it appears to have work for JBEAP-8937 (See Build #35 - if you have access to it)

Again, the builds are failing, but after passing through the mvnw script, due to a failed download which has corrupted the associated maven repo.

Note that I have removed the change coming from PR39 because it's not compatible with the current state of mvnw.

@mosabua I would recommend using PMD or Checkstyle (or something similar) to check that nobody is introducing again the 'local' parameters (which is a shame, but as long as the plan is to somehow support Solaris 10 &11...)

- removed use of 'local' for Solaris 11
- switched $() to  ...
@mosabua
Copy link
Member

mosabua commented Apr 13, 2017

This is awesome. Thanks a lot for the detailed analysis and help. I will merge this and release a new wrapper in the next days.

@ppalaga
Copy link

ppalaga commented Apr 15, 2017

@rpelisse thanks a lot for taking this over!

@mosabua mosabua merged commit 12c5bd6 into takari:master Apr 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants