You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stephane Eybert <mi...@yahoo.se> on 2010/02/20 08:45:47 UTC

Adding a repository to the settings.xml

Dear all,

I have a simple spring project and I'm trying to build it with maven. But it
fails because a dependency is not resolved.

Here is the message I get :

Missing:
----------
1) org.apache.velocity.tools:velocity-tools:jar:2.0-beta1

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=org.apache.velocity.tools
-DartifactId=velocity-tools -Dversion=2.0-beta1 -Dpackaging=jar
-Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file
there: 
      mvn deploy:deploy-file -DgroupId=org.apache.velocity.tools
-DartifactId=velocity-tools -Dversion=2.0-beta1 -Dpackaging=jar
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
  	1) org.stephane:spring-demo-server:jar:1.0-SNAPSHOT
  	2) org.apache.velocity.tools:velocity-tools:jar:2.0-beta1

2) javax.transaction:jta:jar:1.0.1B

  Try downloading the file manually from: 
      http://java.sun.com/products/jta

  Then, install it using the command: 
      mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta
-Dversion=1.0.1B -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file
there: 
      mvn deploy:deploy-file -DgroupId=javax.transaction -DartifactId=jta
-Dversion=1.0.1B -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
-DrepositoryId=[id]

  Path to dependency: 
  	1) org.stephane:spring-demo-server:jar:1.0-SNAPSHOT
  	2) org.hibernate:hibernate:jar:3.2.0.ga
  	3) javax.transaction:jta:jar:1.0.1B

3) org.apache.velocity.tools:velocity-tools-view:jar:2.0-beta1

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=org.apache.velocity.tools
-DartifactId=velocity-tools-view -Dversion=2.0-beta1 -Dpackaging=jar
-Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file
there: 
      mvn deploy:deploy-file -DgroupId=org.apache.velocity.tools
-DartifactId=velocity-tools-view -Dversion=2.0-beta1 -Dpackaging=jar
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
  	1) org.stephane:spring-demo-server:jar:1.0-SNAPSHOT
  	2) org.apache.velocity.tools:velocity-tools-view:jar:2.0-beta1

----------
3 required artifacts are missing.

I suppose I need to add a repository in my settings.xml file.

At first my settings.xml file looked like : 
http://old.nabble.com/file/p27664272/settings.xml settings.xml 

So I tried this but it did not help : 
http://old.nabble.com/file/p27664272/new_settings.xml new_settings.xml 

Here is my pom.xmk file :  http://old.nabble.com/file/p27664272/pom.xml
pom.xml 

Any clue ?

Thanks.
-- 
View this message in context: http://old.nabble.com/Adding-a-repository-to-the-settings.xml-tp27664272p27664272.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: Adding a repository to the settings.xml

Posted by Stephane Eybert <mi...@yahoo.se>.
It seems it worked since the jar file is now looked up in the repositories
listed in my settings.xml file.

