Erro no Maven - A required plugin was not found: Plugin could not be found

5 respostas
D

Pessoal, bom dia.

Estou com um problema ao utilizar o Maven. Qualquer comando que eu tente executar, seja um clean, install ou qualquer outro, eu tenho o seguinte erro

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - struts-estudo:struts-estudo:war:0.0.1-SNAPSHOT
[INFO]    task-segment: [clean]
[INFO] ------------------------------------------------------------------------
Downloading: https://repository.jboss.org/nexus/content/groups/public-jboss//org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.jar
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.2' from repository jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public-jboss/): Error transferring file: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.jar
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.2' from repository central (http://repo1.maven.org/maven2): Authorization failed: Access denied to: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.jar
[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 download 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.apache.maven.plugins -DartifactId=maven-clean-plugin -Dversion=2.2 -Dpackaging=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.apache.maven.plugins -DartifactId=maven-clean-plugin -Dversion=2.2 -Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]


  org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.2

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public-jboss/)


  org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.2

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public-jboss/)


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Fri Nov 09 10:24:10 BRST 2012
[INFO] Final Memory: 3M/7M
[INFO] ------------------------------------------------------------------------

Dei uma pesquisada na net, mas não encontrei nada que pudesse me auxiliar. Alguém poderia me dar uma ajuda?

5 Respostas

T

passe o pom.xml tbm

D

Segue o 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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>struts-estudo</groupId>
	<artifactId>struts-estudo</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>war</packaging>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.0.2</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
		</plugins>
	</build>

	
</project>
T
dsystem:
Segue o 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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>struts-estudo</groupId>
	<artifactId>struts-estudo</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>war</packaging>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.0.2</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
		</plugins>
	</build>

	
</project>

dentro de <build>
add isso

&lt;plugins&gt;
         &lt;plugin&gt;
            &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
            &lt;version&gt;2.1.1&lt;/version&gt;
            &lt;configuration&gt;
               &lt;!-- Java EE 6 doesn't require web.xml, Maven needs to catch 
                  up! --&gt;
               &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
            &lt;/configuration&gt;
         &lt;/plugin&gt;
      &lt;/plugins&gt;
D

tmvolpato,

Eu fiz o procedimento descrito acima, porém continua com o mesmo erro. Você tem alguma outra sugestão?

T

Amigo,

Seu pom esta correto, porem para realizar qualquer ação do maven, antes ele resolve as dependencias e por algum motivo você esta sem acesso ao repositório central,
você tem proxy ou firewall com restrições?

Criado 9 de novembro de 2012
Ultima resposta 23 de nov. de 2012
Respostas 5
Participantes 3