You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Andrew Moore (JIRA)" <ji...@codehaus.org> on 2005/10/10 01:34:12 UTC

[jira] Reopened: (MNG-925) maven-metadata-.xml not generated when deploying to repository via scpexe protocol

     [ http://jira.codehaus.org/browse/MNG-925?page=all ]
     
Andrew Moore reopened MNG-925:
------------------------------


I am still seeing this issue when deploying to a *clean* repository.

Works fine if the artefact has been deployed previously via a different protocol (as I suspect is the case when you tested).

The root exception [1] is:

Caused by: java.io.FileNotFoundException: /home/amm/.m2/repository/com/distra/switch/maven-metadata-distra.xml.tmp (No such file or directory)

settings.xml and pom.xml follow.

Lisintg 1:

$ m2 -e -X -Dmaven.test.skip clean:clean deploy
+ Error stacktraces are turned on.
[DEBUG] Building Maven user-level plugin registry from: '/home/amm/.m2/plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: '/opt/maven/conf/plugin-registry.xml'
[INFO] Searching repository for plugin with prefix: 'clean'.
[DEBUG] maven-clean-plugin: resolved to version 2.0-rc1 from repository central
[DEBUG] com.distra:switch:pom:b3_0_0013 (selected for null)
[DEBUG]   org.apache.maven.wagon:wagon-ssh-external:jar:1.0-alpha-4 (selected for runtime)
[DEBUG]     org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-4 (selected for runtime)
[DEBUG]     plexus:plexus-utils:jar:1.0-alpha-1 (selected for runtime)
[DEBUG] com.distra:useful:jar:b3_0_0013 (selected for null)
[DEBUG]   org.apache.maven.wagon:wagon-ssh-external:jar:1.0-alpha-4 (selected for runtime)
[DEBUG]     org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-4 (selected for runtime)
[DEBUG]     plexus:plexus-utils:jar:1.0-alpha-1 (selected for runtime)
[INFO] ----------------------------------------------------------------------------
[INFO] Building Distra Switch
[INFO]    task-segment: [clean:clean, deploy]
[INFO] ----------------------------------------------------------------------------
[DEBUG] org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.0-rc1 (selected for runtime)
[INFO] [clean:clean]
[DEBUG] maven-install-plugin: resolved to version 2.0-beta-1 from repository central
[DEBUG] maven-deploy-plugin: resolved to version 2.0-beta-1 from repository central
[DEBUG] org.apache.maven.plugins:maven-install-plugin:maven-plugin:2.0-beta-1 (selected for runtime)
[DEBUG]   junit:junit:jar:3.8.1 (selected for runtime)
[INFO] [install:install]
[INFO] Installing /secure/home/amm/prj/bt3/distra/switch-b3_0_0013/pom.xml to /home/amm/.m2/repository/com/distra/switch/b3_0_0013/switch-b3_0_0013.pom
[DEBUG] org.apache.maven.plugins:maven-deploy-plugin:maven-plugin:2.0-beta-1 (selected for runtime)
[DEBUG]   junit:junit:jar:3.8.1 (selected for runtime)
[INFO] [deploy:deploy]
[DEBUG] not adding permissions to wagon connection
Uploading: scpexe://office/data/development/bt3/m2/distra/com/distra/switch/b3_0_0013/switch-b3_0_0013.pom
[INFO] Retrieving previous metadata from distra
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Diagnosis: Error deploying artifact
[INFO] ----------------------------------------------------------------------------
[DEBUG] Trace:

org.apache.maven.plugin.MojoExecutionException: Error deploying artifact
        at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:154)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:417)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:554)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:508)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:494)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:307)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:217)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:247)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error deploying artifact:
        at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:95)
        at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:138)
        ... 16 more
Caused by: org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException: Unable to retrieve metadata
        at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolveAlways(DefaultRepositoryMetadataManager.java:287)
        at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.deploy(DefaultRepositoryMetadataManager.java:311)
        at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:83)
        ... 17 more
