You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wo...@AtosOrigin.com on 2008/09/04 15:06:51 UTC
repository definition
Hi,
I don't know if this is an issue or a bug or both:
In my settings.xml I define an internal repository :
<repositories>
<repository>
<id>internal</id>
<name>Repository on deacr001</name>
<url>file://Y:/IPS/Produkt/maven-repository/internal</url>
<layout>default</layout>
</repository>
</repositories>
In my pom I define a distributionManagement repository like this:
<distributionManagement>
<repository>
<id>internal</id>
</repository>
</distributionManagement>
>From intuitive feeling I would say: there is a reference to a defined repository in settings.xml, so Maven will find the missing attributes, but no it does not, it does like this:
Exception in thread "main" java.lang.NullPointerException
at org.apache.maven.wagon.PathUtils.protocol(PathUtils.java:206)
at org.apache.maven.wagon.repository.Repository.setUrl(Repository.java:121)
at org.apache.maven.wagon.repository.Repository.<init>(Repository.java:74)
at org.apache.maven.artifact.repository.DefaultArtifactRepository.<init>(DefaultArtifactRepository.java:75)
at org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory.createDeploymentArtifactRepository(DefaultArtifactRepositoryFactory.java:84)
at org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory.createDeploymentArtifactRepository(DefaultArtifactRepositoryFactory.java:65)
at org.apache.maven.DefaultMavenTools.buildDeploymentArtifactRepository(DefaultMavenTools.java:73)
at org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:1031)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:812)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:504)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
at org.apache.maven.DefaultMaven.build_aroundBody2(DefaultMaven.java:312)
at org.apache.maven.DefaultMaven.build_aroundBody3$advice(DefaultMaven.java:447)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:312)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:282)
at org.apache.maven.DefaultMaven.createReactorManager(DefaultMaven.java:103)
at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:160)
at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:52)
not very helpful this error message. It seems that I have to force my developers to define the URL two times in their settings.xml: First in the repositories/repository tag, second in the distributionManagement/repository tag. Not very convenient.
My experience with Maven is: Don't use intuition
Freundliche Grüße / Kind regards
Wolfgang Winter
System Analyst
--------------------------------------------------
Atos Worldline GmbH
Pascalstraße 19
52076 Aachen
Germany
Phone: +49 2408 148-0
Fax: +49 2408 148-204
mailto: wolfgang.winter@atosorigin.com <BL...@atosorigin.com>
http://www.atosworldline.de
Geschäftsführer: Erik Munk Koefoed
Aufsichtsratsvorsitzender: Dominique Illien
Sitz der Gesellschaft: Frankfurt/Main
Handelsregister: Frankfurt/Main HRB 58 268
Atos Worldline is an Atos Origin company: www.atosorigin.com
--------------------------------------------------
This e-mail is privileged and may contain confidential information intended only for the person(s) named above. If you receive this e-mail in error, please notify the sender immediately by telephone or return e-mail.
Although the sender endeavours to maintain a computer virus free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
AW: repository definition
Posted by Wo...@AtosOrigin.com.
> From intuitive feeling I would say: there is a reference to a defined
repository in settings.xml, so Maven will find the missing attributes,
but no it does not, it does like this:
...
> not very helpful this error message. It seems that I have to force my
developers to define the URL two times in their settings.xml: First in
the repositories/repository tag, second in the
distributionManagement/repository tag. Not very convenient.
I agree there should be a better error message and not a NPE.
However the urls for repositories and distribution management are
usually different-- file:// urls may be the only time they could be
shared. For example, you may pull from a repository as http:// , but
publish to it with dav:http:// or scp:// .
[Winter, Wolfgang] ... or pulling and publishing with ftp what we did
first and where the urls are also equal. But we discarded ftp with
ftp-wagon because it was so buggy and unreliable:
- sometimes Maven does not find the wagon-ftp plugin
- sometimes 'connection reset by peer' error
- sometimes only half of a file is published without any error message
- sometimes the deployed file is corrupted without any error message
This must have to do s.th. with Maven because with other FTP client we
have no problems.
Further, distributionManagement is often set once, up in an
organization level pom, and repositories can go in a shared
conf/settings.xml, neither of which developers need to maintain.
[Winter, Wolfgang] that's what I try to do: I have the
distributionManagement in an organisation pom with a variable for the
url which is set in settings and the repositories in settings. That's
why the developers seem to have to define the url two times in their
settings.
HTH,
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: repository definition
Posted by Wendy Smoak <ws...@gmail.com>.
On Thu, Sep 4, 2008 at 6:06 AM, <Wo...@atosorigin.com> wrote:
> From intuitive feeling I would say: there is a reference to a defined repository in settings.xml, so Maven will find the missing attributes, but no it does not, it does like this:
...
> not very helpful this error message. It seems that I have to force my developers to define the URL two times in their settings.xml: First in the repositories/repository tag, second in the distributionManagement/repository tag. Not very convenient.
I agree there should be a better error message and not a NPE.
However the urls for repositories and distribution management are
usually different-- file:// urls may be the only time they could be
shared. For example, you may pull from a repository as http:// , but
publish to it with dav:http:// or scp:// .
Further, distributionManagement is often set once, up in an
organization level pom, and repositories can go in a shared
conf/settings.xml, neither of which developers need to maintain.
HTH,
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org