eclipse 右键添加maven依赖时搜索不出依赖包
maven
Maven: Apache Maven是一个开源的项目管理和构建工具,主要用于Java项目。适合需要自动化项目构建和依赖管理的开发者。特点包括约定优于配置、易于使用和社区驱动。
项目地址:https://gitcode.com/gh_mirrors/ma/maven

·
选中项目,点击右键--Maven--add Dependency时,弹出如下界面可以给项目的pom.xml文件添加依赖。
但是,我遇到了一个问题,当我在Enter groupId,artifactId or sha1 prefix or pattern(*)下面的方框输入要搜索的依赖包时,没法搜索出结果。好在出现了问题提示
网上进行搜索,找到的解决办法是:
点击菜单栏的window---preference---Maven
勾选箭头指向的
然后打开Maven repository(菜单栏window---show view ---other---搜索Maven repository,打开Maven repository)
进入如下视图
找到箭头指向的central
点右键,选中update index.然后等Maven更新完索引之后。
就可以选中项目点右键再pom.xml文件里添加依赖包了




Maven: Apache Maven是一个开源的项目管理和构建工具,主要用于Java项目。适合需要自动化项目构建和依赖管理的开发者。特点包括约定优于配置、易于使用和社区驱动。
最近提交(Master分支:8 天前 )
3207daa8
Bumps [net.sourceforge.pmd:pmd-core](https://github.com/pmd/pmd) from 7.16.0 to 7.17.0.
- [Release notes](https://github.com/pmd/pmd/releases)
- [Changelog](https://github.com/pmd/pmd/blob/main/docs/render_release_notes.rb)
- [Commits](https://github.com/pmd/pmd/compare/pmd_releases/7.16.0...pmd_releases/7.17.0)
---
updated-dependencies:
- dependency-name: net.sourceforge.pmd:pmd-core
dependency-version: 7.17.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 13 小时前
9f87ad4d
This PR moves the InputLocation, InputLocationTracker, and InputSource
classes from maven-api-model to be generated using the existing velocity
templates in src/mdo/java/.
Changes Made:
- Updated Velocity Templates with Maven-specific features controlled by isMavenModel parameter
- Added locationTracking=true and generateLocationClasses=true parameters to maven-api-model configuration
- Removed manually written InputLocation classes from api/maven-api-model/src/main/java/org/apache/maven/api/model/
Benefits:
- Consistency: InputLocation classes are now generated consistently across all Maven modules
- Maintainability: Changes can be made in one place (the templates) rather than maintaining separate implementations
- Feature Parity: All Maven-specific features are preserved through the isMavenModel boolean parameter
- Code Reuse: The same templates can generate both simple and Maven-enhanced versions 14 小时前
更多推荐
所有评论(0)