Does Ubuntu 22.04 offer a recent version of Maven - maven

I just upgraded Ubuntu from 18.04 to 22.04 and when I run mvn --version is still see:
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.15, vendor: Private Build, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.15.0-1013-aws", arch: "amd64", family: "unix"
which is almost a 2 years old version.
I would like to avoid a manual install and keep using apt to manage the installation of maven. Am I asking for too much or did I miss something?

Running Ubuntu 22.10:
mvn -v
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 17.0.4, vendor: Private Build, runtime: /usr/lib/jvm/java-17-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.19.0-15-generic", arch: "amd64", family: "unix"

Related

Failure to build any conda package on MAC OS

When building any conda recipie on my macOS (High Sierra, version 10.13.6), I get the following error:
OSError: dlopen(/anaconda3/bin/../lib/libarchive.dylib, 6): Library not loaded: #rpath/libxml2.2.dylib Referenced from: /anaconda3/lib/libarchive.13.dylib
Reason: Incompatible library version: libarchive.dylib requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0
I have done the following:
Downloaded and installed https://repo.anaconda.com/archive/Anaconda3-2019.03-MacOSX-x86_64.pkg.
updated conda: conda update conda
installed conda-build: conda install conda-build
then tried building conda recipe: conda install .
I get this error when building any recipe, for the sake of example, here is the one i am trying:
package:
name: cmake
version: 3.2.3
source:
fn: cmake-3.2.3.tar.gz [not win]
url: http://www.cmake.org/files/v3.2/cmake-3.2.3.tar.gz [not win]
build:
number: 0
requirements:
build:
run:
about:
home: http://www.cmake.org
license: BSD 3-clause
build.sh contains:
#!/bin/bash
./bootstrap --prefix=$PREFIX
make
make install

Target Exec command not found - ASP.NET Core project in Visual Studio for macOS

In .NET core .csproj file there is following target:
<Target Name="PreBuild" AfterTargets="PreBuildEvent">
<Exec Command="dotnet bundle clean" />
<Exec Command="dotnet bundle" />
</Target>
I would have thought this should successfully run the commands as those commands are correct for .NET core CLI on macOS.
However it causes following build error:
Target PreBuild:
dotnet bundle clean
No executable found matching command "dotnet-bundle"
Why is it trying to execute 'dotnet-bundle' and not 'dotnet bundle'?
The project was originally developed on Windows and I only ran into this problem after trying to get it up and running on macOS. But as far as I know, it should be possible.
dotnet --info output on macOS:
.NET Core SDK (reflecting any global.json):
Version: 2.1.500
Commit: b68b931422
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.14
OS Platform: Darwin
RID: osx.10.14-x64
Base Path: /usr/local/share/dotnet/sdk/2.1.500/
Host (useful for support):
Version: 2.1.6
Commit: 3f4f8eebd8
.NET Core SDKs installed:
2.0.0 [/usr/local/share/dotnet/sdk]
2.1.4 [/usr/local/share/dotnet/sdk]
2.1.500 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

not able to downgrade from maven 3.5.2 to maven 3.0.4 : No available formula with the name "maven30"

I have uninstalled maven using
brew uninstall maven
and tried to install it again using
brew install maven30
but I got this error
brew install maven30
Error: No available formula with the name "maven30"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
==> Searching local taps...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: curl is not executable
however when I use brew install maven it got downloaded and installed as well
brew install maven
==> Downloading https://www.apache.org/dyn/closer.cgi?path=maven/maven-3/3.5.2/b
Already downloaded: /Users/amar/Library/Caches/Homebrew/maven-3.5.2.tar.gz
🍺 /usr/local/Cellar/maven/3.5.2: 104 files, 10.1MB, built in 3 seconds
so why I am getting curl is not executable in maven30
I also tried
brew tap homebrew/versions
Warning: homebrew/versions was deprecated. This tap is now empty as all its formulae were migrated.
I downloaded the mvn zip file for 3.0.4 from here and then executed mvn command located in bin file as shown below
amar#admin:~/Downloads/apache-maven-3.0.4$ tree -L 2
├── LICENSE.txt
├── NOTICE.txt
├── README.txt
├── bin
│   ├── m2.conf
│   ├── mvn
│   ├── mvn.bat
│   ├── mvnDebug
│   ├── mvnDebug.bat
│   └── mvnyjp
Now go the bin folder and query for version
amar#admin:~/Downloads/apache-maven-3.0.4/bin$ ./mvn -v
Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
Maven home: /Users/amar/Downloads/apache-maven-3.0.4
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre
Default locale: en_CA, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.2", arch: "x86_64", family: "mac"
Now it is working fine, another step is to uninstall the current version and unlink it as well using brew uninstall maven and brew unlink maven
now you can add the path of your current maven binary in bash_profile and sourced it. below is the example
export M2_HOME=/Users/amar/Downloads/apache-maven-3.0.4
export PATH=$PATH:$M2_HOME/bin
try checking version again, it worked for me
amar#admin:~$ mvn -v
Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
Maven home: /Users/amar/Downloads/apache-maven-3.0.4
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre
Default locale: en_CA, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.2", arch: "x86_64", family: "mac"
amar#admin:~$

