[Maven]install the jar file into local repository manualy

本文介绍如何使用Maven命令行工具将自定义的Jar包安装到本地仓库中。通过指定必要的参数,如文件路径、组ID、构件ID、版本号等,可以成功将Jar包及其POM文件安装至本地Maven仓库。

Use below command:


mvn install:install-file -Dfile=<your jar file path> -DgroupId=<group id like org.apache.commons> -DartifactId=<artifact id like commons-pool> -Dversion=<jar version number> -Dpackaging=jar -DgeneratePom=true

[root@yfw ~]# cd /opt/openfire [root@yfw openfire]# cat > install-sdk.sh << 'EOF' > #!/bin/bash > # > # Copyright (C) Jive Software, 2006-2022 > # > # Install the Openfire SDK into your local Maven repository. > # > > set -e > > # Check for required tools > if ! command -v mvn >/dev/null 2>&1; then > echo "Maven is required but not found. Please install Maven." > exit 1 > fi > > VERSION=$1 > if [ -z "$VERSION" ]; then > echo "Usage: $0 <version>" > echo "Example: $0 4.9.2" > exit 1 > fi > > REPO_DIR="$HOME/.m2/repository/org/igniterealtime/openfire/openfire/$VERSION" > > echo "Installing Openfire SDK version $VERSION..." > > # Create target directory > mkdir -p "$REPO_DIR" > > # Download openfire-${VERSION}.jar and openfire-${VERSION}-sources.jar > JAR_URL="https://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_${VERSION}.zip" > > echo "Downloading Openfire distribution package..." > TMP_ZIP=$(mktemp -t openfire-sdk-XXXXXX.zip) > wget -qO "$TMP_ZIP" "$JAR_URL" > > # Extract JAR and POM > unzip -p "$TMP_ZIP" openfire/lib/openfire.jar > "$REPO_DIR/openfire-$VERSION.jar" > unzip -p "$TMP_ZIP" openfire/lib/compile-only/pom.xml > "$REPO_DIR/openfire-$VERSION.pom" > > # Also install sources if available (optional) > if unzip -p "$TMP_ZIP" openfire/src/openfire_src.zip > /dev/null 2>&1; then > unzip -p "$TMP_ZIP" openfire/src/openfire_src.zip > "$REPO_DIR/openfire-$VERSION-sources.jar" > else > touch "$REPO_DIR/openfire-$VERSION-sources.jar" > fi > > # Cleanup > rm -f "$TMP_ZIP" > > echo "[INFO] SDK installed successfully at $REPO_DIR" > echo "[INFO] You can now build Openfire plugins using Maven." > EOF [root@yfw openfire]# [root@yfw openfire]# # 添加可执行权限 [root@yfw openfire]# chmod +x install-sdk.sh [root@yfw openfire]# ./install-sdk.sh 4.9.2 Maven is required but not found. Please install Maven. [root@yfw openfire]# ls ~/.m2/repository/org/igniterealtime/openfire/openfire/4.9.2/ ls: cannot access '/root/.m2/repository/org/igniterealtime/openfire/openfire/4.9.2/': No such file or directory [root@yfw openfire]#
最新发布
10-02
C:\Users\2506739>mvn dependency:tree -X Apache Maven 3.9.7 (8b094c9513efc1b9ce2d952b3b9c8eaedaf8cbf0) Maven home: D:\Program Files\apache-maven-3.9.7 Java version: 1.8.0_411, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jre-1.8 Default locale: zh_CN, platform encoding: GBK OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows" [DEBUG] Created new class realm maven.api [DEBUG] Importing foreign packages into class realm maven.api [DEBUG] Imported: javax.annotation.* < plexus.core [DEBUG] Imported: javax.annotation.security.* < plexus.core [DEBUG] Imported: javax.inject.* < plexus.core [DEBUG] Imported: org.apache.maven.* < plexus.core [DEBUG] Imported: org.apache.maven.artifact < plexus.core [DEBUG] Imported: org.apache.maven.classrealm < plexus.core [DEBUG] Imported: org.apache.maven.cli < plexus.core [DEBUG] Imported: org.apache.maven.configuration < plexus.core [DEBUG] Imported: org.apache.maven.exception < plexus.core [DEBUG] Imported: org.apache.maven.execution < plexus.core [DEBUG] Imported: org.apache.maven.execution.scope < plexus.core [DEBUG] Imported: org.apache.maven.graph < plexus.core [DEBUG] Imported: org.apache.maven.lifecycle < plexus.core [DEBUG] Imported: org.apache.maven.model < plexus.core [DEBUG] Imported: org.apache.maven.monitor < plexus.core [DEBUG] Imported: org.apache.maven.plugin < plexus.core [DEBUG] Imported: org.apache.maven.profiles < plexus.core [DEBUG] Imported: org.apache.maven.project < plexus.core [DEBUG] Imported: org.apache.maven.reporting < plexus.core [DEBUG] Imported: org.apache.maven.repository < plexus.core [DEBUG] Imported: org.apache.maven.rtinfo < plexus.core [DEBUG] Imported: org.apache.maven.settings < plexus.core [DEBUG] Imported: org.apache.maven.toolchain < plexus.core [DEBUG] Imported: org.apache.maven.usability < plexus.core [DEBUG] Imported: org.apache.maven.wagon.* < plexus.core [DEBUG] Imported: org.apache.maven.wagon.authentication < plexus.core [DEBUG] Imported: org.apache.maven.wagon.authorization < plexus.core [DEBUG] Imported: org.apache.maven.wagon.events < plexus.core [DEBUG] Imported: org.apache.maven.wagon.observers < plexus.core [DEBUG] Imported: org.apache.maven.wagon.proxy < plexus.core [DEBUG] Imported: org.apache.maven.wagon.repository < plexus.core [DEBUG] Imported: org.apache.maven.wagon.resource < plexus.core [DEBUG] Imported: org.codehaus.classworlds < plexus.core [DEBUG] Imported: org.codehaus.plexus.* < plexus.core [DEBUG] Imported: org.codehaus.plexus.classworlds < plexus.core [DEBUG] Imported: org.codehaus.plexus.component < plexus.core [DEBUG] Imported: org.codehaus.plexus.configuration < plexus.core [DEBUG] Imported: org.codehaus.plexus.container < plexus.core [DEBUG] Imported: org.codehaus.plexus.context < plexus.core [DEBUG] Imported: org.codehaus.plexus.lifecycle < plexus.core [DEBUG] Imported: org.codehaus.plexus.logging < plexus.core [DEBUG] Imported: org.codehaus.plexus.personality < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core [DEBUG] Imported: org.eclipse.aether.* < plexus.core [DEBUG] Imported: org.eclipse.aether.artifact < plexus.core [DEBUG] Imported: org.eclipse.aether.collection < plexus.core [DEBUG] Imported: org.eclipse.aether.deployment < plexus.core [DEBUG] Imported: org.eclipse.aether.graph < plexus.core [DEBUG] Imported: org.eclipse.aether.impl < plexus.core [DEBUG] Imported: org.eclipse.aether.installation < plexus.core [DEBUG] Imported: org.eclipse.aether.internal.impl < plexus.core [DEBUG] Imported: org.eclipse.aether.metadata < plexus.core [DEBUG] Imported: org.eclipse.aether.repository < plexus.core [DEBUG] Imported: org.eclipse.aether.resolution < plexus.core [DEBUG] Imported: org.eclipse.aether.spi < plexus.core [DEBUG] Imported: org.eclipse.aether.transfer < plexus.core [DEBUG] Imported: org.eclipse.aether.util < plexus.core [DEBUG] Imported: org.eclipse.aether.version < plexus.core [DEBUG] Imported: org.fusesource.jansi.* < plexus.core [DEBUG] Imported: org.slf4j.* < plexus.core [DEBUG] Imported: org.slf4j.event.* < plexus.core [DEBUG] Imported: org.slf4j.helpers.* < plexus.core [DEBUG] Imported: org.slf4j.spi.* < plexus.core [DEBUG] Populating class realm maven.api [DEBUG] Created adapter factory; available factories [file-lock, rwlock-local, semaphore-local, noop]; available name mappers [discriminating, file-gav, file-hgav, file-static, gav, static] [INFO] Error stacktraces are turned on. [DEBUG] Message scheme: color [DEBUG] Message styles: debug info warning error success failure strong mojo project [DEBUG] Reading global settings from D:\Program Files\apache-maven-3.9.7\conf\settings.xml [DEBUG] Reading user settings from C:\Users\2506739\.m2\settings.xml [DEBUG] Reading global toolchains from D:\Program Files\apache-maven-3.9.7\conf\toolchains.xml [DEBUG] Reading user toolchains from C:\Users\2506739\.m2\toolchains.xml [DEBUG] Using local repository at C:\Users\2506739\.m2\repository [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\Users\2506739\.m2\repository [INFO] Scanning for projects... [DEBUG] Extension realms for project org.apache.maven:standalone-pom:pom:1: (none) [DEBUG] Looking up lifecycle mappings for packaging pom from ClassRealm[plexus.core, parent: null] [DEBUG] Resolving plugin prefix dependency from [org.apache.maven.plugins, org.codehaus.mojo] [DEBUG] Creating adapter using nameMapper 'gav' and factory 'rwlock-local' [INFO] Artifact org.apache.maven.plugins:maven-clean-plugin:pom:3.2.0 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases)] [DEBUG] Resolving artifact org.apache.maven.plugins:maven-clean-plugin:pom:3.2.0 from [central (https://repo.maven.apache.org/maven2, default, releases)] [INFO] Artifact org.apache.maven.plugins:maven-clean-plugin:pom:3.2.0 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases)] [DEBUG] Resolving artifact org.apache.maven.plugins:maven-clean-plugin:pom:3.2.0 from [central (https://repo.maven.apache.org/maven2, default, releases)] [DEBUG] Using transporter HttpTransporter with priority 5.0 for https://repo.maven.apache.org/maven2 [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2 Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/3.2.0/maven-clean-plugin-3.2.0.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/3.2.0/maven-clean-plugin-3.2.0.pom (0 B at 0 B/s) [DEBUG] Writing tracking file 'C:\Users\2506739\.m2\repository\org\apache\maven\plugins\maven-clean-plugin\3.2.0\_remote.repositories' [DEBUG] Writing tracking file 'C:\Users\2506739\.m2\repository\org\apache\maven\plugins\maven-clean-plugin\3.2.0\maven-clean-plugin-3.2.0.pom.lastUpdated' [INFO] Artifact org.apache.maven.plugins:maven-plugins:pom:35 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases)] [DEBUG] Resolving artifact org.apache.maven.plugins:maven-plugins:pom:35 from [central (https://repo.maven.apache.org/maven2, default, releases)] [INFO] Artifact org.apache.maven.plugins:maven-plugins:pom:35 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases)] [DEBUG] Resolving artifact org.apache.maven.plugins:maven-plugins:pom:35 from [central (https://repo.maven.apache.org/maven2, default, releases)] [DEBUG] Using transporter HttpTransporter with priority 5.0 for https://repo.maven.apache.org/maven2 [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2 Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/35/maven-plugins-35.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/35/maven-plugins-35.pom (0 B at 0 B/s) [DEBUG] Writing tracking file 'C:\Users\2506739\.m2\repository\org\apache\maven\plugins\maven-plugins\35\_remote.repositories' [DEBUG] Writing tracking file 'C:\Users\2506739\.m2\repository\org\apache\maven\plugins\maven-plugins\35\maven-plugins-35.pom.lastUpdated' [INFO] Artifact org.apache.maven:maven-parent:pom:35 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases)] [DEBUG] Resolving artifact org.apache.maven:maven-parent:pom:35 from [central (https://repo.maven.apache.org/maven2, default, releases)] [INFO] Artifact org.apache.maven:maven-parent:pom:35 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases)] [DEBUG] Resolving artifact org.apache.maven:maven-parent:pom:35 from [central (https://repo.maven.apache.org/maven2, default, releases)] [DEBUG] Using transporter HttpTransporter with priority 5.0 for https://repo.maven.apache.org/maven2 [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2 Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/35/maven-parent-35.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/35/maven-parent-35.pom (0 B at 0 B/s) [DEBUG] Writing tracking file 'C:\Users\2506739\.m2\repository\org\apache\maven\maven-parent\35\_remote.repositories' [DEBUG] Writing tracking file 'C:\Users\2506739\.m2\repository\org\apache\maven\maven-parent\35\maven-parent-35.pom.lastUpdated' [INFO] Artifact org.apache:apache:pom:25 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases), apache.snapshots (https://repository.apache.org/snapshots, default, snapshots)] [DEBUG] Resolving artifact org.apache:apache:pom:25 from [central (https://repo.maven.apache.org/maven2, default, releases), apache.snapshots (https://repository.apache.org/snapshots, default, snapshots)] [INFO] Artifact org.apache:apache:pom:25 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases), apache.snapshots (https://repository.apache.org/snapshots, default, snapshots)] [DEBUG] Resolving artifact org.apache:apache:pom:25 from [central (https://repo.maven.apache.org/maven2, default, releases), apache.snapshots (https://repository.apache.org/snapshots, default, snapshots)] [DEBUG] Using transporter HttpTransporter with priority 5.0 for https://repo.maven.apache.org/maven2 [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2 Downloading from central: https://repo.maven.apache.org/maven2/org/apache/apache/25/apache-25.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/apache/25/apache-25.pom (0 B at 0 B/s) [DEBUG] Writing tracking file 'C:\Users\2506739\.m2\repository\org\apache\apache\25\_remote.repositories' [DEBUG] Writing tracking file 'C:\Users\2506739\.m2\repository\org\apache\apache\25\apache-25.pom.lastUpdated' [INFO] Artifact org.apache.maven.plugins:maven-clean-plugin:jar:3.2.0 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases)] [DEBUG] Resolving artifact org.apache.maven.plugins:maven-clean-plugin:jar:3.2.0 from [central (https://repo.maven.apache.org/maven2, default, releases)] [INFO] Artifact org.apache.maven.plugins:maven-clean-plugin:jar:3.2.0 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [central (https://repo.maven.apache.org/maven2, default, releases)] [DEBUG] Resolving artifact org.apache.maven.plugins:maven-clean-plugin:jar:3.2.0 from [central (https://repo.maven.apache.org/maven2, default, releases)] [DEBUG] Using transporter HttpTransporter with priority 5.0 for https://repo.maven.apache.org/maven2 [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2 Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/3.2.0/maven-clean-plugin-3.2.0.jar Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/3.2.0/maven-clean-plugin-3.2.0.jar (0 B at 0 B/s) [DEBUG] Writing tracking file 'C:\Users\2506739\.m2\repository\org\apache\maven\plugins\maven-clean-plugin\3.2.0\_remote.repositories' [DEBUG] Writing tracking file 'C:\Users\2506739\.m2\repository\org\apache\maven\plugins\maven-clean-plugin\3.2.0\maven-clean-plugin-3.2.0.jar.lastUpdated' [DEBUG] Resolved plugin prefix dependency to org.apache.maven.plugins:maven-dependency-plugin from POM org.apache.maven:standalone-pom:pom:1 [DEBUG] === REACTOR BUILD PLAN ================================================ [DEBUG] Project: org.apache.maven:standalone-pom:pom:1 [DEBUG] Tasks: [dependency:tree] [DEBUG] Style: Regular [DEBUG] ======================================================================= [INFO] [INFO] ------------------< org.apache.maven:standalone-pom >------------------- [INFO] Building Maven Stub Project (No POM) 1 [INFO] --------------------------------[ pom ]--------------------------------- [DEBUG] Resolving plugin prefix dependency from [org.apache.maven.plugins, org.codehaus.mojo] [DEBUG] Resolved plugin prefix dependency to org.apache.maven.plugins:maven-dependency-plugin from POM org.apache.maven:standalone-pom:pom:1 [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean] [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy] [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy] [DEBUG] === PROJECT BUILD PLAN ================================================ [DEBUG] Project: org.apache.maven:standalone-pom:1 [DEBUG] Dependencies (collect): [test] [DEBUG] Dependencies (resolve): [] [DEBUG] Repositories (dependencies): [central (https://repo.maven.apache.org/maven2, default, releases)] [DEBUG] Repositories (plugins) : [central (https://repo.maven.apache.org/maven2, default, releases)] [DEBUG] ----------------------------------------------------------------------- [DEBUG] Goal: org.apache.maven.plugins:maven-dependency-plugin:3.6.1:tree (default-cli) [DEBUG] Style: Regular [DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?> <configuration> <appendOutput default-value="false">${appendOutput}</appendOutput> <excludes>${excludes}</excludes> <includes>${includes}</includes> <outputEncoding default-value="${project.reporting.outputEncoding}">${outputEncoding}</outputEncoding> <outputFile>${outputFile}</outputFile> <outputType default-value="text">${outputType}</outputType> <project default-value="${project}"/> <projectRepos default-value="${project.remoteProjectRepositories}"/> <reactorProjects default-value="${reactorProjects}"/> <repoSession default-value="${repositorySystemSession}"/> <repositorySystemParam default-value="${repositorySystem}"/> <scope>${scope}</scope> <session default-value="${session}"/> <skip default-value="false">${skip}</skip> <tokens default-value="standard">${tokens}</tokens> <verbose default-value="false">${verbose}</verbose> </configuration> [DEBUG] ======================================================================= [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.074 s [INFO] Finished at: 2025-06-11T13:25:34+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.6.1:tree (default-cli): Goal requires a project to execute but there is no POM in this directory (C:\Users\2506739). Please verify you invoked Maven from the correct directory. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.6.1:tree (default-cli): Goal requires a project to execute but there is no POM in this directory (C:\Users\2506739). Please verify you invoked Maven from the correct directory. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:197) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:904) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:281) at org.apache.maven.cli.MavenCli.main (MavenCli.java:204) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source) at java.lang.reflect.Method.invoke (Unknown Source) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314) Caused by: org.apache.maven.lifecycle.MissingProjectException: Goal requires a project to execute but there is no POM in this directory (C:\Users\2506739). Please verify you invoked Maven from the correct directory. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:195) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:904) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:281) at org.apache.maven.cli.MavenCli.main (MavenCli.java:204) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source) at java.lang.reflect.Method.invoke (Unknown Source) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314) [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException [DEBUG] Shutting down adapter factory; available factories [file-lock, rwlock-local, semaphore-local, noop]; available name mappers [discriminating, file-gav, file-hgav, file-static, gav, static] [DEBUG] Shutting down 'file-lock' factory [DEBUG] Shutting down 'rwlock-local' factory [DEBUG] Shutting down 'semaphore-local' factory [DEBUG] Shutting down 'noop' factory
06-13
C:\Users\20182>mvn spring-boot:run -X Apache Maven 3.9.10 (5f519b97e944483d878815739f519b2eade0a91d) Maven home: D:\apache-maven-3.9.10-bin\apache-maven-3.9.10 Java version: 24.0.1, vendor: Oracle Corporation, runtime: D:\java Default locale: zh_CN, platform encoding: UTF-8 OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows" WARNING: A terminally deprecated method in sun.misc.Unsafe has been called WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/D:/apache-maven-3.9.10-bin/apache-maven-3.9.10/lib/guice-5.1.0-classes.jar) WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release [DEBUG] Created new class realm maven.api [DEBUG] Importing foreign packages into class realm maven.api [DEBUG] Imported: javax.annotation.* < plexus.core [DEBUG] Imported: javax.annotation.security.* < plexus.core [DEBUG] Imported: javax.inject.* < plexus.core [DEBUG] Imported: org.apache.maven.* < plexus.core [DEBUG] Imported: org.apache.maven.artifact < plexus.core [DEBUG] Imported: org.apache.maven.classrealm < plexus.core [DEBUG] Imported: org.apache.maven.cli < plexus.core [DEBUG] Imported: org.apache.maven.configuration < plexus.core [DEBUG] Imported: org.apache.maven.exception < plexus.core [DEBUG] Imported: org.apache.maven.execution < plexus.core [DEBUG] Imported: org.apache.maven.execution.scope < plexus.core [DEBUG] Imported: org.apache.maven.graph < plexus.core [DEBUG] Imported: org.apache.maven.lifecycle < plexus.core [DEBUG] Imported: org.apache.maven.model < plexus.core [DEBUG] Imported: org.apache.maven.monitor < plexus.core [DEBUG] Imported: org.apache.maven.plugin < plexus.core [DEBUG] Imported: org.apache.maven.profiles < plexus.core [DEBUG] Imported: org.apache.maven.project < plexus.core [DEBUG] Imported: org.apache.maven.reporting < plexus.core [DEBUG] Imported: org.apache.maven.repository < plexus.core [DEBUG] Imported: org.apache.maven.rtinfo < plexus.core [DEBUG] Imported: org.apache.maven.settings < plexus.core [DEBUG] Imported: org.apache.maven.toolchain < plexus.core [DEBUG] Imported: org.apache.maven.usability < plexus.core [DEBUG] Imported: org.apache.maven.wagon.* < plexus.core [DEBUG] Imported: org.apache.maven.wagon.authentication < plexus.core [DEBUG] Imported: org.apache.maven.wagon.authorization < plexus.core [DEBUG] Imported: org.apache.maven.wagon.events < plexus.core [DEBUG] Imported: org.apache.maven.wagon.observers < plexus.core [DEBUG] Imported: org.apache.maven.wagon.proxy < plexus.core [DEBUG] Imported: org.apache.maven.wagon.repository < plexus.core [DEBUG] Imported: org.apache.maven.wagon.resource < plexus.core [DEBUG] Imported: org.codehaus.classworlds < plexus.core [DEBUG] Imported: org.codehaus.plexus.* < plexus.core [DEBUG] Imported: org.codehaus.plexus.classworlds < plexus.core [DEBUG] Imported: org.codehaus.plexus.component < plexus.core [DEBUG] Imported: org.codehaus.plexus.configuration < plexus.core [DEBUG] Imported: org.codehaus.plexus.container < plexus.core [DEBUG] Imported: org.codehaus.plexus.context < plexus.core [DEBUG] Imported: org.codehaus.plexus.lifecycle < plexus.core [DEBUG] Imported: org.codehaus.plexus.logging < plexus.core [DEBUG] Imported: org.codehaus.plexus.personality < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core [DEBUG] Imported: org.eclipse.aether.* < plexus.core [DEBUG] Imported: org.eclipse.aether.artifact < plexus.core [DEBUG] Imported: org.eclipse.aether.collection < plexus.core [DEBUG] Imported: org.eclipse.aether.deployment < plexus.core [DEBUG] Imported: org.eclipse.aether.graph < plexus.core [DEBUG] Imported: org.eclipse.aether.impl < plexus.core [DEBUG] Imported: org.eclipse.aether.installation < plexus.core [DEBUG] Imported: org.eclipse.aether.internal.impl < plexus.core [DEBUG] Imported: org.eclipse.aether.metadata < plexus.core [DEBUG] Imported: org.eclipse.aether.repository < plexus.core [DEBUG] Imported: org.eclipse.aether.resolution < plexus.core [DEBUG] Imported: org.eclipse.aether.spi < plexus.core [DEBUG] Imported: org.eclipse.aether.transfer < plexus.core [DEBUG] Imported: org.eclipse.aether.util < plexus.core [DEBUG] Imported: org.eclipse.aether.version < plexus.core [DEBUG] Imported: org.fusesource.jansi.* < plexus.core [DEBUG] Imported: org.slf4j.* < plexus.core [DEBUG] Imported: org.slf4j.event.* < plexus.core [DEBUG] Imported: org.slf4j.helpers.* < plexus.core [DEBUG] Imported: org.slf4j.spi.* < plexus.core [DEBUG] Populating class realm maven.api [DEBUG] Created adapter factory; available factories [file-lock, rwlock-local, semaphore-local, noop]; available name mappers [discriminating, file-gav, file-hgav, file-static, gav, static] [INFO] Error stacktraces are turned on. [DEBUG] Message scheme: color [DEBUG] Message styles: debug info warning error success failure strong mojo project [DEBUG] Reading global settings from D:\apache-maven-3.9.10-bin\apache-maven-3.9.10\conf\settings.xml [DEBUG] Reading user settings from C:\Users\20182\.m2\settings.xml [WARNING] [WARNING] Some problems were encountered while building the effective settings [WARNING] expected START_TAG or END_TAG not TEXT (position: TEXT seen ...</activation>\n \u200b\n <p... @208:13) @ D:\apache-maven-3.9.10-bin\apache-maven-3.9.10\conf\settings.xml, line 208, column 13 [WARNING] [DEBUG] Reading global toolchains from D:\apache-maven-3.9.10-bin\apache-maven-3.9.10\conf\toolchains.xml [DEBUG] Reading user toolchains from C:\Users\20182\.m2\toolchains.xml [DEBUG] Using local repository at D:\apache-maven-3.9.10\repository [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for D:\apache-maven-3.9.10\repository [INFO] Scanning for projects... [DEBUG] Using mirror alimaven (http://maven.aliyun.com/nexus/content/groups/public/) for central (https://repo.maven.apache.org/maven2). [DEBUG] Extension realms for project org.apache.maven:standalone-pom:pom:1: (none) [DEBUG] Looking up lifecycle mappings for packaging pom from ClassRealm[plexus.core, parent: null] [DEBUG] Resolving plugin prefix spring-boot from [org.apache.maven.plugins, org.codehaus.mojo] [DEBUG] Creating adapter using nameMapper 'gav' and factory 'rwlock-local' [DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (D:\apache-maven-3.9.10\repository) [DEBUG] Skipped remote request for org.apache.maven.plugins/maven-metadata.xml, locally cached metadata up-to-date [DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (D:\apache-maven-3.9.10\repository) [DEBUG] Skipped remote request for org.codehaus.mojo/maven-metadata.xml, locally cached metadata up-to-date [DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (D:\apache-maven-3.9.10\repository) [DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (D:\apache-maven-3.9.10\repository) [DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (D:\apache-maven-3.9.10\repository) [DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (D:\apache-maven-3.9.10\repository) [DEBUG] Using transporter HttpTransporter with priority 5.0 for http://maven.aliyun.com/nexus/content/groups/public/ [DEBUG] Using transporter HttpTransporter with priority 5.0 for http://maven.aliyun.com/nexus/content/groups/public/ [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://maven.aliyun.com/nexus/content/groups/public/ [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://maven.aliyun.com/nexus/content/groups/public/ Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml (10 kB at 9.7 kB/s) Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml (21 kB at 19 kB/s) [DEBUG] Writing tracking file 'D:\apache-maven-3.9.10\repository\org\apache\maven\plugins\resolver-status.properties' [DEBUG] Writing tracking file 'D:\apache-maven-3.9.10\repository\org\codehaus\mojo\resolver-status.properties' [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.655 s [INFO] Finished at: 2025-06-12T18:31:25+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] No plugin found for prefix 'spring-boot' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (D:\apache-maven-3.9.10\repository), alimaven (http://maven.aliyun.com/nexus/content/groups/public/)] -> [Help 1] org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'spring-boot' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (D:\apache-maven-3.9.10\repository), alimaven (http://maven.aliyun.com/nexus/content/groups/public/)] at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve (DefaultPluginPrefixResolver.java:90) at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix (MojoDescriptorCreator.java:247) at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor (MojoDescriptorCreator.java:209) at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments (DefaultLifecycleTaskSegmentCalculator.java:94) at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments (DefaultLifecycleTaskSegmentCalculator.java:76) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:84) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104) at java.lang.reflect.Method.invoke (Method.java:565) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314) [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException [DEBUG] Shutting down adapter factory; available factories [file-lock, rwlock-local, semaphore-local, noop]; available name mappers [discriminating, file-gav, file-hgav, file-static, gav, static] [DEBUG] Shutting down 'file-lock' factory [DEBUG] Shutting down 'rwlock-local' factory [DEBUG] Shutting down 'semaphore-local' factory [DEBUG] Shutting down 'noop' factory
06-13
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值