Maven 3主机如何与Maven 2不同?(how is Maven 3 host look up different to Maven 2?)
我正在努力从Maven 2迁移到Maven 3.我故意从消息和设置中删除了主机和端口。
Maven 2目前可以与我们在防火墙后面设置的Artifactory中央存储库一起使用。 当我切换到使用Maven 3时,无法下载带有错误消息的插件:
[错误]插件org.apache.maven.plugins:maven-install-plugin:2.3.1或其中一个依赖项无法解析:无法读取org的工件描述符。 apache.maven.plugins:maven-install-plugin:jar:2.3.1:无法传输工件org.apache.maven.plugins:maven-install-plugin:pom:2.3.1 from / to central(http:// :/ artifactory / plugins-release):拒绝访问:http://:/artifactory/plugins-release/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3 .1.pom,ReasonPhrase:禁止。
这是我的设置:
<?xml version="1.0" encoding="UTF-8"?> <settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <proxies> <proxy> <id>andy</id> <active>true</active> <protocol>http</protocol> <host>proxyip</host> <port>80</port> <username>user</username> <password>password</password> <nonProxyHosts>host</nonProxyHosts> </proxy> </proxies> <servers> <server> <username>user</username> <password>password</password> <id>central</id> </server> <server> <username>user</username> <password>password</password> <id>snapshots</id> </server> </servers> <profiles> <profile> <repositories> <repository> <snapshots> <enabled>false</enabled> </snapshots> <id>central</id> <name>libs-release</name> <url>http://<host>:<port>/artifactory/libs-release</url> </repository> <repository> <snapshots /> <id>snapshots</id> <name>libs-snapshot</name> <url>http://<host>:<port>/artifactory/libs-snapshot</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <snapshots> <enabled>false</enabled> </snapshots> <id>central</id> <name>plugins-release</name> <url>http://<host>:<port>/artifactory/plugins-release</url> </pluginRepository> <pluginRepository> <snapshots /> <id>snapshots</id> <name>plugins-snapshot</name> <url>http://<host>:<port>/artifactory/plugins-snapshot</url> </pluginRepository> </pluginRepositories> <id>artifactory</id> </profile> </profiles> <activeProfiles> <activeProfile>artifactory</activeProfile> </activeProfiles> </settings>
我已检查过神器中是否存在正确的插件和版本,这似乎是一个访问问题。 在配置需要更新的Maven 2和Maven 3之间有什么变化吗?
I am working to migrate from Maven 2 to Maven 3. I have purposely removed the host and port from the messages and settings.
Maven 2 currently works fine with the Artifactory central repository we have setup behind a firewall. When I switch to using Maven 3 it fails to download the plugins with the error message:
[ERROR] Plugin org.apache.maven.plugins:maven-install-plugin:2.3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org. apache.maven.plugins:maven-install-plugin:jar:2.3.1: Could not transfer artifact org.apache.maven.plugins:maven-install-plugin:pom:2.3.1 from/to central (http:/ /:/artifactory/plugins-release): Access denied to: http://:/artifactory/plugins-release/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.pom , ReasonPhrase:Forbidden.
Here are my settings:
<?xml version="1.0" encoding="UTF-8"?> <settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <proxies> <proxy> <id>andy</id> <active>true</active> <protocol>http</protocol> <host>proxyip</host> <port>80</port> <username>user</username> <password>password</password> <nonProxyHosts>host</nonProxyHosts> </proxy> </proxies> <servers> <server> <username>user</username> <password>password</password> <id>central</id> </server> <server> <username>user</username> <password>password</password> <id>snapshots</id> </server> </servers> <profiles> <profile> <repositories> <repository> <snapshots> <enabled>false</enabled> </snapshots> <id>central</id> <name>libs-release</name> <url>http://<host>:<port>/artifactory/libs-release</url> </repository> <repository> <snapshots /> <id>snapshots</id> <name>libs-snapshot</name> <url>http://<host>:<port>/artifactory/libs-snapshot</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <snapshots> <enabled>false</enabled> </snapshots> <id>central</id> <name>plugins-release</name> <url>http://<host>:<port>/artifactory/plugins-release</url> </pluginRepository> <pluginRepository> <snapshots /> <id>snapshots</id> <name>plugins-snapshot</name> <url>http://<host>:<port>/artifactory/plugins-snapshot</url> </pluginRepository> </pluginRepositories> <id>artifactory</id> </profile> </profiles> <activeProfiles> <activeProfile>artifactory</activeProfile> </activeProfiles> </settings>
I have checked that the correct plugin and version exists in artifactory, this does seem to be an access issue. Has something changed between Maven 2 and Maven 3 where the configuration needs updating?
原文:https://stackoverflow.com/questions/17611382
满意答案
该方法仅创建表 ; 因此,您需要确保已创建数据库。
数据库必须存在,如果表已经存在,您将收到数据库中的错误。 它不会覆盖或删除表。
The method only creates tables; so it is up to you to make sure the database is already created.
The database has to exist and if the table already exists, you'll receive an error from the database. It will not overwrite or delete tables.
相关问答
更多如何检查mysql数据库是否存在(How to check if mysql database exists)
MySQL检查数据库是否存在(MySQL Check if a database exists)
db.create_all()是否检查数据库是否存在?(Does db.create_all() check if the database exists?)
Orient DB - 使用密码创建orient db,并检查是否有可用的JAVA(Orient DB - create orient db with password and check if one available using JAVA)
检查Appcelerator区域设置数据库是否存在(Check if Appcelerator locale database exists)
检查数据库是否存在(Check if database exist)
Ionic SQLite - 检查数据库是否存在(Ionic SQLite — check if database exists)
如果不创建访问数据库(.mbd),请检查它是否存在(Check if an access database (.mbd) exists if not create it)
python-couchdb:如何检查数据库是否已经存在(How to check if database already exists)
检查数据库中是否存在该行(check if the row exists or not in the database)
相关文章
更多maven 小问题
Running Solr with Maven
maven需求、下载与安装
maven环境快速搭建
创建maven webapp项目
maven设置HTTP代理访问
在linux环境下安装Maven
maven下载与安装
maven设置本地仓库
使用Maven运行Solr(翻译)
最新问答
更多获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
如何通过引用返回对象?(How is returning an object by reference possible?)
矩阵如何存储在内存中?(How are matrices stored in memory?)
每个请求的Java新会话?(Java New Session For Each Request?)
css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
xcode语法颜色编码解释?(xcode syntax color coding explained?)
在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!