You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Bruno Aranda <br...@gmail.com> on 2006/05/10 14:09:25 UTC

[m2] Local copy for the metadata of a repository wrong

Hi all,

I have an internal repository and I have deployed a snapshot version
of a jar to it, using the deploy-file goal:

mvn deploy:deploy-file -DpomFile=artifactName-1.0-SNAPSHOT.pom
-Dfile=.artifactName.jar -DrepositoryId=ebi-repo
-Durl=scp://localhost/homes/maven/public_html/m2repo
-DuniqueVersion=false

Everything is created fine in the repository, as I can see the files
and the pom is correct.

The problem is that when I have another pom that depends on that
artifact, I get this error message:

[INFO] Error building POM (may not be this project's POM).
Project ID: myGroupId:artifactName
Reason: Error getting POM for 'myGroupId:artifactName' from the
repository: Unable to read local copy of metadata: Cannot read
metadata from '~/.m2/repository/myGroupId/1.0-SNAPSHOT/maven-metadata-my-repo.xml':
end tag name </head> must be the same as start tag <meta> from line 47
(position: TEXT seen ...  src =
"http://www.ebi.ac.uk/include/master.js"></script>\n</head>... @49:8)
  myGroupId:artifactName:pom:1.0-SNAPSHOT

And this is due to the fact that the maven-metadata-my-repo.xml file
contains the html code of the page that appears in my institution when
the servers returns a 404 (page not found).

I have this configuration in my pom:

<repositories>
         <repository>
            <id>central-repo</id>
            <name>Ibiblio repository</name>
            <url>http://www.ibiblio.org/maven2</url>
        </repository>
        <repository>
            <id>ebi-repo</id>
            <name>The EBI internal repository</name>
            <url>http://www.ebi.ac.uk/~maven/m2repo</url>
        </repository>
    </repositories>

I have put the central-repo explicitly so it is the first server
checked (otherwise for jars not present in the internal jar, but
present in the central repo I got an error, due to the fact that the
404 html page appear when asking to the internal repo.

With released artifacts (not snapshots) everything seems to be working fine...

Any ideas?

Thanks!

Bruno

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


Re: [m2] Local copy for the metadata of a repository wrong

Posted by Gayathri <ga...@yahoo.co.in>.
Hi,
We are struck with the same issue.
Were you able to solve this?

As a temporary fix, i deleted the maven-metadata-local.xml file and the
build runs fine but fails (as expected) during the subsequent builds.

Any help would be appreciated :)


Thanks,
Gayathri

--
View this message in context: http://maven.40175.n5.nabble.com/m2-Local-copy-for-the-metadata-of-a-repository-wrong-tp63887p4305709.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: [m2] Local copy for the metadata of a repository wrong

Posted by Bruno Aranda <br...@gmail.com>.
Sorry, a correction to the repositories section (missed a change when
writing the mail). Any help is appreciated!

<repositories>
        <repository>
           <id>central-repo</id>
           <name>Ibiblio repository</name>
           <url>http://www.ibiblio.org/maven2</url>
       </repository>
       <repository>
           <id>my-repo</id>
           <name>My repository</name>
           <url>http://www.ebi.ac.uk/~maven/m2repo</url>
       </repository>
   </repositories>

and the deploy-file command:

mvn deploy:deploy-file -DpomFile=artifactName-1.0-SNAPSHOT.pom
 -Dfile=.artifactName.jar -DrepositoryId=my-repo
 -Durl=scp://localhost/homes/maven/public_html/m2repo
 -DuniqueVersion=false

(just changed ebi-repo to my-repo, for example purposes)

Bruno

On 5/10/06, Bruno Aranda <br...@gmail.com> wrote:
> Hi all,
>
> I have an internal repository and I have deployed a snapshot version
> of a jar to it, using the deploy-file goal:
>
> mvn deploy:deploy-file -DpomFile=artifactName-1.0-SNAPSHOT.pom
> -Dfile=.artifactName.jar -DrepositoryId=ebi-repo
> -Durl=scp://localhost/homes/maven/public_html/m2repo
> -DuniqueVersion=false
>
> Everything is created fine in the repository, as I can see the files
> and the pom is correct.
>
> The problem is that when I have another pom that depends on that
> artifact, I get this error message:
>
> [INFO] Error building POM (may not be this project's POM).
> Project ID: myGroupId:artifactName
> Reason: Error getting POM for 'myGroupId:artifactName' from the
> repository: Unable to read local copy of metadata: Cannot read
> metadata from '~/.m2/repository/myGroupId/1.0-SNAPSHOT/maven-metadata-my-repo.xml':
> end tag name </head> must be the same as start tag <meta> from line 47
> (position: TEXT seen ...  src =
> "http://www.ebi.ac.uk/include/master.js"></script>\n</head>... @49:8)
>   myGroupId:artifactName:pom:1.0-SNAPSHOT
>
> And this is due to the fact that the maven-metadata-my-repo.xml file
> contains the html code of the page that appears in my institution when
> the servers returns a 404 (page not found).
>
> I have this configuration in my pom:
>
> <repositories>
>          <repository>
>             <id>central-repo</id>
>             <name>Ibiblio repository</name>
>             <url>http://www.ibiblio.org/maven2</url>
>         </repository>
>         <repository>
>             <id>ebi-repo</id>
>             <name>The EBI internal repository</name>
>             <url>http://www.ebi.ac.uk/~maven/m2repo</url>
>         </repository>
>     </repositories>
>
> I have put the central-repo explicitly so it is the first server
> checked (otherwise for jars not present in the internal jar, but
> present in the central repo I got an error, due to the fact that the
> 404 html page appear when asking to the internal repo.
>
> With released artifacts (not snapshots) everything seems to be working fine...
>
> Any ideas?
>
> Thanks!
>
> Bruno
>

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