Alon Bar-Lev created MNG-5409:
---------------------------------
Summary: Support deployment in offline modefor 'file' protocol
Key: MNG-5409
URL: https://jira.codehaus.org/browse/MNG-5409
Project: Maven 2 & 3
Issue Type: Improvement
Components: Artifacts and Repositories, Deployment
Affects Versions: 3.0.4
Environment: Linux
Reporter: Alon Bar-Lev
Please refer to MDEPLOY-90.
The deploy plugin is a useful way to pack all project artifacts into maven
repository structure. It is required for example when you package an
application for package manager, so you need the artifacts as maven repository
locally so it can be packaged.
I see no sense in limiting deploy plugin in case of repository is at file://
protocol, as file:// is not offline.
Please support this, or allow another mechanism to create locally maven
repository of project artifacts.
Methods I tried: create repository using assembly - but binaries cannot be
digested, create repository using dependency plugin - but I need to explicitly
build the project in unique structure and explicitly specify dependencies.
The deploy plugin is the right way to do this, it is just the offline
limitation inhibit the use of it.
So patch is simple for deploy plugin... HOWEVER the plugin is a complete void,
as the whole deployment implementation is done internally in sources that are
not provided by the standard apache maven download.
Anyway, found this[1], the meaning is that unless the whole maven
implementation will skip offline check if protocol is "file", it cannot be done.
For the record, with the patch:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.8-SNAPSHOT:deploy
(default-deploy) on project XXX: The repository system is in offline mode,
deployment impossible
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: The repository
system is in offline mode, deployment impossible
at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:189)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: The
repository system is in offline mode, deployment impossible
at
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at
org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy(AbstractDeployMojo.java:165)
at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:153)
... 21 more
Caused by: org.sonatype.aether.deployment.DeploymentException: The repository
system is in offline mode, deployment impossible
at
org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:204)
at
org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:443)
at
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
... 23 more
[1]
http://grepcode.com/file/repo1.maven.org/maven2/org.sonatype.aether/aether-impl/1.0/org/sonatype/aether/impl/internal/DefaultDeployer.java#116
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira