maven sometimes stop working with plugin
The bug is well known and often appear when using Hudson and Sonar together.
The bug is about corrupt metadata xml file of local maven repository.
http://docs.codehaus.org/display/MAVENUSER/FAQs-1#FAQs-1-novalidversion
http://jira.codehaus.org/browse/MNG-2408
- A simple work around is to erase the local maven repository
- The best work around is to use -U while using mvn.
In the context of hudson/sonar, just set in -U to the additional properties in the global configuration of the Sonar plugin for Hudson
>Add Sonar
>Nom : sonar2.0.1
>URL : http://host:16080/sonar
>URL du serveur public : http://host:16080/sonar
>URL BDD : jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
>Nom user BDD : xxx
>Mot de passe BDD : xxx
>Driver BDD : com.mysql.jdbc.Driver
>Additional properties : -U
Affichage des articles dont le libellé est java. Afficher tous les articles
Affichage des articles dont le libellé est java. Afficher tous les articles
mercredi, mai 19, 2010
jeudi, octobre 29, 2009
Maven 2 : Lifecyle & autres
Option pour lancer une tâche sans les tests :
mvn -DskipTests=true nom_task
(ne lance pas l'exécution des tests, ni leur compilation)
Cycle de vie :
Le cycle de vie par défaut est constitué de tâches successives. En appelant une des taches de ce cycle de vie, toutes les taches précédentes sont exécutées
Le cycle de vie par défaut de maven est le suivant :
Cycle de vie en détail :
mvn -DskipTests=true nom_task
(ne lance pas l'exécution des tests, ni leur compilation)
Cycle de vie :
Le cycle de vie par défaut est constitué de tâches successives. En appelant une des taches de ce cycle de vie, toutes les taches précédentes sont exécutées
Le cycle de vie par défaut de maven est le suivant :
- validate - validate the project is correct and all necessary information is available
- compile - compile the source code of the project
- test - test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed
- package - take the compiled code and package it in its distributable format, such as a JAR.
- integration-test - process and deploy the package if necessary into an environment where integration tests can be run
- verify - run any checks to verify the package is valid and meets quality criteria
- install - install the package into the local repository, for use as a dependency in other projects locally
- deploy - done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.
Cycle de vie en détail :
| validate | validate the project is correct and all necessary information is available. |
| initialize | initialize build state, e.g. set properties or create directories. |
| generate-sources | generate any source code for inclusion in compilation. |
| process-sources | process the source code, for example to filter any values. |
| generate-resources | generate resources for inclusion in the package. |
| process-resources | copy and process the resources into the destination directory, ready for packaging. |
| compile | compile the source code of the project. |
| process-classes | post-process the generated files from compilation, for example to do bytecode enhancement on Java classes. |
| generate-test-sources | generate any test source code for inclusion in compilation. |
| process-test-sources | process the test source code, for example to filter any values. |
| generate-test-resources | create resources for testing. |
| process-test-resources | copy and process the resources into the test destination directory. |
| test-compile | compile the test source code into the test destination directory |
| process-test-classes | post-process the generated files from test compilation, for example to do bytecode enhancement on Java classes. For Maven 2.0.5 and above. |
| test | run tests using a suitable unit testing framework. These tests should not require the code be packaged or deployed. |
| prepare-package | perform any operations necessary to prepare a package before the actual packaging. This often results in an unpacked, processed version of the package. (Maven 2.1 and above) |
| package | take the compiled code and package it in its distributable format, such as a JAR. |
| pre-integration-test | perform actions required before integration tests are executed. This may involve things such as setting up the required environment. |
| integration-test | process and deploy the package if necessary into an environment where integration tests can be run. |
| post-integration-test | perform actions required after integration tests have been executed. This may including cleaning up the environment. |
| verify | run any checks to verify the package is valid and meets quality criteria. |
| install | install the package into the local repository, for use as a dependency in other projects locally. |
| deploy | done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects. |
Inscription à :
Articles (Atom)