You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jakub Pawlowicz <co...@jakubpawlowicz.com> on 2006/04/21 09:18:58 UTC

[m2] installing plugins from codehaus repository

Hi!

I would like to install Codehaus tomcat-maven-plugin into my local repository.
One way is to download the sources from subversion repository, compile them
and install with the 'mvn install:install', which works like a charm (but it's
not automatic, though).
AFAIK the other way is to use Codehaus snapshots repository
(http://snapshots.maven.codehaus.org/maven2/). 

So how to force maven to download the tomcat-maven-plugin from the Codehaus
repository?
Do I have to add it as a dependency?

I've added <mirrors> section to my settings.xml, but it doesn't work for me.

Here are excerpts from my settings.xml and pom.xml:

settings.xml:
<settings>
...
  <mirrors>
    <mirror>
      <id>codehaus</id>
      <mirrorOf>central</mirrorOf>
      <url>http://snapshots.maven.codehaus.org/maven2/</url>
    </mirror>
  </mirrors>
...
</settings>

pom.xml:
<build>
 <plugins>
...
  <plugin>
   <groupId>org.codehaus.mojo</groupId>
   <artifactId>tomcat-maven-plugin</artifactId>
  </plugin>
...
 </plugins>
</build>

Regards,
Jakub

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


Re: [m2] installing plugins from codehaus repository

Posted by Jakub Pawlowicz <co...@jakubpawlowicz.com>.
Now it works perfectly well.
Actually, I put this code in the settings.xml to share it among all my projects.

Thanks for your help!

Regards,
Jakub

On Fri, 21 Apr 2006 10:00:35 +0200, Boris Lenzinger wrote
> I think you have to add this to your pom.xml (in pluginRepositories 
> XML element):
> 
>     <pluginRepository>
>       <id>CodeHaus</id>
>       <name>Codehaus Repository</name>
>       <url>http://snapshots.maven.codehaus.org/maven2</url>
>       <layout>default</layout>
>       <snapshots>
>         <enabled>true</enabled>
>       </snapshots>
>       <releases>
>         <enabled>false</enabled>
>         <updatePolicy>never</updatePolicy>
>       </releases>
>     </pluginRepository>
> 
> It should do the job (well it does for me ;) )
> 
> Jakub Pawlowicz a écrit :
> > Hi Boris,
> >
> > Not exactly. I've tried installing maven-tomcat-plugin by compiling it from
> > svn, but on different machine (at home). On my current machine (at work)
> > there's no maven-tomcat-plugin in repository at all.
> >
> > But I've added the version information, and now maven gives me such a message:
> >
> > C:\work\spring-jsf>mvn -U clean
> > [INFO] Scanning for projects...
> > [INFO]
> > ----------------------------------------------------------------------------
> > [INFO] Building Maven Webapp Archetype
> > [INFO]    task-segment: [clean]
> > [INFO]
> > ----------------------------------------------------------------------------
> > [INFO] artifact org.apache.maven.plugins:maven-clean-plugin: checking for
> > updates from central
> > [INFO] artifact org.codehaus.mojo:jspc-maven-plugin: checking for updates from
> > central
> > [INFO] artifact org.apache.maven.plugins:maven-war-plugin: checking for
> > updates from central
> > [INFO]
------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO]
------------------------------------------------------------------------
> > [INFO] Failed to resolve artifact.
> >
> > GroupId: org.codehaus.mojo
> > ArtifactId: tomcat-maven-plugin
> > Version: 1.0-SNAPSHOT
> >
> > Reason: Unable to download the artifact from any repository
> >
> >   org.codehaus.mojo:tomcat-maven-plugin:pom:1.0-SNAPSHOT
> >
> > from the specified remote repositories:
> >   central (http://repo1.maven.org/maven2)
> > ...
> >
> > So it's trying to download it from the central repository, but actually
> > there's no such a resource. So the next (final?) step would be to tell maven
> > to try download it from the codehaus mirror.
> >
> > Any thoughts?
> >
> > Regards,
> > Jakub
> >
> > On Fri, 21 Apr 2006 09:36:26 +0200, Boris Lenzinger wrote
> >   
> >> Did you try to put a version in your plugin section ?
> >> <version>1.0-SNAPSHOT</version>
> >>
> >> If I understand well, you have already installed a maven-tomcat-
> >> plugin 
> >> (from compilation of svn) So may be maven sees that you have a 
> >> tomcat plugin in your repository and does not search for another 
> >> since you already have it. May be the version can force it to lookup 
> >> to remote repository and then force the download (since your version 
> >> should not match this version).
> >>
> >> If your version (your compiled one) is larger than 1.0-SNAPSHOT, may 
> >> be try with the syntax [1.0-SNAPSHOT] I've read in previous threads 
> >> that this points to a uniq version. If your version is greater, then 
> >> you will never download the plugin until a new version is out ;)
> >>
> >> Just an idea...
> >>
> >> Jakub Pawlowicz a écrit :
> >>     
> >>> Hi!
> >>>
> >>> I would like to install Codehaus tomcat-maven-plugin into my local
repository.
> >>> One way is to download the sources from subversion repository, compile them
> >>> and install with the 'mvn install:install', which works like a charm
(but it's
> >>> not automatic, though).
> >>> AFAIK the other way is to use Codehaus snapshots repository
> >>> (http://snapshots.maven.codehaus.org/maven2/). 
> >>>
> >>> So how to force maven to download the tomcat-maven-plugin from the Codehaus
> >>> repository?
> >>> Do I have to add it as a dependency?
> >>>
> >>> I've added <mirrors> section to my settings.xml, but it doesn't work for me.
> >>>
> >>> Here are excerpts from my settings.xml and pom.xml:
> >>>
> >>> settings.xml:
> >>> <settings>
> >>> ...
> >>>   <mirrors>
> >>>     <mirror>
> >>>       <id>codehaus</id>
> >>>       <mirrorOf>central</mirrorOf>
> >>>       <url>http://snapshots.maven.codehaus.org/maven2/</url>
> >>>     </mirror>
> >>>   </mirrors>
> >>> ...
> >>> </settings>
> >>>
> >>> pom.xml:
> >>> <build>
> >>>  <plugins>
> >>> ...
> >>>   <plugin>
> >>>    <groupId>org.codehaus.mojo</groupId>
> >>>    <artifactId>tomcat-maven-plugin</artifactId>
> >>>   </plugin>
> >>> ...
> >>>  </plugins>
> >>> </build>
> >>>
> >>> Regards,
> >>> Jakub
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>> For additional commands, e-mail: users-help@maven.apache.org
> >>>
> >>>
> >>>
> >>>       
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>     
> >
> >
> >


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


Re: [m2] installing plugins from codehaus repository

Posted by Jakub Pawlowicz <co...@jakubpawlowicz.com>.
Hi Boris,

Not exactly. I've tried installing maven-tomcat-plugin by compiling it from
svn, but on different machine (at home). On my current machine (at work)
there's no maven-tomcat-plugin in repository at all.

But I've added the version information, and now maven gives me such a message:

C:\work\spring-jsf>mvn -U clean
[INFO] Scanning for projects...
[INFO]
----------------------------------------------------------------------------
[INFO] Building Maven Webapp Archetype
[INFO]    task-segment: [clean]
[INFO]
----------------------------------------------------------------------------
[INFO] artifact org.apache.maven.plugins:maven-clean-plugin: checking for
updates from central
[INFO] artifact org.codehaus.mojo:jspc-maven-plugin: checking for updates from
central
[INFO] artifact org.apache.maven.plugins:maven-war-plugin: checking for
updates from central
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: org.codehaus.mojo
ArtifactId: tomcat-maven-plugin
Version: 1.0-SNAPSHOT

Reason: Unable to download the artifact from any repository

  org.codehaus.mojo:tomcat-maven-plugin:pom:1.0-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)
