NetBeans build error

Developers forum for Univeral Media Server-related development (only for programmers)
Post Reply
Executioner
Posts: 13
Joined: Mon Jun 15, 2015 1:34 pm

NetBeans build error

Post by Executioner » Tue Jun 30, 2015 10:16 am

I'm having an issue with Netbeans trying to build UMS:

Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.1.15:revision (default) on project ums: The plugin pl.project13.maven:git-commit-id-plugin:2.1.15 requires Maven version [3.1.1,) -> [Help 1]

I'm going to try simply using a newer Maven release in NetBeans, hopefully that'll solve the issue.

Executioner
Posts: 13
Joined: Mon Jun 15, 2015 1:34 pm

Re: NetBeans build error

Post by Executioner » Tue Jun 30, 2015 7:51 pm

Upgraded Maven in NB and all worked (after copying cmd files to bat)

michaelt
Posts: 155
Joined: Tue Feb 03, 2015 11:18 am
Location: lost in the depths of my mind

Re: NetBeans build error

Post by michaelt » Tue Jan 03, 2017 10:21 am

Executioner wrote:Upgraded Maven in NB and all worked (after copying cmd files to bat)
I ran into this exact error when upgrading from OS X 10.7 to 10.11 and NB 8.2:

Code: Select all

--- maven-enforcer-plugin:1.4:enforce (enforce-java) @ ums ---
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 2.406s
Finished at: Mon Jan 02 13:56:09 EST 2017
Final Memory: 17M/619M
------------------------------------------------------------------------
Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.1.15:revision (default) on project ums: The plugin pl.project13.maven:git-commit-id-plugin:2.1.15 requires Maven version [3.1.1,) -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
Searched a lot, found a lot but nothing fixed it.

Can someone please be more detailed on how to do this on El Capitan+:
Upgraded Maven in NB
and:
copying cmd files to bat
MacPro5,1 - 2.8 GHz, 32 GB, 20TB, OS X 10.11.6,
. . . . and a few others.
Samsung UN55C8000
Home Theater (WIP): OS X based now, dedicated Linux later.

Nadahar
Posts: 1232
Joined: Tue Jun 09, 2015 5:57 pm

Re: NetBeans build error

Post by Nadahar » Tue Jan 03, 2017 12:09 pm

I haven't used NetBeans for maany years, and I don't use OS X - so I can't give you anything specific, but: Maven is independent from NetBeans. The error simply states that your Maven version is too old. To check which Maven version you have, run "mvn -v" from a terminal window. As the error states, it must be version 3.1.1 or newer.

michaelt
Posts: 155
Joined: Tue Feb 03, 2015 11:18 am
Location: lost in the depths of my mind

Re: NetBeans build error

Post by michaelt » Tue Jan 03, 2017 4:02 pm

Nadahar wrote:... To check which Maven version you have, run "mvn -v" from a terminal window. As the error states, it must be version 3.1.1 or newer.
Yup - "mvn -v" reports the latest v3.3.1 but NB still fails.

Murphy is still around: after my previous post I continued the search through the OSX-NB-maven posts.
Finally I hit the "right" one: NB configuration
NB > Preferences(Options) > Java > Maven > Maven Home: Browse <select> < Open > Apply > OK
That's it. It worked!
Screen Shot 2017-01-02 at 10.45.07 PM.png
Screen Shot 2017-01-02 at 10.45.07 PM.png (73.97 KiB) Viewed 1884 times
I chose to use a symlink pointing to it:

Code: Select all

$ sudo ln -s apache-maven-3.3.1 /usr/local/maven 
$ ls -l /usr/local/maven
lrwxr-xr-x  1 root  wheel  18 Jan  2 19:56 /usr/local/maven -> apache-maven-3.3.1
It allows updating or regressing by just changing the link and not the NB Preferences, done in the terminal (iTerm) ksh .profile script as a new window is opened.

Code: Select all

##################################################################
# Set/Update Maven SymLinks & env:
MSL=apache-maven-3.1.1
MSL=apache-maven-3.2.5
MSL=apache-maven-3.3.1
MSL=apache-maven-3.3.9
# NOTE: with the advent of SIP in 10.11 we can no longer modify anything in "/usr/share" easily!
#       Solution: move link to: /usr/local/maven (a modifable link)
ULM="/usr/local/maven"        # Generic Modifable link
ULMT="$MSL"                   #   Specific Target
if [[ ! -e "$ULM" ]] ; then
    printf "***Create link: \"$ULM\" -> \"$ULMT\"\n"
    sudo ln -s "$ULMT" "$ULM"
  elif [[ $(stat -f %Y "$ULM") != "$ULMT" ]] ; then
    # Update "/usr/local/maven" symlink:
    printf "*** Change \"%s\" : \"%s\" => \"%s\"\n" "$ULM" "$(stat -f %Y "$ULM")" "$ULMT"
    sudo rm "$ULM"              # Remove first ("sudo ln -sf" don't work)
    sudo ln -s "$ULMT" "$ULM"   # Create it
    fi
export M2_HOME=/usr/local/$MSL
unset MSL USM USMT ULM ULMT
export M2=$M2_HOME/bin
# Set PATH for Apache Maven & Homebrew:
export PATH=$PATH:$M2
I'll create a new topic for this and other HowTo's for building Mac OS X targets.

Edit: updated to maven 3.3.9 - works fine.
Last edited by michaelt on Wed Jan 04, 2017 11:43 am, edited 1 time in total.
MacPro5,1 - 2.8 GHz, 32 GB, 20TB, OS X 10.11.6,
. . . . and a few others.
Samsung UN55C8000
Home Theater (WIP): OS X based now, dedicated Linux later.

Nadahar
Posts: 1232
Joined: Tue Jun 09, 2015 5:57 pm

Re: NetBeans build error

Post by Nadahar » Wed Jan 04, 2017 5:33 am

Thanks for documenting it for others!

Post Reply