How to fix permission denied issue in tavis build

I am trying to integrate my java project build with gradle with sonarqube add-on in travis below is my script, when I commit anything travis build is getting triggered but it is failed with permission denied error. How to get past this error?
language: java
sudo: false
install: true
addons:
sonarqube:
token:
secure: "q2nz2BsoZpki0kNkvieSv3UVBu0O93kOXzcyYcRBrz7QTchJ8ma5WDX/ZMAYiC2BZDZDXWSO7mh88pbWUpRPUgsmU1hRTUltRUPqUv2RIlfy88eZefdCLGRfOiDpvrBVBCROiBygQMO1VPj4b3NSxjYwK7I89a5IS8UuYc2DLM+7yv5xLOLLjmK42HU28Z/5TNjjHKaPjY6Oem5H5KHf5CP3ZMqrSkSn4dvQIIowmOISlgbc0TYBTBiJnpwTwfgyS1oPjkMhwMvGxGoPZONIsmUBEH+kZSJMTomM+HS3YoAai4ZuFOodr5H+b2LItSBPXMBQV4DRX3QTW2On4Oz+UnLK2w9QBZ0KgE1dJqPD/y8N4jbs6ef2xBhviWYeAn+NMg1pluq/1VmUbsm7J0ocsSzilQpkMFYreIHZtIDluvLogBznzw2CSRUMhZg2fq+DFydLMvLFhxjbI8z9F7+IVl2P0NAUuh3fKqZAXshPN2Sofp+PfEP4VLyv6EhBonjngIbnNB5fOEyUW1a6QwT7IABDV3dD7kFYyoPAdekMpEFzwlljZjimCa6e7OPW1Lo9vv8CpSz4ggqXzf8hjleJkJ3XnEfM7h2dv943/aCS1wE5K4641rr5klrbIJk+/pmiCmBON/ccpbbV1eLpDnFLai1rCnstIH0j7Dz2L6BOJYY="
jdk:
- oraclejdk8
script:
- ./gradlew sonarqube
cache:
directories:
- '$HOME/.m2/repository'
- '$HOME/.sonar/cache'
- '$HOME/.gradle'
- '.gradle'
notifications:
email: false
My Log
Worker information
hostname: ip-10-12-6-59:ef24a578-e5d1-4580-a6a8-03124000caa1
version: v2.5.0-8-g19ea9c2 https://github.com/travis-ci/worker/tree/19ea9c20425c78100500c7cc935892b47024922c
instance: 03a5439:travis:java
startup: 2.389915121s
Build system information
Build language: java
Build group: stable
Build dist: precise
Build id: 186641574
Job id: 186641575
travis-build version: 7cac7d393
Build image provisioning date and time
Thu Feb 5 15:09:33 UTC 2015
Operating System Details
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
Linux Version
3.13.0-29-generic
Cookbooks Version
a68419e https://github.com/travis-ci/travis-cookbooks/tree/a68419e
GCC version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
LLVM version
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Pre-installed Ruby versions
ruby-1.9.3-p551
Pre-installed Node.js versions
v0.10.36
Pre-installed Go versions
1.4.1
Redis version
redis-server 2.8.19
riak version
2.0.2
MongoDB version
MongoDB 2.4.12
CouchDB version
couchdb 1.6.1
Neo4j version
1.9.4
RabbitMQ Version
3.4.3
ElasticSearch version
1.4.0
Installed Sphinx versions
2.0.10
2.1.9
2.2.6
Default Sphinx version
2.2.6
Installed Firefox version
firefox 31.0esr
PhantomJS version
1.9.8
ant -version
Apache Ant(TM) version 1.8.2 compiled on December 3 2011
mvn -version
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00)
Maven home: /usr/local/maven
Java version: 1.7.0_76, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "3.13.0-29-generic", arch: "amd64", family: "unix"
$ export DEBIAN_FRONTEND=noninteractive
W: Size of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise-updates_restricted_binary-amd64_Packages.gz is not what the server reported 19576 20785
W: Size of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise-updates_restricted_binary-i386_Packages.gz is not what the server reported 19521 20707
W: Size of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise-backports_multiverse_source_Sources.gz is not what the server reported 5886 5888
W: Size of file /var/lib/apt/lists/ppa.launchpad.net_travis-ci_zero-mq_ubuntu_dists_precise_main_binary-amd64_Packages.gz is not what the server reported 832 1195
W: Size of file /var/lib/apt/lists/ppa.launchpad.net_ubuntugis_ppa_ubuntu_dists_precise_main_binary-amd64_Packages.gz is not what the server reported 33653 36677
W: Size of file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-amd64_Packages.gz is not what the server reported 13782 14904
W: Size of file /var/lib/apt/lists/ppa.launchpad.net_ubuntugis_ppa_ubuntu_dists_precise_main_binary-i386_Packages.gz is not what the server reported 33699 36733
W: Size of file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-i386_Packages.gz is not what the server reported 13751 14885
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
libc-bin libc-dev-bin libc6-dev
Suggested packages:
glibc-doc
The following packages will be upgraded:
libc-bin libc-dev-bin libc6 libc6-dev
4 upgraded, 0 newly installed, 0 to remove and 267 not upgraded.
Need to get 8,840 kB of archives.
After this operation, 14.3 kB disk space will be freed.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc6-dev amd64 2.15-0ubuntu10.15 [2,943 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc-dev-bin amd64 2.15-0ubuntu10.15 [84.7 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc-bin amd64 2.15-0ubuntu10.15 [1,177 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc6 amd64 2.15-0ubuntu10.15 [4,636 kB]
Fetched 8,840 kB in 0s (30.7 MB/s)
Preconfiguring packages ...
(Reading database ... 72019 files and directories currently installed.)
Preparing to replace libc6-dev 2.15-0ubuntu10.10 (using .../libc6-dev_2.15-0ubuntu10.15_amd64.deb) ...
Unpacking replacement libc6-dev ...
Preparing to replace libc-dev-bin 2.15-0ubuntu10.10 (using .../libc-dev-bin_2.15-0ubuntu10.15_amd64.deb) ...
Unpacking replacement libc-dev-bin ...
Preparing to replace libc-bin 2.15-0ubuntu10.10 (using .../libc-bin_2.15-0ubuntu10.15_amd64.deb) ...
Unpacking replacement libc-bin ...
Processing triggers for man-db ...
Setting up libc-bin (2.15-0ubuntu10.15) ...
(Reading database ... 72018 files and directories currently installed.)
Preparing to replace libc6 2.15-0ubuntu10.10 (using .../libc6_2.15-0ubuntu10.15_amd64.deb) ...
Unpacking replacement libc6 ...
Setting up libc6 (2.15-0ubuntu10.15) ...
Setting up libc-dev-bin (2.15-0ubuntu10.15) ...
Setting up libc6-dev (2.15-0ubuntu10.15) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
$ git clone --depth=50 --branch=master https://github.com/rajadilipkolli/secure-ecommerce.git rajadilipkolli/secure-ecommerce
Cloning into 'rajadilipkolli/secure-ecommerce'...
remote: Counting objects: 97, done.
remote: Compressing objects: 100% (79/79), done.
remote: Total 97 (delta 35), reused 59 (delta 1), pack-reused 0
Unpacking objects: 100% (97/97), done.
Checking connectivity... done.
$ cd rajadilipkolli/secure-ecommerce
$ git checkout -qf 3a028e7b2153c3f2145e53095f7e763f9c4ee22b
This job is running on container-based infrastructure, which does not allow use of 'sudo', setuid and setguid executables.
If you require sudo, add 'sudo: required' to your .travis.yml
See https://docs.travis-ci.com/user/workers/container-based-infrastructure/ for details.
$ jdk_switcher use oraclejdk8
Switching to Oracle JDK8 (java-8-oracle), JAVA_HOME will be set to /usr/lib/jvm/java-8-oracle
$ export TERM=dumb
Setting up build cache
$ export CASHER_DIR=$HOME/.casher
$ Installing caching utilities
attempting to download cache archive
fetching master/cache-linux-precise-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--jdk-oraclejdk8.tgz
found cache
adding /home/travis/.m2/repository to cache
adding /home/travis/.sonar/cache to cache
creating directory /home/travis/.sonar/cache
adding /home/travis/.gradle to cache
creating directory /home/travis/.gradle
adding /home/travis/build/rajadilipkolli/secure-ecommerce/.gradle to cache
creating directory /home/travis/build/rajadilipkolli/secure-ecommerce/.gradle
repository is not yet cached
$ java -Xmx32m -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
$ javac -J-Xmx32m -version
javac 1.8.0_31
$ true
SonarQube addon
addon hash: 187bb90a8521235b4b8c8a4e70fb431b
Preparing SonarQube Scanner CLI
Archive: /home/travis/.sonarscanner/sonar-scanner.zip
creating: /home/travis/.sonarscanner/sonar-scanner-2.8/
inflating: /home/travis/.sonarscanner/sonar-scanner-2.8/bin/sonar-scanner.bat
inflating: /home/travis/.sonarscanner/sonar-scanner-2.8/bin/sonar-scanner-debug
inflating: /home/travis/.sonarscanner/sonar-scanner-2.8/lib/sonar-scanner-cli-2.8.jar
inflating: /home/travis/.sonarscanner/sonar-scanner-2.8/bin/sonar-scanner
inflating: /home/travis/.sonarscanner/sonar-scanner-2.8/conf/sonar-scanner.properties
inflating: /home/travis/.sonarscanner/sonar-scanner-2.8/bin/sonar-runner.bat
inflating: /home/travis/.sonarscanner/sonar-scanner-2.8/bin/sonar-runner
inflating: /home/travis/.sonarscanner/sonar-scanner-2.8/bin/sonar-scanner-debug.bat
$ export SONAR_SCANNER_HOME=$HOME/.sonarscanner/sonar-scanner-2.8
Not installing SonarSource build-wrapper because it's a Java or Javascript project
Preparing SonarQube Scanner parameters
$ ./gradlew sonarqube
/home/travis/build.sh: line 57: ./gradlew: Permission denied
The command "./gradlew sonarqube" exited with 126.
store build cache
nothing changed, not updating cache
Done. Your build exited with 1.
Looks like the file gradlew does not have the permission bit set. You can verify this by doing:
install:
- chmod +x gradlew
If this works out, you might want to set the permission bit in your repository and remove above configuration.

ionic : console.log not showing in xcode with cordova 4.1.1

I use ionic and updated cordova to version 4.1.1 (from 3.9.2). Almost everything works fine but my console.log don't show up in xcode anymore.
Any Idea ?
$ ionic info :
Cordova CLI: 6.2.0
Gulp version: CLI version 1.2.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 1.0.1
Ionic CLI Version: 1.7.16
Ionic App Lib Version: 0.7.3
ios-deploy version: 1.8.2
ios-sim version: 4.1.1
OS: Mac OS X El Capitan
Node Version: v0.12.7
Xcode version: Xcode 7.3.1 Build version 7D1014
Update : installed plugin
$ ionic plugin list :
cordova-plugin-compat 1.0.0 "Compat"
cordova-plugin-console 1.0.3 "Console"
cordova-plugin-device 1.1.2 "Device"
cordova-plugin-geolocation 2.2.0 "Geolocation"
cordova-plugin-inappbrowser 1.4.0 "InAppBrowser"
cordova-plugin-splashscreen 3.2.2 "Splashscreen"
cordova-plugin-statusbar 2.1.3 "StatusBar"
cordova-plugin-whitelist 1.2.2 "Whitelist"
cordova-plugin-x-socialsharing 5.1.1 "SocialSharing"
phonegap-plugin-push 1.7.2 "PushPlugin"
Try adding cordova-plugin-console
cordova plugin add cordova-plugin-console
https://github.com/apache/cordova-plugin-console

Resources