I recommended use Homebrew to install maven:
brew install maven
szturchać i regularnie uderzać sierpowym
Installing with Homebrew
-- Updating brew: brew update -- Adding the casks tap: brew tap homebrew/cask-versions -- Adding AdoptOpenJDK (https://adoptopenjdk.net/ and https://github.com/AdoptOpenJDK/homebrew-openjdk): brew tap adoptopenjdk/openjdk -- Looking for java versions: brew search java -- Looking for AdoptOpenJDK versions: brew search jdk -- Checking the details on the java version that will be installed: brew cask info java -- Checking the details on the AdoptOpenJDK version that will be installed: brew cask info jdk -- Installing current version java: brew cask install java -- Installing specific version of AdoptOpenJDK: brew install --cask adoptopenjdk12
Where is my java?
/usr/libexec/java_home -V
Switching java version using .bash_profile:
export JAVA_8_HOME=$(/usr/libexec/java_home -v1.8) export JAVA_9_HOME=$(/usr/libexec/java_home -v9) export JAVA_10_HOME=$(/usr/libexec/java_home -v10) export JAVA_11_HOME=$(/usr/libexec/java_home -v11) export JAVA_12_HOME=$(/usr/libexec/java_home -v12) export JAVA_13_HOME=$(/usr/libexec/java_home -v13) alias java8='export JAVA_HOME=$JAVA_8_HOME' alias java9='export JAVA_HOME=$JAVA_9_HOME' alias java10='export JAVA_HOME=$JAVA_10_HOME' alias java11='export JAVA_HOME=$JAVA_11_HOME' alias java12='export JAVA_HOME=$JAVA_12_HOME' alias java13='export JAVA_HOME=$JAVA_13_HOME' # default to Java 13 java13source: https://stackoverflow.com/questions/52524112/how-do-i-install-java-on-mac-osx-allowing-version-switching
Installing Java17
source: https://java.tutorials24x7.com/blog/how-to-install-openjdk-17-on-macFOR ACTION SEND ⌘← "SEND HEX CODE" 0x01 ⌘→ "SEND HEX CODE" 0x05 ⌥← "SEND ESC SEQ" b ⌥→ "SEND ESC SEQ" f
get container id: docker ps dump server list: docker exec -it {container id} python setup.py --dump-servers servers.json --user {user} get server list: docker cp {container id}:/pgadmin4/servers.json servers.json
launch pgadmin: docker run -p 801:80 --name pgadmin \ -e "PGADMIN_DEFAULT_EMAIL={user}" \ -e "PGADMIN_DEFAULT_PASSWORD={pass}" \ -d dpage/pgadmin4 get container id: docker ps copy server list into container: docker cp {container id}:/tmp/servers.json import server list: docker exec -it {container id} python setup.py --load-servers servers.json --user {user}
source: https://www.pgadmin.org/docs/pgadmin4/latest/import_export_servers.html
final class BigDecimalConverter { private final static Logger logger = LoggerFactory.getLogger(BigDecimalConverter.class); private static final int SCALE = 2; static String convertToString(BigDecimal bigDecimal) { if (bigDecimal == null) { return null; } logger.info("Rounding bigDecimal {} into scale {}", bigDecimal, SCALE); return bigDecimal.setScale(SCALE, RoundingMode.HALF_UP).toString(); } }BigDecimalXmlAdapter class:
public class BigDecimalXmlAdapter extends XmlAdapterpackage-info.java file:{ private final static Logger logger = LoggerFactory.getLogger(BigDecimalXmlAdapter.class); @Override public BigDecimal unmarshal(String s) { logger.info("Unmarshal String: {}", s); try { return new BigDecimal(s); } catch (NumberFormatException e) { return null; } } @Override public String marshal(BigDecimal bigDecimal) { logger.info("Marshal BigDecimal {}", bigDecimal); return BigDecimalConverter.convertToString(bigDecimal); } }
@javax.xml.bind.annotation.XmlSchema(namespace = "http://app.host.pl/api/types", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) @javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters({ @javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter(value = pl.marceen.soap.control.BigDecimalXmlAdapter.class, type = java.math.BigDecimal.class) }) package pl.host.app.api.types;