Maven , build-failure-erreur plugin
Résolu
etbienwi
Messages postés
18
Date d'inscription
Statut
Membre
Dernière intervention
-
etbienwi Messages postés 18 Date d'inscription Statut Membre Dernière intervention -
etbienwi Messages postés 18 Date d'inscription Statut Membre Dernière intervention -
Bonsoir,
J'ai utilisé Spring Initializr pour générez un squelette de projet spring dans le but de faire une application web pour une liste de tâches.
Le projet s'appel spring-todo mais quand je le lance en utilisant : mvn spring-todo:run , j'ai cette erreur qui apparaît:
J'ai lu le lien d'aide proposé mais je ne sais toujours pas comment réglé le problème.
Merci d'avance.
J'ai utilisé Spring Initializr pour générez un squelette de projet spring dans le but de faire une application web pour une liste de tâches.
Le projet s'appel spring-todo mais quand je le lance en utilisant : mvn spring-todo:run , j'ai cette erreur qui apparaît:
No plugin found for prefix 'spring-todo' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\etbienwi\.m2\repository), central (https://repo.maven.apache.org/maven2/>]
J'ai lu le lien d'aide proposé mais je ne sais toujours pas comment réglé le problème.
Merci d'avance.
A voir également:
- Maven , build-failure-erreur plugin
- Disk boot failure - Guide
- Erreur 3000 france tv - Forum Lecteurs et supports vidéo
- Erreur 0x80070643 - Accueil - Windows
- Erreur t32 ✓ - Forum Livebox
- Erreur 0x80070643 Windows 10 : comment résoudre le problème de la mise à jour KB5001716 - Accueil - Windows
2 réponses
Bonjour,
Peu importe comment s'appelle ton projet, le nom du plugin Maven qui démarre l'application s’appellera toujours de la même manière, il faut utiliser la commande
Peu importe comment s'appelle ton projet, le nom du plugin Maven qui démarre l'application s’appellera toujours de la même manière, il faut utiliser la commande
mvn spring-boot:run(pas spring-todo...)
Bonjour,
Je l'ai relancé et maintenant j'ai cette erreur:
Voici mon Pom.xml:
Et voici mon application.properties:
Je l'ai relancé et maintenant j'ai cette erreur:
Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.9.RELEASE:run (default-cli) on project spring-todo: An exception occurred while running. null: InvocationTargetException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.tomcat.jdbc.pool.DataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class:com.mysql.cj.jdbc.Driver
Voici mon Pom.xml:
<name>spring-todo</name>
<description>Application de-gestion de tache</description>
<parent><groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<!https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- JPA Data (We are going to use Repositories, Entities, Hibernate, etc...) -->
<dependency> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency>
</dependencies>
<build>
<plugins>
<plugin> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals> <goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Et voici mon application.properties:
server.port=8585
spring.jpa.hibernate.ddl-auto=none
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://db_mysql:3306/gestiontache
spring.datasource.username=springtodo
spring.datasource.password=uvsq