Maven not loading tomcat-maven-plugin snapshot

Even after destroying 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 POM) the definition of the plugin repository:

<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 still have the following 404 error. If I really go over to this repo, it just doesn't exist in it (I am 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] ------------------------------------------------------------------------
+3
4

, pom:

<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>

SNAPSHOT :

$ 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] ------------------------------------------------------------------------

, , , . , ...


maven-metadata*.xml 1.0-SNAPSHOT tomcat-maven-plugin? ? ?

, maven -U.

mvn help:effective-pom , Maven , updatePolicy .

, , tomcat-maven-plugin .

, ( mvn install:install-file mojo) VCS . - , - ( maven ?).

+11

, , tomcat maven apache maven. Codehaus 1.0 . 2.0- ( tomcat 7), pom.xml. , 2.0 .

<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>

:

<plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <version>2.0-SNAPSHOT</version>
</plugin>
+6

, , "buildnumber" maven plugin, .

http://snapshots.repository.codehaus.org//org/codehaus/mojo/tomcat-maven-plugin/1.0-SNAPSHOT/maven-metadata.xml, , , theres xml- buildnumber .

, :

<version>1.0-SNAPSHOT</version>

:

<version>1.0-20091222.232027-11</version>

.

+1

, TomCat-Maven-Plugin Eclipse, Eclipse.

maven Eclipse, maven maven pom.xml.....

- , Maven Maven Build, :

, ...

- Eclipse, , Maven POM.xml, .

, Maven , " ".

" groupId, artifactId sha1 ..... Tomcat.

.

, - pom.xml, Maven.

Maven.

Run Configurations , , -.

, TomCat: run , .

, Tomcat, -. [http://localhost: 8080/webappname/defaultpagename]

walla!

0

Source: https://habr.com/ru/post/1727491/


All Articles