Downloading:
http://repo2.maven.org/maven2//org/apache/velocity/tools/velocity-tools-view/2.0-beta1/velocity-tools-view-2.0-beta1.jar
[INFO] Unable to find resource
'org.apache.velocity.tools:velocity-tools-view:jar:2.0-beta1' in repository
maven2 (http://repo2.maven.org/maven2/)
Downloading:
http://www.ibiblio.org/maven//org/apache/velocity/tools/velocity-tools-view/2.0-beta1/velocity-tools-view-2.0-beta1.jar
[INFO] Unable to find resource
'org.apache.velocity.tools:velocity-tools-view:jar:2.0-beta1' in repository
ibiblio (http://www.ibiblio.org/maven/)
Downloading:
http://mvnrepository.com//org/apache/velocity/tools/velocity-tools-view/2.0-beta1/velocity-tools-view-2.0-beta1.jar
[INFO] Unable to find resource
'org.apache.velocity.tools:velocity-tools-view:jar:2.0-beta1' in repository
maven (http://mvnrepository.com/)
Downloading:
http://repo1.maven.org/maven2/org/apache/velocity/tools/velocity-tools-view/2.0-beta1/velocity-tools-view-2.0-beta1.jar
[INFO] Unable to find resource
'org.apache.velocity.tools:velocity-tools-view:jar:2.0-beta1' in repository
central (http://repo1.maven.org/maven2)
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

I guess I now have to find which repository hosts this velocity tools jar
file.
-- 
View this message in context: http://old.nabble.com/Adding-a-repository-to-the-settings.xml-tp27664272p27666480.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: Adding a repository to the settings.xml

Posted by Sreekanth Nelakurthi <sr...@gmail.com>.
There are 2 options of defining the repositories.

You can define the repositories in the pom.xml, but that will be specific to
the maven project.

or

settings.xml:

You cannot define the repositories outside the <profile> tag.

You can enable a profile by default by using the <activation> tag in the
profile.

<activation>
      <activeByDefault>true</activeByDefault>



On Sat, Feb 20, 2010 at 6:26 PM, Stephane Eybert <mi...@yahoo.se>wrote:

>
> I'd like to have this by default. Can I have this setup outside of any
> profile so as not to make it profile specific ?
>
> If I can I would prefer not to have to specify a profile simply to setup a
> repository.
> --
> View this message in context:
> http://old.nabble.com/Adding-a-repository-to-the-settings.xml-tp27664272p27666165.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: Adding a repository to the settings.xml

Posted by Stephane Eybert <mi...@yahoo.se>.
I'd like to have this by default. Can I have this setup outside of any
profile so as not to make it profile specific ?

If I can I would prefer not to have to specify a profile simply to setup a
repository.
-- 
View this message in context: http://old.nabble.com/Adding-a-repository-to-the-settings.xml-tp27664272p27666165.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: Adding a repository to the settings.xml

Posted by Sreekanth Nelakurthi <sr...@gmail.com>.
Please activate the profile which has the repositories defined in the
settings.xml

Regards,
Sreekanth

On Sat, Feb 20, 2010 at 1:15 PM, Stephane Eybert <mi...@yahoo.se>wrote:

>
> Dear all,
>
> I have a simple spring project and I'm trying to build it with maven. But
> it
> fails because a dependency is not resolved.
>
> Here is the message I get :
>
> Missing:
> ----------
> 1) org.apache.velocity.tools:velocity-tools:jar:2.0-beta1
>
>  Try downloading the file manually from the project website.
>
>  Then, install it using the command:
>      mvn install:install-file -DgroupId=org.apache.velocity.tools
> -DartifactId=velocity-tools -Dversion=2.0-beta1 -Dpackaging=jar
> -Dfile=/path/to/file
>
>  Alternatively, if you host your own repository you can deploy the file
> there:
>      mvn deploy:deploy-file -DgroupId=org.apache.velocity.tools
> -DartifactId=velocity-tools -Dversion=2.0-beta1 -Dpackaging=jar
> -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
>
>  Path to dependency:
>        1) org.stephane:spring-demo-server:jar:1.0-SNAPSHOT
>        2) org.apache.velocity.tools:velocity-tools:jar:2.0-beta1
>
> 2) javax.transaction:jta:jar:1.0.1B
>
>  Try downloading the file manually from:
>      http://java.sun.com/products/jta
>
>  Then, install it using the command:
>      mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta
> -Dversion=1.0.1B -Dpackaging=jar -Dfile=/path/to/file
>
>  Alternatively, if you host your own repository you can deploy the file
> there:
>      mvn deploy:deploy-file -DgroupId=javax.transaction -DartifactId=jta
> -Dversion=1.0.1B -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
> -DrepositoryId=[id]
>
>  Path to dependency:
>        1) org.stephane:spring-demo-server:jar:1.0-SNAPSHOT
>        2) org.hibernate:hibernate:jar:3.2.0.ga
>        3) javax.transaction:jta:jar:1.0.1B
>
> 3) org.apache.velocity.tools:velocity-tools-view:jar:2.0-beta1
>
>  Try downloading the file manually from the project website.
>
>  Then, install it using the command:
>      mvn install:install-file -DgroupId=org.apache.velocity.tools
> -DartifactId=velocity-tools-view -Dversion=2.0-beta1 -Dpackaging=jar
> -Dfile=/path/to/file
>
>  Alternatively, if you host your own repository you can deploy the file
> there:
>      mvn deploy:deploy-file -DgroupId=org.apache.velocity.tools
> -DartifactId=velocity-tools-view -Dversion=2.0-beta1 -Dpackaging=jar
> -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
>
>  Path to dependency:
>        1) org.stephane:spring-demo-server:jar:1.0-SNAPSHOT
>        2) org.apache.velocity.tools:velocity-tools-view:jar:2.0-beta1
>
> ----------
> 3 required artifacts are missing.
>
> I suppose I need to add a repository in my settings.xml file.
>
> At first my settings.xml file looked like :
> http://old.nabble.com/file/p27664272/settings.xml settings.xml
>
> So I tried this but it did not help :
> http://old.nabble.com/file/p27664272/new_settings.xml new_settings.xml
>
> Here is my pom.xmk file :  http://old.nabble.com/file/p27664272/pom.xml
> pom.xml
>
> Any clue ?
>
> Thanks.
> --
> View this message in context:
> http://old.nabble.com/Adding-a-repository-to-the-settings.xml-tp27664272p27664272.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
>
>