为什么Maven试图解决我公司的依赖关系';s存储库(如果它不是';在这个项目中没有被引用?
我正在玩Vaadin,想使用一个附加的widgetset。我在maven文件中得到了一个存储库规范和一个依赖项,我做到了:为什么Maven试图解决我公司的依赖关系';s存储库(如果它不是';在这个项目中没有被引用?,maven,vaadin,Maven,Vaadin,我正在玩Vaadin,想使用一个附加的widgetset。我在maven文件中得到了一个存储库规范和一个依赖项,我做到了: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.myCompany</groupId>
<artifactId>Vaadin2</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>Vaadin2</name>
<prerequisites>
<maven>3</maven>
</prerequisites>
<properties>
<vaadin.version>7.7.1</vaadin.version>
<vaadin.plugin.version>7.7.1</vaadin.plugin.version>
<jetty.plugin.version>9.3.9.v20160517</jetty.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- If there are no local customisations, this can also be "fetch" or "cdn" -->
<vaadin.widgetset.mode>local</vaadin.widgetset.mode>
</properties>
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-push</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiled</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>flexibleoptiongroup</artifactId>
<version>2.3.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<!-- Exclude an unnecessary file generated by the GWT compiler. -->
<packagingExcludes>WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**</packagingExcludes>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>update-theme</goal>
<goal>update-widgetset</goal>
<goal>compile</goal>
<!-- Comment out compile-theme goal to use on-the-fly theme compilation -->
<goal>compile-theme</goal>
</goals>
</execution>
</executions>
<configuration>
<runTarget>http://localhost:8080/Vaadin2</runTarget>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
<!-- Clean up also any pre-compiled themes -->
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp/VAADIN/themes</directory>
<includes>
<include>**/styles.css</include>
<include>**/styles.scss.cache</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<!-- The Jetty plugin allows us to easily test the development build by
running jetty:run on the command line. -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.plugin.version}</version>
<configuration>
<scanIntervalSeconds>2</scanIntervalSeconds>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- Vaadin pre-release repositories -->
<id>vaadin-prerelease</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<repositories>
<repository>
<id>vaadin-prereleases</id>
<url>http://maven.vaadin.com/vaadin-prereleases</url>
</repository>
<repository>
<id>vaadin-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>vaadin-prereleases</id>
<url>http://maven.vaadin.com/vaadin-prereleases</url>
</pluginRepository>
<pluginRepository>
<id>vaadin-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</project>
gaia是我公司内的一个服务器的名称,它为其他项目保存Maven存储库,但我不明白Maven为什么坚持在那里查看,甚至不明白在这个例子中它是如何知道的。字符串“gaia”根本没有出现在settings.xml中。它可以从哪里获得gaia存储库的URL,这样我就可以在这个项目中关闭它了?为什么maven不使用我在pom.xml中为这个项目配置的存储库呢
Windows 7,如果这很重要的话…我的第一个想法是设置文件。您是否检查了
mvn dependency:effective pom
以获取有关项目的更多信息,或mvn help:effective settings
以获取有关设置的更多详细信息?我的第一个想法是设置文件。您是否检查了mvn dependency:effective pom
以获取有关项目的更多信息,或者查看了mvn help:effective settings
以了解有关设置的更多详细信息?检查了setting.xml文件,您可能已经在那里配置了公司回购。正如我所说,它不在任何设置中。请尝试添加插件库。是否确实没有settings.xml?它通常位于主目录中的一个隐藏文件夹.m2中。正如我在原始帖子中所说:“settings.xml中根本没有出现字符串‘gaia’。”这意味着存在这样一个文件,我在其中查找并搜索了它,而该字符串不在该文件中。请检查setting.xml文件,您可能已经在那里配置了公司repos。正如我所说,它不在任何设置中。请尝试添加插件repository是否确实没有settings.xml?它通常位于主目录中的一个隐藏文件夹.m2中。正如我在原始帖子中所说:“settings.xml中根本没有出现字符串‘gaia’。”这意味着存在这样一个文件,我在其中查找并搜索了它,而该字符串不在该文件中。正如我在原始帖子中所说,字符串“gaia”没有出现在设置文件中,因此它不包含任何存储库URL。我刚才尝试了mvn dependency:effective pom
;它为jetty下载了6个我不认识的pom(我不使用jetty),然后说它找不到“有效pom”的目标。我尝试了“mvn帮助:有效设置”,它又下载了10件我不认识的东西(似乎主要与maven有关),然后打印出几百行pom;它列出了一个“镜像”作为所讨论的服务器,那么镜像指定在哪里?我的错,它是帮助:有效pom。您可以获得有关的更多信息。您在有效设置中找到镜像,因此这是领先一步。它的设置的标准位置是。您可以找到它们的val通过运行mvn help:evaluate-Dexpression=user.home
来使用,如果它不在你的user.home中,那么实际的定义必须来自maven的安装目录“不会出现在设置文件中,因此它在任何地方都不包含存储库URL。我刚才试过mvn依赖:有效的pom
;它为jetty下载了6个我不认识的pom(我不使用jetty),然后说它找不到“有效pom”的目标。我尝试了“mvn帮助:有效设置”,它下载了另外10件我不认识的东西(似乎主要是与maven有关),然后打印了几百行pom;它将一个“镜像”列为有问题的服务器,那么指定的镜像在哪里呢?糟糕,这是帮助:有效的pom。您可以获得有关的更多信息。您在“有效设置”中找到了镜像,因此这是领先一步。Maven设置的标准位置为。您可以通过运行mvn帮助:evaluate-Dexpression=user.home
找到它们的值。如果它不在您的user.home中,那么实际的定义必须来自maven的安装目录。
C:\Users\rcook\Documents\NetBeansProjects\mavenproject1\Vaadin2>mvn vaadin:update-widgetset install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Vaadin2 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://gaia.myCompany.com:9080/archiva/repository/internal/org/vaadin/addons/flexibleoptiongroup/2.3.0/flexibleoptiongroup-2.3.0.pom
[WARNING] The POM for org.vaadin.addons:flexibleoptiongroup:jar:2.3.0 is missing, no dependency information available
Downloading: http://gaia.myCompany.com:9080/archiva/repository/internal/org/vaadin/addons/flexibleoptiongroup/2.3.0/flexibleoptiongroup-2.3.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.036s
[INFO] Finished at: Tue Sep 27 16:38:37 EDT 2016
[INFO] Final Memory: 10M/152M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project Vaadin2: Could not resolve dependencies for project com.myCompany:Vaadin2:war:1.0-SNAPSHOT: Could not find artifact org.vaadin.addons:flexibleoptiongroup:jar:2.3.0 in archiva.default (http://gaia.myCompany.com:9080/archiva/repository/internal/) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/DependencyResolutionException
C:\Users\rcook\Documents\NetBeansProjects\mavenproject1\Vaadin2>