美文网首页
MVN查看信息基础

MVN查看信息基础

作者: 明训 | 来源:发表于2021-04-11 18:58 被阅读0次

    背景说明

    Java编程中通常使用Maven作为构建工具,经常需要使用一些指令辅助解决项目中遇到的相关问题,这里针对日常使用到的命令做部分记录

    解决方案

    指定POM打包

    mvn -f C:\soft\ide\jet-brains\IntelliJIDEA2019.3\wk\xxx\pom.xml clean package
    

    打印合并POM

    输出有效POM,该文档的内容是超级POM和项目POM内容的合并

    mvn help:effective-pom
    

    mvn help:effective-pom -Doutput=EffectivePom.xml

    打印环境系统信息

    C:\Users\Administrator>mvn help:system
    
    C:\Users\Administrator>set MAVEN_OPTS= -Xms128m -Xmx1024m -Dfile.encoding=UTF-8
    [INFO] Scanning for projects...
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Maven Stub Project (No POM) 1
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- maven-help-plugin:3.2.0:system (default-cli) @ standalone-pom ---
    [INFO]
    ===============================================================================
    ========================= Platform Properties Details =========================
    ===============================================================================
    
    ===============================================================================
    System Properties
    ===============================================================================
    
    java.runtime.name=Java(TM) SE Runtime Environment
    sun.boot.library.path=C:\soft\java\env\jdk\jdk1.8.0_92\jre\bin
    java.vm.version=25.92-b14
    java.vm.vendor=Oracle Corporation
    maven.multiModuleProjectDirectory=C:\Users\Administrator
    java.vendor.url=http://java.oracle.com/
    path.separator=;
    guice.disable.misplaced.annotation.check=true
    java.vm.name=Java HotSpot(TM) 64-Bit Server VM
    file.encoding.pkg=sun.io
    user.script=
    user.country=CN
    sun.java.launcher=SUN_STANDARD
    sun.os.patch.level=
    java.vm.specification.name=Java Virtual Machine Specification
    user.dir=C:\Users\Administrator
    java.runtime.version=1.8.0_92-b14
    java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
    java.endorsed.dirs=C:\soft\java\env\jdk\jdk1.8.0_92\jre\lib\endorsed
    os.arch=amd64
    java.io.tmpdir=C:\Users\ADMINI~1\AppData\Local\Temp\
    line.separator=
    
    java.vm.specification.vendor=Oracle Corporation
    user.variant=
    os.name=Windows 10
    classworlds.conf=C:\soft\java\env\maven\apache-maven-3.3.9\bin\..\bin\m2.conf
    sun.jnu.encoding=GBK
    java.library.path=C:\soft\java\env\jdk\jdk1.8.0_92\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Docker\Docker\Resources\bin;C:\soft\install\msys64\mingw64\bin;C:\soft\install\msys64\usr\bin;C:\soft\install\msys64\mingw64\include;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\soft\java\env\jdk\jdk1.8.0_92\bin;C:\soft\java\env\jdk\jdk1.8.0_92\jre\bin;C:\soft\java\env\maven\apache-maven-3.3.9\bin;C:\soft\java\env\hadoop\hadoop-common-2.2.0-bin\bin;C:\Program Files\TortoiseSVN\bin;C:\soft\node\node-v8.11.2-win-x64;C:\soft\java\env\scala\scala-2.11.12\bin;C:\Users\Administrator\AppData\Roaming\npm;C:\soft\install\Git\cmd;C:\soft\install\TortoiseGit\bin;C:\Program Files (x86)\GNU\GnuPG\pub;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\soft\go\go1.13.1.windows-amd64\root\bin;C:\soft\go\go1.13.1.windows-amd64\path\bin;C:\soft\java\env\gradle\gradle-4.10\bin;C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\Administrator\AppData\Local\Programs\Python\Python37\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;;.
    java.specification.name=Java Platform API Specification
    java.class.version=52.0
    sun.management.compiler=HotSpot 64-Bit Tiered Compilers
    os.version=10.0
    user.home=C:\Users\Administrator
    user.timezone=Asia/Shanghai
    java.awt.printerjob=sun.awt.windows.WPrinterJob
    java.specification.version=1.8
    file.encoding=UTF-8
    user.name=Administrator
    java.class.path=C:\soft\java\env\maven\apache-maven-3.3.9\bin\..\boot\plexus-classworlds-2.5.2.jar
    java.vm.specification.version=1.8
    sun.arch.data.model=64
    java.home=C:\soft\java\env\jdk\jdk1.8.0_92\jre
    sun.java.command=org.codehaus.plexus.classworlds.launcher.Launcher help:system
    java.specification.vendor=Oracle Corporation
    user.language=zh
    awt.toolkit=sun.awt.windows.WToolkit
    java.vm.info=mixed mode
    java.version=1.8.0_92
    java.ext.dirs=C:\soft\java\env\jdk\jdk1.8.0_92\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
    sun.boot.class.path=C:\soft\java\env\jdk\jdk1.8.0_92\jre\lib\resources.jar;C:\soft\java\env\jdk\jdk1.8.0_92\jre\lib\rt.jar;C:\soft\java\env\jdk\jdk1.8.0_92\jre\lib\sunrsasign.jar;C:\soft\java\env\jdk\jdk1.8.0_92\jre\lib\jsse.jar;C:\soft\java\env\jdk\jdk1.8.0_92\jre\lib\jce.jar;C:\soft\java\env\jdk\jdk1.8.0_92\jre\lib\charsets.jar;C:\soft\java\env\jdk\jdk1.8.0_92\jre\lib\jfr.jar;C:\soft\java\env\jdk\jdk1.8.0_92\jre\classes
    sun.stderr.encoding=ms936
    java.vendor=Oracle Corporation
    maven.home=C:\soft\java\env\maven\apache-maven-3.3.9\bin\..
    file.separator=\
    java.vendor.url.bug=http://bugreport.sun.com/bugreport/
    sun.cpu.endian=little
    sun.io.unicode.encoding=UnicodeLittle
    sun.stdout.encoding=ms936
    sun.desktop=windows
    sun.cpu.isalist=amd64
    
    ===============================================================================
    Environment Variables
    ===============================================================================
    
    CLASSWORLDS_JAR="C:\soft\java\env\maven\apache-maven-3.3.9\bin\..\boot\plexus-classworlds-2.5.2.jar"
    PSMODULEPATH=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
    COMMONPROGRAMW6432=C:\Program Files\Common Files
    PROGRAMW6432=C:\Program Files
    PROCESSOR_ARCHITECTURE=AMD64
    MSYS2_DIR=C:\soft\install\msys64
    CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
    HADOOP_HOME=C:\soft\java\env\hadoop\hadoop-common-2.2.0-bin
    PATH=C:\Program Files\Docker\Docker\Resources\bin;C:\soft\install\msys64\mingw64\bin;C:\soft\install\msys64\usr\bin;C:\soft\install\msys64\mingw64\include;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\soft\java\env\jdk\jdk1.8.0_92\bin;C:\soft\java\env\jdk\jdk1.8.0_92\jre\bin;C:\soft\java\env\maven\apache-maven-3.3.9\bin;C:\soft\java\env\hadoop\hadoop-common-2.2.0-bin\bin;C:\Program Files\TortoiseSVN\bin;C:\soft\node\node-v8.11.2-win-x64;C:\soft\java\env\scala\scala-2.11.12\bin;C:\Users\Administrator\AppData\Roaming\npm;C:\soft\install\Git\cmd;C:\soft\install\TortoiseGit\bin;C:\Program Files (x86)\GNU\GnuPG\pub;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\soft\go\go1.13.1.windows-amd64\root\bin;C:\soft\go\go1.13.1.windows-amd64\path\bin;C:\soft\java\env\gradle\gradle-4.10\bin;C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\Administrator\AppData\Local\Programs\Python\Python37\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;
    PROGRAMDATA=C:\ProgramData
    GOPATH=C:\soft\go\go1.13.1.windows-amd64\path
    WDIR=C:\
    SCALA_HOME=C:\soft\java\env\scala\scala-2.11.12
    SYSTEMROOT=C:\WINDOWS
    TMP=C:\Users\ADMINI~1\AppData\Local\Temp
    PROGRAMFILES(X86)=C:\Program Files (x86)
    EXEC_DIR=C:\Users\Administrator
    COMPUTERNAME=ljhan2
    OS=Windows_NT
    PROMPT=$P$G
    MAVEN_HOME=C:\soft\java\env\maven\apache-maven-3.3.9
    GRADLE_HOME=C:\soft\java\env\gradle\gradle-4.10
    WINDIR=C:\WINDOWS
    SYSTEMDRIVE=C:
    =::=::\
    COMSPEC=C:\WINDOWS\system32\cmd.exe
    DRIVERDATA=C:\Windows\System32\Drivers\DriverData
    =C:=C:\Users\Administrator
    HOMEDRIVE=C:
    LANG=zh_cn
    LDMS_LOCAL_DIR=C:\Program Files (x86)\LANDesk\LDClient\Data
    LOGONSERVER=\\ljhan2
    PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
    COMMONPROGRAMFILES=C:\Program Files\Common Files
    PROGRAMFILES=C:\Program Files
    COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files
    TEMP=C:\Users\ADMINI~1\AppData\Local\Temp
    NUMBER_OF_PROCESSORS=8
    USERDOMAIN=ljhan2
    M2_HOME=C:\soft\java\env\maven\apache-maven-3.3.9\bin\..
    HOME=C:\Users\Administrator
    LDMS_PREFERRED_SERVER=10.5.200.100
    PROCESSOR_LEVEL=6
    ERROR_CODE=0
    SESSIONNAME=Console
    USERNAME=Administrator
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    MAVEN_OPTS= -Xms128m -Xmx1024m -Dfile.encoding=UTF-8
    GOBIN=C:\soft\go\go1.13.1.windows-amd64\bin
    FPS_BROWSER_USER_PROFILE_STRING=Default
    C_INCLUDE_PATH=C:\soft\install\msys64\mingw64\include\pango-1.0\;C:\soft\install\msys64\mingw64\include\glib-2.0\;C:\soft\install\msys64\mingw64\lib\glib-2.0\include;C:\soft\install\msys64\mingw64\include\gdk-pixbuf-2.0\;C:\soft\install\msys64\mingw64\include\gtk-2.0\;C:\soft\install\msys64\mingw64\include\cairo;C:\soft\install\msys64\mingw64\lib\gtk-2.0\include\;C:\soft\install\msys64\mingw64\include\atk-1.0\;C:\soft\install\msys64\mingw64\include\gtk-2.0;C:\soft\install\msys64\mingw64\include\cairo;
    NODE_HOME=C:\soft\node\node-v8.11.2-win-x64
    FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer
    USERDOMAIN_ROAMINGPROFILE=ljhan2
    PUBLIC=C:\Users\Public
    ONEDRIVE=C:\Users\Administrator\OneDrive
    PROCESSOR_REVISION=8e0a
    USERPROFILE=C:\Users\Administrator
    APPDATA=C:\Users\Administrator\AppData\Roaming
    HOMEPATH=\Users\Administrator
    LOCALAPPDATA=C:\Users\Administrator\AppData\Local
    GOROOT=C:\soft\go\go1.13.1.windows-amd64\root
    JAVA_HOME=C:\soft\java\env\jdk\jdk1.8.0_92
    GOPROXY=https://goproxy.cn,direct
    GO111MODULE=on
    ALLUSERSPROFILE=C:\ProgramData
    PKG_CONFIG_PATH=C:\soft\install\msys64\mingw64\lib\pkgconfig
    MAVEN_CMD_LINE_ARGS=help:system
    CLASSPATH=.;C:\soft\java\env\jdk\jdk1.8.0_92\lib;C:\soft\java\env\jdk\jdk1.8.0_92\lib\tools.jar
    MAVEN_PROJECTBASEDIR=C:\Users\Administrator
    MAVEN_JAVA_EXE="C:\soft\java\env\jdk\jdk1.8.0_92\bin\java.exe"
    
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1.335 s
    [INFO] Finished at: 2020-01-16T15:07:26+08:00
    [INFO] Final Memory: 11M/155M
    [INFO] ------------------------------------------------------------------------
    
    C:\Users\Administrator>
    

    相关文章

      网友评论

          本文标题:MVN查看信息基础

          本文链接:https://www.haomeiwen.com/subject/czfzkltx.html