Maven はポート 8081 で localhost からパッケージ/依存関係をダウンロードしようとします。
通常の実行後、mvn clean install
これが起こります:
Downloading:
http://192.168.10.46:8081/nexus/content/groups/public/org/codehaus/plexus/plexus-io/1.0/plexus-io-1.0.jar
Downloading:
http://192.168.10.46:8081/nexus/content/groups/public/org/codehaus/plexus/plexus- archiver/1.0/plexus-archiver-1.0.jar
Downloading: http://192.168.10.46:8081/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.enonic.kurs:my-plugin:1.0.0-SNAPSHOT (/Users/xx yy/Documents/Enonic plugins/project/project/pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Plugin com.enonic.cms.tools:maven-cms-plugin:1.0.0 or one of its dependencies could not be resolved
依存関係が指定されたリポジトリからダウンロードされる前のすべての時間。私の pom.xml のリポジトリ:
<pluginRepositories>
<pluginRepository>
<id>enonic</id>
<name>Enonic Plugin Repository</name>
<url>http://repo.enonic.com/maven</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>com.enonic.cms</groupId>
<artifactId>cms-api</artifactId>
<version>4.4.10</version>
<scope>provided</scope>
</dependency>
.........
---------
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.enonic.cms.tools</groupId>
<artifactId>maven-cms-plugin</artifactId>
<version>1.0.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
編集:私は問題を見つけたと思いますが、まだ解決策はありません。ビルド プラグイン内com.enonic.cms.tools:maven-cms-plugin
には への依存関係があり、plexus-utils
これらへの接続に問題があるようで、ローカル リポジトリのルックアップが強制されます。plexus-io
plexus-archiver
デバッグ情報:
[INFO] Scanning for projects...
[DEBUG] com.enonic.cms.tools:maven-cms-plugin:jar:1.0.0:
[DEBUG] org.apache.maven:maven-plugin-api:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-model:jar:2.0.9:compile
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.5.1:compile
[DEBUG] org.apache.maven:maven-artifact:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-project:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-settings:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-profile:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-plugin-registry:jar:2.0.9:compile
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[DEBUG] junit:junit:jar:3.8.1:compile
[DEBUG] classworlds:classworlds:jar:1.1-alpha-2:compile
[DEBUG] org.apache.maven:maven-archiver:jar:2.4.1:compile
[DEBUG] org.codehaus.plexus:plexus-archiver:jar:1.0:compile
[DEBUG] org.codehaus.plexus:plexus-io:jar:1.0:compile
[DEBUG] org.codehaus.plexus:plexus-interpolation:jar:1.13:compile
[DEBUG] org.apache.maven.shared:maven-osgi:jar:0.2.0:compile
[DEBUG] biz.aQute:bndlib:jar:0.0.203:compile
[DEBUG] Verifying availability of /Users/geir nygard/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar from [nexus (http://192.168.10.46:8081/nexus/content/groups/public, releases+snapshots)]
[DEBUG] Verifying availability of /Users/geir nygard/.m2/repository/org/codehaus/plexus/plexus-archiver/1.0/plexus-archiver-1.0.jar from [nexus (http://192.168.10.46:8081/nexus/content/groups/public, releases+snapshots)]
[DEBUG] Verifying availability of /Users/geir nygard/.m2/repository/org/codehaus/plexus/plexus-io/1.0/plexus-io-1.0.jar from [nexus (http://192.168.10.46:8081/nexus/content/groups/public, releases+snapshots)]
設定.xml:
<settings>
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://192.168.10.46:8081/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
内容を settings.xml
変更して編集した後、次のエラーが発生します。mirrorOf
*,!enonic
ERROR] Error resolving version for plugin 'org.apache.maven.plugins:maven-install-plugin' from the repositories [local (/Users/xx yy/.m2/repository), enonic (http://repo.enonic.com/maven), nexus (http://192.168.10.46:8081/nexus/content/groups/public)]: Plugin not found in any plugin repository -> [Help 1]