...

So it's trying to download it from the central repository, but actually
there's no such a resource. So the next (final?) step would be to tell maven
to try download it from the codehaus mirror.

Any thoughts?

Regards,
Jakub

On Fri, 21 Apr 2006 09:36:26 +0200, Boris Lenzinger wrote
> Did you try to put a version in your plugin section ?
> <version>1.0-SNAPSHOT</version>
> 
> If I understand well, you have already installed a maven-tomcat-
> plugin 
> (from compilation of svn) So may be maven sees that you have a 
> tomcat plugin in your repository and does not search for another 
> since you already have it. May be the version can force it to lookup 
> to remote repository and then force the download (since your version 
> should not match this version).
> 
> If your version (your compiled one) is larger than 1.0-SNAPSHOT, may 
> be try with the syntax [1.0-SNAPSHOT] I've read in previous threads 
> that this points to a uniq version. If your version is greater, then 
> you will never download the plugin until a new version is out ;)
> 
> Just an idea...
> 
> Jakub Pawlowicz a écrit :
> > Hi!
> >
> > I would like to install Codehaus tomcat-maven-plugin into my local repository.
> > One way is to download the sources from subversion repository, compile them
> > and install with the 'mvn install:install', which works like a charm (but it's
> > not automatic, though).
> > AFAIK the other way is to use Codehaus snapshots repository
> > (http://snapshots.maven.codehaus.org/maven2/). 
> >
> > So how to force maven to download the tomcat-maven-plugin from the Codehaus
> > repository?
> > Do I have to add it as a dependency?
> >
> > I've added <mirrors> section to my settings.xml, but it doesn't work for me.
> >
> > Here are excerpts from my settings.xml and pom.xml:
> >
> > settings.xml:
> > <settings>
> > ...
> >   <mirrors>
> >     <mirror>
> >       <id>codehaus</id>
> >       <mirrorOf>central</mirrorOf>
> >       <url>http://snapshots.maven.codehaus.org/maven2/</url>
> >     </mirror>
> >   </mirrors>
> > ...
> > </settings>
> >
> > pom.xml:
> > <build>
> >  <plugins>
> > ...
> >   <plugin>
> >    <groupId>org.codehaus.mojo</groupId>
> >    <artifactId>tomcat-maven-plugin</artifactId>
> >   </plugin>
> > ...
> >  </plugins>
> > </build>
> >
> > Regards,
> > Jakub
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


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


Re: [m2] installing plugins from codehaus repository

Posted by Boris Lenzinger <bo...@gmail.com>.
Did you try to put a version in your plugin section ?
<version>1.0-SNAPSHOT</version>

If I understand well, you have already installed a maven-tomcat-plugin 
(from compilation of svn)
So may be maven sees that you have a tomcat plugin in your repository 
and does not search for another since you already have it. May be the 
version can force it to lookup to remote repository and then force the 
download (since your version should not match this version).

If your version (your compiled one) is larger than 1.0-SNAPSHOT, may be 
try with the syntax [1.0-SNAPSHOT]
I've read in previous threads that this points to a uniq version. If 
your version is greater, then you will never download the plugin until a 
new version is out ;)