Caused by: org.apache.maven.wagon.TransferFailedException: Failed to post-process the source file
        at org.apache.maven.wagon.AbstractWagon.postProcessListeners(AbstractWagon.java:547)
        at org.apache.maven.wagon.providers.sshext.ScpExternalWagon.get(ScpExternalWagon.java:307)
        at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:347)
        at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetadata(DefaultWagonManager.java:276)
        at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolveAlways(DefaultRepositoryMetadataManager.java:273)
        ... 19 more
Caused by: java.io.FileNotFoundException: /home/amm/.m2/repository/com/distra/switch/maven-metadata-distra.xml.tmp (No such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at org.apache.maven.wagon.AbstractWagon.postProcessListeners(AbstractWagon.java:531)
        ... 23 more
[INFO] ----------------------------------------------------------------------------
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Mon Oct 10 09:20:03 EST 2005
[INFO] Final Memory: 2M/4M
[INFO] ----------------------------------------------------------------------------

Lisintg 2 (pom.xml):

<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.distra</groupId>
  <artifactId>switch</artifactId>
  <packaging>pom</packaging>
  <version>b3_0_0013</version>
  <name>Distra Switch</name>
  <url>http://distra.com</url>
  <scm>
    <connection>scm:svn:svn+ssh://office/data/development/bt3/svn/migration/products/switch</connection>
    <developerConnection>scm:svn:svn+ssh://office/data/development/bt3/svn/migration/products/switch</developerConnection>
    <url>http://svn.sydney.distra.com/migration/products/switch</url>
  </scm>
  <ciManagement>
    <system>continuum</system>
    <url>http://localhost:8080/continuum/servlet/continuum</url>
    <notifiers>
      <notifier>
        <type>mail</type>
        <configuration>
          <address>lister@pyroboy.com.au</address>
        </configuration>
      </notifier>
    </notifiers>
  </ciManagement>
  <distributionManagement>
    <repository>
      <id>distra</id>
      <url>scpexe://office/data/development/bt3/m2/distra</url>
<!--
      <url>file:///secure/development/bt3/m2/distra</url>
      <url>scp://office/data/development/bt3/m2/distra</url>
-->
    </repository>
  </distributionManagement>
  <build>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ssh-external</artifactId>
        <version>1.0-alpha-4</version>
      </extension>
    </extensions>
  </build>
  <modules>
    <module>useful</module>
<!--
    <module>pm</module>
    <module>ui</module>
    <module>ting</module>
    <module>gensvc</module>
    <module>coresw</module>
    <module>eftsw</module>
    <module>eftep</module>
    <module>pos</module>
-->
  </modules>
</project>

Lisitng 3 (settings.xml):

<settings>
  <servers>
    <server>
      <id>distra</id>
      <username>amm</username>
<!--
      <privateKey>/home/amm/.ssh/id_dsa</privateKey>
-->
    </server>
  </servers>
  <profiles>
    <profile>
      <id>distra</id>
      <repositories>
        <repository>
          <id>libraries</id>
          <name>local libraries</name>
          <url>file:///secure/development/bt3/m2/libraries</url>
        </repository>
        <repository>
          <id>distra</id>
          <name>local Distra artefacts</name>
          <url>file:///secure/development/bt3/m2/distra</url>
        </repository>
      </repositories>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>distra</activeProfile>
  </activeProfiles>
</settings>


> maven-metadata-<repository>.xml not generated when deploying to repository via scpexe protocol
> ----------------------------------------------------------------------------------------------
>
>          Key: MNG-925
>          URL: http://jira.codehaus.org/browse/MNG-925
>      Project: Maven 2
>         Type: Bug
>   Components: maven-artifact
>     Versions: 2.0-beta-1
>  Environment: Linux u-235 2.6.10-gentoo-r4 #1 SMP Mon Jan 10 14:53:56 EST 2005 i686 AMD Athlon(tm) MP 2400+ AuthenticAMD GNU/Linux
> java version "1.4.2_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
> Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
>     Reporter: Andrew Moore
>     Assignee: Brett Porter

>
>
> Further to the below, if I deploy a project to the remote repository
> successfully via NFS and then switch over to scpexe, subsequent
> deployments over scpexe work as expected.
> This appears to be due to the presence of the maven-metadata.xml files
> in the repository. If I remove these the deployment breaks again.
> The root problem appears to be with the deployment and/or generation of
> the metadata when using scpexe.
> When broken, the root exception in the stack trace is:
> Caused by: java.io.FileNotFoundException:
> /home/amm/.m2/repository/com/distra/useful/useful/maven-metadata-distra.xml.tmp
> (No such file or directory)
> Checking my local repository reveals that the maven-metadata-distra.xml
> has not been generated. maven-metadata-local.xml is still generated.
> maven-metadata-distra.xml IS generated when deploying via NFS.
> So, in a nutshell, maven-metadata-<repository>.xml does not appear to be
> generated correctly when using the scpexe protocol.
> Would anyone care to confirm this before I raise a bug?
> I have tested with the normal scp protocol and deployment works as
> expected. Using scp however I have to hard-code my key's password in
> settings.xml. This is what I am trying to get around by using scpexe.
> Thanks,
> ...andrew
> andrew wrote:
> >> Maven version: 2.0-beta-1
> >> 
> >> Hi,
> >> 
> >> Thanks to the maven devs for getting 2.0-beta-1 released. All the hard
> >> work is much appreciated.
> >> 
> >> When attempting to deploy to a remote repository (via scpexe) with the
> >> new release I am getting a few exceptions [1].
> >> 
> >> The jar is uploaded to the repository correctly, however the POM is not
> >> and the build fails with the metadata related exceptions below.
> >> 
> >> The scpexe protocol appears to be working correctly for the upload but
> >> some maven internal metadata processing doesn't like it.
> >> 
> >> If I deploy to the same server path over NFS, everything works as expected.
> >> 
> >> My project POM [2] and local settings.xml [3] are also attached.
> >> 
> >> Any insight into this issue much appreciated.
> >> 
> >> Thanks,
> >> ...andrew
> >> 
> >> Listing 1:
> >> 
> >> $ m2 -Dmaven.test.skip=true clean:clean deploy
> >> [INFO] Searching repository for plugin with prefix: 'clean'.
> >> [INFO]
> >> ----------------------------------------------------------------------------
> >> [INFO] Building distra - useful
> >> [INFO]    task-segment: [clean:clean, deploy]
> >> [INFO]
> >> ----------------------------------------------------------------------------
> >> [INFO] [clean:clean]
> >> [INFO] Deleting directory
> >> /secure/home/amm/prj/bt3/distra/useful/useful/target
> >> [INFO] [resources:resources]
> >> Downloading:
> >> http://repo1.maven.org/maven2/sun/java/tools/tools/1.4.2_08/tools-1.4.2_08.pom
> >> [WARNING] Unable to get resource from repository central
> >> (http://repo1.maven.org/maven2)
> >> [WARNING]
> >>   ***** Using defaults for missing POM sun.java.tools:tools:pom:1.4.2_08
> >> *****
> >> 
> >> [INFO] [compiler:compile]
> >> Compiling 211 source files to
> >> /secure/home/amm/prj/bt3/distra/useful/useful/target/classes
> >> [INFO] [resources:testResources]
> >> [INFO] [compiler:testCompile]
> >> Compiling 73 source files to
> >> /secure/home/amm/prj/bt3/distra/useful/useful/target/test-classes
> >> [INFO] [surefire:test]
> >> [INFO] Tests are skipped.
> >> [INFO] [jar:jar]
> >> [INFO] Building jar:
> >> /secure/home/amm/prj/bt3/distra/useful/useful/target/useful-1.0.jar
> >> [INFO] [install:install]
> >> [INFO] Installing
> >> /secure/home/amm/prj/bt3/distra/useful/useful/target/useful-1.0.jar to
> >> /home/amm/.m2/repository/com/distra/useful/useful/1.0/useful-1.0.jar
> >> [INFO] [deploy:deploy]
> >> Uploading:
> >> scpexe://office/data/development/bt3/m2/distra/com/distra/useful/useful/1.0/useful-1.0.jar
> >> [INFO] Retrieving previous metadata from distra
> >> [INFO]
> >> ----------------------------------------------------------------------------
> >> [ERROR] BUILD ERROR
> >> [INFO]
> >> ----------------------------------------------------------------------------
> >> [INFO] Diagnosis: Error deploying artifact
> >> [INFO]
> >> ----------------------------------------------------------------------------
> >> [ERROR] Cause:
> >> org.apache.maven.plugin.MojoExecutionException: Error deploying artifact
> >>         at
> >> org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:154)
> >>         at
> >> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
> >>         at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
> >>         at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
> >>         at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
> >>         at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> >>         at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
> >>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
> >>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
> >>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>         at
> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >>         at
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >>         at java.lang.reflect.Method.invoke(Method.java:324)
> >>         at
> >> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> >>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >>         at
> >> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> >>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> >> Caused by:
> >> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error
> >> deploying artifact:
> >>         at
> >> org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:89)
> >>         at
> >> org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:53)
> >>         at
> >> org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:142)
> >>         ... 16 more
> >> Caused by:
> >> org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException:
> >> Unable to retrieve metadata
> >>         at
> >> org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolveAlways(DefaultRepositoryMetadataManager.java:212)
> >>         at
> >> org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.deploy(DefaultRepositoryMetadataManager.java:230)
> >>         at
> >> org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:77)
> >>         ... 18 more
> >> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to
> >> post-process the source file
> >>         at
> >> org.apache.maven.wagon.AbstractWagon.postProcessListeners(AbstractWagon.java:547)
> >>         at
> >> org.apache.maven.wagon.providers.sshext.ScpExternalWagon.get(ScpExternalWagon.java:307)
> >>         at
> >> org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:325)
> >>         at
> >> org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetadata(DefaultWagonManager.java:256)
> >>         at
> >> org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolveAlways(DefaultRepositoryMetadataManager.java:198)
> >>         ... 20 more
> >> Caused by: java.io.FileNotFoundException:
> >> /home/amm/.m2/repository/com/distra/useful/useful/maven-metadata-distra.xml.tmp
> >> (No such file or directory)
> >>         at java.io.FileInputStream.open(Native Method)
> >>         at java.io.FileInputStream.<init>(FileInputStream.java:106)
> >>         at
> >> org.apache.maven.wagon.AbstractWagon.postProcessListeners(AbstractWagon.java:531)
> >>         ... 24 more
> >> [INFO]
> >> ----------------------------------------------------------------------------
> >> [INFO] Total time: 14 seconds
> >> [INFO] Finished at: Mon Sep 19 11:41:06 EST 2005
> >> [INFO] Final Memory: 4M/17M
> >> [INFO]
> >> ----------------------------------------------------------------------------
> >> 
> >> Listing 2: pom.xml
> >> 
> >> <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/maven-v4_0_0.xsd">
> >>   <modelVersion>4.0.0</modelVersion>
> >>   <groupId>com.distra.useful</groupId>
> >>   <artifactId>useful</artifactId>
> >>   <packaging>jar</packaging>
> >>   <version>1.0</version>
> >>   <name>distra - useful</name>
> >>   <url>http://www.distra.com</url>
> >>   <distributionManagement>
> >>     <repository>
> >>       <id>distra</id>
> >>       <url>scpexe://office/data/development/bt3/m2/distra</url>
> >> <!--
> >>       NFS mounted path works as expected
> >>       <url>file:///office/data/development/bt3/m2/distra</url>
> >> -->
> >>     </repository>
> >>   </distributionManagement>
> >>   <build>
> >>     <extensions>
> >>       <extension>
> >>         <groupId>org.apache.maven.wagon</groupId>
> >>         <artifactId>wagon-ssh-external</artifactId>
> >>         <version>1.0-alpha-4</version>
> >>       </extension>
> >>     </extensions>
> >>   </build>
> >> </project>
> >> 
> >> Listing 3: settings.xml
> >> 
> >> <settings>
> >>   <servers>
> >>     <server>
> >>       <id>distra</id>
> >>       <username>amm</username>
> >>     </server>
> >>   </servers>
> >>   <profiles>
> >>     <profile>
> >>       <id>default</id>
> >>       <repositories>
> >>         <repository>
> >>           <id>distra</id>
> >>           <name>Distra libraries</name>
> >>           <url>scpexe://office/data/development/bt3/m2/distra</url>
> >>         </repository>
> >>       </repositories>
> >>     </profile>
> >>   </profiles>
> >> </settings>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org