I'm having trouble figuring out how to configure SpringSource Tool Suite's m2 plugin. In order to get maven to work from the command line, I had to point to our enterprise repository in the settings.xml file.
If I try to build inside STS, I get the following:
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/com/mycompany/maven/adp/adp-base-pom/1.0.14/adp-base-pom-1.0.14.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.mycompany.edelivery:edelivery-build:current
(C:\code\workspace\edelivery-build\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not transfer artifact
com.mycompany.maven.adp:adp-base-pom:pom:1.0.14 from/to central
(http://repo1.maven.org/maven2): ConnectException and 'parent.relativePath'
points at wrong local POM # line 4,
column 11: UnresolvedAddressException -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
I presume that I need to tell STS where the enterprise repository is, how do I do that? The only thing I find under File -> Properties is a field for Active Maven Profiles and that didn't help.
Here is a snippet from the settings.xml file, what do I do with this information?
<profile>
<id>internal-profile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>always</updatePolicy>
</releases>
<name>Enterprise Plugin Repository</name>
<url>http://svn01g.gdc.nwie.net/maven2/enterprise</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>internal-release</id>
<name>MyCompany Enterprise Repository</name>
<url>http://svn01g.gdc.nwie.net/maven2/enterprise</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>
</profile>
Assuming you're using release 0.12.1 or earlier of the m2eclipse plugin, all you should have to do is point m2eclipse to your local maven installation. Choose Window -> Preferences -> Maven -> Installations, click Add... and browse to the root of your Maven installation. Remember you need to do this again whenever you switch to a new workspace.
The repository should be specified in the POM. Then everybody can find it.
Related
I've declared release and snapshot repositories in the parent POM so as to make them available to all child modules
Here's the parent repository tag
<repositories>
<repository>
<id>foo-releases</id>
<url>https://nexusrm.cloud.bar.com/repository/foo-releases/</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>foo-milestones</id>
<url>https://nexusrm.cloud.bar.com/repository/foo-milestones/</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<!-- bleeding edge -->
<id>foo-snapshots</id>
<url>https://nexusrm.cloud.bar.com/repository/foo-snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
We also have a mirror but that is mapped to central spring-milestones and spring-releases only
<mirrors>
<mirror>
<id>bar-maven-mirror</id>
<name>bar Hosted Maven Mirror</name>
<url>https://nexusrm.cloud.bar.com/repository/maven-public/</url>
<mirrorOf>!foo-snapshots,!foo-releases,!foo-milestones,!lp-snapshots,!lp-releases,*</mirrorOf>
</mirror>
</mirrors>
The parent POM is built and published to the foo-snapshots repository.
Problem I'm facing is that the build in my child module fails with the following error unless I copy the <repositories> tag in it. Since I've already added that tag to the Parent POM and expect to be inherited; doing this step seems redundant, however, that's when the build succeeds.
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.bar.cloud:foo-kafka-client:1.0.0-SNAPSHOT (/Users/anadimisra/code/bar/foo/libraries/foo-kafka-client/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.bar.cloud:foo-kafka-client:1.0.0-SNAPSHOT: Could not find artifact com.bar.cloud:foo:pom:1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM # line 5, column 13 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
I have also declared the parent in kafka-client
<parent>
<groupId>com.bar.cloud</groupId>
<artifactId>foo</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
NOTE: these are all spring boot microservices, which get built in Serverless Pods on commit, hence parent and child modules are all in separate repositories and thereby adding profiles or building from parent is not the solution I'm looking for as it is not feasible in my case.
Have you tried a 'maven install' on your parent first? If it is not installed in your local maven repository, other libraries won't find it.
Also why use another versioning scheme for your parent (e.g 1.0-SNAPSHOT) than your child (e.g. 1.0.0-SNAPSHOT). I do not think that this is an error but you can also have Bugfixes in your parent project. And it's nice for the sake of consistency
I've tried to run my maven based spring proyect locally with no pom modifications but it doesn't work, I got the following error (replace ${IP} with http://172.24.14.196:8888 because of my rank can't post more than 2 links):
[INFO] Scanning for projects...
Downloading: ${IP}/archiva/repository/internal/org/springframework/boot/spring-boot-starter-parent/2.0.0.BUILD-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework.boot:spring-boot-starter-parent:2.0.0.BUILD-SNAPSHOT/maven-metadata.xml from/to archiva.central (${IP}172.24.14.196:8888/archiva/repository/internal/): Connect to 172.24.14.196:8888 [/172.24.14.196] failed: Connection timed out: connect
Downloading: ${IP}/archiva/repository/internal/org/springframework/boot/spring-boot-starter-parent/2.0.0.BUILD-SNAPSHOT/spring-boot-starter-parent-2.0.0.BUILD-SNAPSHOT.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project co.com.spicy:Shapers:0.0.1-SNAPSHOT (E:\shapers\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.0.BUILD-SNAPSHOT from/to archiva.central (${IP}/archiva/repository/internal/): Connect to 172.24.14.196:8888 [/172.24.14.196] failed: Connection timed out: connect and 'parent.relativePath' points at no local POM # line 14, column 13 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
It looks like the spring-boot-starter its is getting no connection from the archiva central and cannot load resources, how can I manually load this resources or what is my problem?
I'm using the same configuration given here:
https://projects.spring.io/spring-boot/
If spring-boot dependencies are missing in archiva you can download them from spring repositories.
Add this to pom.xml
<repositories>
<repository>
<id>spring-repo</id>
<name>Spring Repository</name>
<url>https://repo.spring.io/release</url>
</repository>
<repository>
<id>spring-milestone</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone</url>
</repository>
<repository>
<id>spring-snapshot</id>
<name>Spring Snapshot Repository</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
I have this weird situation. I have an spring boot application and in that application there are some legacy jars were needed to run the application. mvn does not allow to have a lib folder. So I added the jars to the local maven repository.
This worked well (Till there are no repositories declared in the pom file) till I wanted to add, spring-batch-admin.version 2.0-BUILD-SNAPSHOT, to my project.
So, when I added this,
<repository>
<id>spring-snapshots-local</id>
<name>Spring Maven Snapshot Repository</name>
<url>https://repo.spring.io/libs-snapshot-local/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
I get good amount of Missing artifact, and also when I tried to run mvn install in command line, i get,
[ERROR] Failed to execute goal on project webapp: Could not resolve dependencies for project com.ccc.cccc-tool:webapp:war:0.0.1-SNAPSHOT: Failed to collect dependencies at com.ccj:CCjJDBC:jar:1.0: Failed to read artifact descriptor for com.ccj:CCjJDBC:jar:1.0: Could not transfer artifact com.ccc:CCjJDBC:pom:1.0 from/to spring-snapshots-local (https://repo.spring.io/libs-snapshot-local/): Failed to transfer file: https://repo.spring.io/libs-snapshot-local/com/ccj/CCjJDBC/1.0/CCjJDBC-1.0.pom. Return code is: 409 , ReasonPhrase:Conflict. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
I am not think of uploading these legacy jars to the maven central to get this to working. What am I doing wrong here.
Try to add the local repository into your project. For example, your have a jar file
group: com.packagename
artifactId: somejarfile
version: 2.0.0b
Then add this code into your pom.xml file:
<repositories>
<repository>
<id>localDependenciesRepo</id>
<releases>
<enabled>true</enabled>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<url>file://${project.basedir}/src/main/resources/localDependenciesRepo</url>
</repository>
</repositories>
Then create a folder for this repository src/main/resources/localDependenciesRepo. Create a folder structure for the library: com -> packagename -> somejarfile -> 2.0.0b. "->" means new folder of course.
And put your jar file into this folder.
Don't forget to copy/create pom.xml file for your jar file. As example:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.packagename</groupId>
<artifactId>somejarfile</artifactId>
<version>2.0.0b</version>
</project>
At least I use this solution and it works perfectly.
I have just checked out some projects and need to build them, however I installed Maven quite some time ago (6 months maybe?) and really haven't used it since - the pom.xml for the project I have doesn't have this "http://repo1.maven.org/myurlhere" anywhere in it - it has the absolute url where the Maven repo is for the project, but Maven is still trying to download from the general Maven repo:
Macintosh:trunk$ mvn clean install
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/url/project/project/x.x/project-x.x.pom
[INFO] Unable to find resource 'url.project:project:pom:x.x' in repository central (http://repo1.maven.org/)
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
GroupId: url.project
ArtifactId: project
Version: x.x
Reason: Unable to download the artifact from any repository
url.project:project:pom:x.x
from the specified remote repositories:
central (http://repo1.maven.org/)
Can anyone help me with what I'm not doing right?
Basically, I have just checked the projects out from the command line, cd-ed into the directory and ran mvn clean install - nothing else.
Any help is greatly appreciated.
the pom.xml for the project I have doesn't have this "http://repo1.maven.org/myurlhere" anywhere in it
All projects have http://repo1.maven.org/ declared as <repository> (and <pluginRepository>) by default. This repository, which is called the central repository, is inherited like others default settings from the "Super POM" (all projects inherit from the Super POM). So a POM is actually a combination of the Super POM, any parent POMs and the current POM. This combination is called the "effective POM" and can be printed using the effective-pom goal of the Maven Help plugin (useful for debugging).
And indeed, if you run:
mvn help:effective-pom
You'll see at least the following:
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Maven Repository Switchboard</name>
<url>http://repo1.maven.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Maven Plugin Repository</name>
<url>http://repo1.maven.org/maven2</url>
</pluginRepository>
</pluginRepositories>
it has the absolute url where the maven repo is for the project but maven is still trying to download from the general maven repo
Maven will try to find dependencies in all repositories declared, including in the central one which is there by default as we saw. But, according to the trace you are showing, you only have one repository defined (the central repository) or maven would print something like this:
Reason: Unable to download the artifact from any repository
url.project:project:pom:x.x
from the specified remote repositories:
central (http://repo1.maven.org/),
another-repository (http://another/repository)
So, basically, maven is unable to find the url.project:project:pom:x.x because it is not available in central.
But without knowing which project you've checked out (it has maybe specific instructions) or which dependency is missing (it can maybe be found in another repository), it's impossible to help you further.
By default, Maven will always look in the official Maven repository, which is http://repo1.maven.org.
When Maven tries to build a project, it will look in your local repository (by default ~/.m2/repository but you can configure it by changing the <localRepository> value in your ~/.m2/settings.xml) to find any dependency, plugin or report defined in your pom.xml. If the adequate artifact is not found in your local repository, it will look in all external repositories configured, starting with the default one, http://repo1.maven.org.
You can configure Maven to avoid this default repository by setting a mirror in your settings.xml file:
<mirrors>
<mirror>
<id>repoMirror</id>
<name>Our mirror for Maven repository</name>
<url>http://the/server/</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
This way, instead of contacting http://repo1.maven.org, Maven will contact your entreprise repository (http://the/server in this example).
If you want to add another repository, you can define a new one in your settings.xml file:
<profiles>
<profile>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>foo.bar</id>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<url>http://new/repository/server</url>
</repository>
</repositories>
You can see the complete settings.xml model here.
Concerning the clean process, you can ask Maven to run it offline. In this case, Maven will not try to reach any external repositories:
mvn -o clean
tl;dr
All maven POMs inherit from a base Super POM.
The snippet below is part of the Super POM for Maven 3.5.4.
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
I think what you have missed here is this:
https://maven.apache.org/settings.html#Servers
The repositories for download and deployment are defined by the repositories and distributionManagement elements of the POM. However, certain settings such as username and password should not be distributed along with the pom.xml. This type of information should exist on the build server in the settings.xml.
This is the prefered way of using custom repos. So probably what is happening is that the url of this repo is in settings.xml of the build server.
Once you get hold of the url and credentials, you can put them in your machine here: ~/.m2/settings.xml like this:
<settings ...>
.
.
.
<servers>
<server>
<id>internal-repository-group</id>
<username>YOUR-USERNAME-HERE</username>
<password>YOUR-PASSWORD-HERE</password>
</server>
</servers>
</settings>
EDIT:
You then need to refer this repository into project POM. The id internal-repository-group can be used in every project. You can setup multiple repos and credentials setting using different IDs in settings xml.
The advantage of this approach is that project can be shared without worrying about the credentials and don't have to mention the credentials in every project.
Following is a sample pom of a project using "internal-repository-group"
<repositories>
<repository>
<id>internal-repository-group</id>
<name>repo-name</name>
<url>http://project.com/yourrepourl/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
Basically, all Maven is telling you is that certain dependencies in your project are not available in the central maven repository. The default is to look in your local .m2 folder (local repository), and then any configured repositories in your POM, and then the central maven repository. Look at the repositories section of the Maven reference.
The problem is that the project that was checked in didn't configure the POM in such a way that all the dependencies could be found and the project could be built from scratch.
Even after wiping out my settings.xml, I still get this error when trying to use this snapshot dependency. Given the dependency:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<path>/licensing</path>
<tomcatWebXml>${basedir}/src/main/mock/web.xml</tomcatWebXml>
</configuration>
</plugin>
And (in the POM), the plugin repository definition:
<pluginRepository>
<id>Codehaus Snapshots</id>
<url>http://snapshots.repository.codehaus.org</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled> <!-- Workaround for MNG-2974, see note below -->
</releases>
</pluginRepository>
I'm left with the following 404 error. If I actually navigate out to that repo, the jar it's looking for isn't there, just dated ones (I'm not familiar with the mechanics of how Maven ultimately resolves expected dependency names).
Ideas?
Downloading: http://snapshots.repository.codehaus.org/org/codehaus/mojo/tomcat-maven-plugin/1.0-SNAPSHOT/tomcat-maven-pl
ugin-1.0-SNAPSHOT.jar
[INFO] Unable to find resource 'org.codehaus.mojo:tomcat-maven-plugin:maven-plugin:1.0-SNAPSHOT' in repository Codehaus
Snapshots (http://snapshots.repository.codehaus.org)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] A required plugin was not found: Plugin could not be found - check that the goal name is correct: Unable to downl
oad the artifact from any repository
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.codehaus.mojo -DartifactId=tomcat-maven-plugin -Dversion=1.0-SNAPSHOT -Dpacka
ging=maven-plugin -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.codehaus.mojo -DartifactId=tomcat-maven-plugin -Dversion=1.0-SNAPSHOT -Dpackagi
ng=maven-plugin -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
org.codehaus.mojo:tomcat-maven-plugin:maven-plugin:1.0-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
Codehaus Snapshots (http://snapshots.repository.codehaus.org)
org.codehaus.mojo:tomcat-maven-plugin:maven-plugin:1.0-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
Codehaus Snapshots (http://snapshots.repository.codehaus.org)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Wed Jan 06 10:06:49 EST 2010
[INFO] Final Memory: 14M/36M
[INFO] ------------------------------------------------------------------------
I rechecked and, with the following pom fragments:
<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">
...
<pluginRepositories>
<pluginRepository>
<id>Codehaus Snapshots</id>
<url>http://snapshots.repository.codehaus.org/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled> <!-- Workaround for MNG-2974, see note below -->
</releases>
</pluginRepository>
</pluginRepositories>
...
<build>
<finalName>my-webapp</finalName>
<plugins>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
</plugin>
...
</plugins>
...
</build>
</project>
The SNAPSHOT of the plugin has been downloaded successfully:
$ mvn clean
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building my-webapp Maven Webapp
[INFO] task-segment: [clean]
[INFO] ------------------------------------------------------------------------
[INFO] snapshot org.codehaus.mojo:tomcat-maven-plugin:1.0-SNAPSHOT: checking for updates from Codehaus Snapshots
[INFO] snapshot org.codehaus.mojo:tomcat-maven-plugin:1.0-SNAPSHOT: checking for updates from maven2-repository.dev.java.net
Downloading: http://snapshots.repository.codehaus.org//org/codehaus/mojo/tomcat-maven-plugin/1.0-SNAPSHOT/tomcat-maven-plugin-1.0-20091222.232027-11.pom
5K downloaded (tomcat-maven-plugin-1.0-20091222.232027-11.pom)
Downloading: http://snapshots.repository.codehaus.org//org/codehaus/mojo/tomcat-maven-plugin/1.0-SNAPSHOT/tomcat-maven-plugin-1.0-20091222.232027-11.jar
48K downloaded (tomcat-maven-plugin-1.0-20091222.232027-11.jar)
[INFO] [clean:clean {execution: default-clean}]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9 seconds
[INFO] Finished at: Wed Jan 06 16:13:28 CET 2010
[INFO] Final Memory: 7M/78M
[INFO] ------------------------------------------------------------------------
It's very weird because I can't see any difference, but things are working as expected. In other words, I can't reproduce...
In your local repository, do you have maven-metadata*.xml files in the 1.0-SNAPSHOT directory for the tomcat-maven-plugin artifact? Do they match the ones on the remote server? Do they correctly specify the build number and timestamp?
If they are incorrect locally, running maven with -U might help.
You might also check mvn help:effective-pom and see what Maven thinks the updatePolicy is for snapshots on that repository.
Or maybe just delete your tomcat-maven-plugin artifact from your local repository and try again.
If nothing helps, try to install it manually (download the plugin from the repository and use the mvn install:install-file mojo) or checkout the sources from the VCS and build it locally. But these options are just workarounds, you have a problem somewhere (what version of maven are you using?).
I know this post is a little old, but the tomcat maven plugin has been moved to the apache maven repository. Codehaus only hosts version 1.0 of the plugin. If you want 2.0-snapshot (so you can run tomcat 7), you need to change your pom.xml a little bit. Note that 2.0 is under development.
<repositories>
...
<repository>
<id>people.apache.snapshots</id>
<url>http://repository.apache.org/content/groups/snapshots-group/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>apache.snapshots</id>
<name>Apache Snapshots</name>
<url>http://repository.apache.org/content/groups/snapshots-group/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
And your plugin configuration goes like this:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0-SNAPSHOT</version>
</plugin>
Not sure exactly, but looks like they might be using some form of the "buildnumber" maven plugin to include version control revision numbers.
Take a look at http://snapshots.repository.codehaus.org//org/codehaus/mojo/tomcat-maven-plugin/1.0-SNAPSHOT/maven-metadata.xml and you'll notice that in addition to the normal stuff, theres a xml tag for buildnumber and timestamp.
This may not be ideal, but you might be able to replace:
<version>1.0-SNAPSHOT</version>
with:
<version>1.0-20091222.232027-11</version>
To at least get up and running with the latest version of the plugin.
First off let me say that you do not download the TomCat-Maven-Plugin for Eclipse like other Eclipse plugins.
You simply use the maven tools in Eclipse, to insert the correct maven plugin build commands into your maven pom.xml file.....
If anyone is having trouble understanding how to get their Maven project to run as a maven Build configuration, there are a couple of things you may need to look for:
I would like to upload an image but oh well....
In your Eclipse Web App, hopefully you have a Maven POM.xml file, if not you need to set that up first.
Then, you can right click on it and then find Maven in your menu, then the sub menu item comes up, with a choice called Add Plugin.
There is a field called "Enter groupId, artifactId or sha1, etc....
Type in the word Tomcat there.
It will then load search results in the box below.
Basically what this does is load details in your pom.xml as to which plugins to download when building with Maven.
After that you need to do the Maven build.
Then, you want to go to Run Configurations and make sure you have the correct path to where your webapp lives.
Also in that page, under goals type TomCat:run
Then apply
Finally run.
If all goes well you will have a Tomcat server running the web app.
Then you can go to a browser and enter [http://localhost:8080/webappname/defaultpagename]
and walla!