Figured out the problem. In addition to the <repositories>, I need to define
<pluginRepositories>, as well. Adding
<pluginRepositories>
<pluginRepository>
<id>blaRepo</id>
<url>file:///c:/repo/offline-repo-4</url>
<layout>default</layout>
</pluginRepository>
</pluginRepositories>
Soveld the problem with the maven-resources-plugin.
Still the offline build fails, this time with:
D:\projects\zzzz2>mvn package
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building safProto - AppFramework Application
[INFO] task-segment: [package]
[INFO]
------------------------------------------------------------------------
Downloading:
file:///c:/repo/offline-repo-4/org/apache/maven/plugins/maven-resources-plugin/2.3/maven-resources-plugin-2.3.pom
4K downloaded (maven-resources-plugin-2.3.pom)
Downloading:
file:///c:/repo/offline-repo-4/org/apache/maven/plugins/maven-plugins/12/maven-plugins-12.pom
11K downloaded (maven-plugins-12.pom)
Downloading:
file:///c:/repo/offline-repo-4/org/apache/maven/maven-parent/9/maven-parent-9.pom
32K downloaded (maven-parent-9.pom)
Downloading: file:///c:/repo/offline-repo-4/org/apache/apache/4/apache-4.pom
4K downloaded (apache-4.pom)
Downloading:
file:///c:/repo/offline-repo-4/org/apache/maven/plugins/maven-resources-plugin/2.3/maven-resources-plugin-2.3.jar
20K downloaded (maven-resources-plugin-2.3.jar)
Downloading:
file:///c:/repo/offline-repo-4/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.pom
2K downloaded (maven-compiler-plugin-2.0.2.pom)
Downloading:
file:///c:/repo/offline-repo-4/org/apache/maven/plugins/maven-plugins/8/maven-plugins-8.pom
5K downloaded (maven-plugins-8.pom)
Downloading:
file:///c:/repo/offline-repo-4/org/apache/maven/maven-parent/5/maven-parent-5.pom
14K downloaded (maven-parent-5.pom)
Downloading: file:///c:/repo/offline-repo-4/org/apache/apache/3/apache-3.pom
3K downloaded (apache-3.pom)
Downloading:
file:///c:/repo/offline-repo-4/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.jar
17K downloaded (maven-compiler-plugin-2.0.2.jar)
Downloading:
file:///c:/repo/offline-repo-4/org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.pom
[INFO] Unable to find resource
'org.apache.maven.plugins:maven-surefire-plugin:pom:2.4.3' in repository
blaRepo (file:///c:/repo/offline-repo-4)
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.pom
[WARNING] Unable to get resource
'org.apache.maven.plugins:maven-surefire-plugin:pom:2.4.3' from repository
central (http://repo1.maven.org/maven2): Error trans
ferring file: repo1.maven.org
Downloading:
file:///c:/repo/offline-repo-4//org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.pom
[INFO] Unable to find resource
'org.apache.maven.plugins:maven-surefire-plugin:pom:2.4.3' in repository
offline-repository (file:///c:/repo/offline-repo-4/)
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.pom
[WARNING] Unable to get resource
'org.apache.maven.plugins:maven-surefire-plugin:pom:2.4.3' from repository
central (http://repo1.maven.org/maven2): Error trans
ferring file: repo1.maven.org
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.apache.maven.plugins:maven-surefire-plugin
Reason: POM 'org.apache.maven.plugins:maven-surefire-plugin' not found in
repository: Unable to download the artifact from any repository
org.apache.maven.plugins:maven-surefire-plugin:pom:2.4.3
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
blaRepo (file:///c:/repo/offline-repo-4),
offline-repository (file:///c:/repo/offline-repo-4/)
for project org.apache.maven.plugins:maven-surefire-plugin
Sure enough, there's no maven-surefire-plugin in my offline repository. It
seems this is caused by a bug in the dependency plugin:
http://jira.codehaus.org/browse/MDEP-198?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
blaghhghhhhhh...
--
View this message in context:
http://old.nabble.com/Creating-repository-for-offline-building-with-dependency%3Ago-offline-fails-tp27950979p27950985.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]