Just an idea...

Jakub Pawlowicz a écrit :
> Hi!
>
> I would like to install Codehaus tomcat-maven-plugin into my local repository.
> One way is to download the sources from subversion repository, compile them
> and install with the 'mvn install:install', which works like a charm (but it's
> not automatic, though).
> AFAIK the other way is to use Codehaus snapshots repository
> (http://snapshots.maven.codehaus.org/maven2/). 
>
> So how to force maven to download the tomcat-maven-plugin from the Codehaus
> repository?
> Do I have to add it as a dependency?
>
> I've added <mirrors> section to my settings.xml, but it doesn't work for me.
>
> Here are excerpts from my settings.xml and pom.xml:
>
> settings.xml:
> <settings>
> ...
>   <mirrors>
>     <mirror>
>       <id>codehaus</id>
>       <mirrorOf>central</mirrorOf>
>       <url>http://snapshots.maven.codehaus.org/maven2/</url>
>     </mirror>
>   </mirrors>
> ...
> </settings>
>
> pom.xml:
> <build>
>  <plugins>
> ...
>   <plugin>
>    <groupId>org.codehaus.mojo</groupId>
>    <artifactId>tomcat-maven-plugin</artifactId>
>   </plugin>
> ...
>  </plugins>
> </build>
>
> Regards,
> Jakub
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>   


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