2016-09-21 2 views
0

Pour créer un projet Maven AdaptateurErreur lors du déploiement de adaptateurs

Nouveau -> Projet -> Maven -> Projet Maven

ensuite inclure le archtype

Configurer → Ajouter → Catalogue local Accédez au fichier /.m2/repository/archetype-catalog.xml dans le répertoire personnel.

Puis Ajouter Archétype:

Archetype Group Id: com.ibm.mfp 
Archetype Artifact Id:adapter-maven-archetype-http 
Archetype Version: 8.0.2016061011 

Ensuite, pour adaptateur construction

droit a cliqué sur le projet -> Exécuter en tant que -> Maven installer

Je console que je reçois CONSTRUIRE LA RÉUSSITE

Ensuite, pour le déploiement de l'adaptateur

Cliquez avec le bouton droit de la souris ed projet -> Exécuter en tant que -> Maven Créer

Mais je reçu erreur

[INFO] Scanning for projects... 
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for Mobile:sampleAdapter:adapter:0.0.1-SNAPSHOT 
[WARNING] 'build.plugins.plugin.version' for com.ibm.mfp:adapter-maven-plugin is missing. @ line 44, column 12 
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. 
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects. 
[WARNING] 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building sampleAdapter 0.0.1-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 2.970 s 
[INFO] Finished at: 2016-09-22T11:20:42+05:30 
[INFO] Final Memory: 6M/64M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Unknown lifecycle phase "Maven". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [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/LifecyclePhaseNotFoundException 

Avec cela, j'inclure le fichier archétype catalog.xml (j'ai créé ce fichier et collé à la /.m2/repository)

<?xml version="1.0" encoding="UTF-8"?> 
<archetype-catalog  xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-catalog/1.0.0 http://maven.apache.org/xsd/archetype-catalog-1.0.0.xsd" 
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-catalog/1.0.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
<archetypes> 
<archetype> 
<groupId>com.ibm.mfp</groupId> 
<artifactId>adapter-maven-archetype-http</artifactId> 
<version>8.0.2016061011</version> 
    <repository>https://mvnrepository.com/artifact/com.ibm.mfp/adapter-maven-archetype-http</repository> 
</archetype> 
    <archetype> 
    <groupId>com.ibm.mfp</groupId> 
<artifactId>adapter-maven-plugin</artifactId> 
<version>8.0.2016082422</version> 
     <repository>https://mvnrepository.com/artifact/com.ibm.mfp/adapter-maven-plugin</repository> 
</archetype> 
</archetypes> 
</archetype-catalog> 

S'il vous plaît me aider à résoudre ce problème

+1

On ne sait pas ce que vous faites ici ... fournir étape par étape les étapes de reproduction. –

+0

En résumé, je ne parviens pas à déployer mon adaptateur dans Eclipse IDE.https: //mobilefirstplatform.ibmcloud.com/tutorials/fr/foundation/8.0/adapters/developing-adapters/ .Selon ce document, j'ai créé l'adaptateur avec succès, déployer J'ai eu l'erreur – CodeWriter

+0

Encore une fois, et pas en un mot, éditez les questions avec les étapes complètes de reproduction et un téléchargement de votre adaptateur pour le débogage. –

Répondre

0

Vous n'êtes pas correctement la phase de effectuez deploy.
Voir ici: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/adapters/developing-adapters/#deploying-an-adapter

Pour déployer un adaptateur, ajoutez d'abord la commande Maven deploy:

Sélectionnez Exécuter → Exécuter les configurations ..., faites un clic droit sur Maven Construire et sélectionnez Nouveau.
Indiquez un nom: "Maven deploy".
Définir comme objectif: "adapter: deploy".
Cliquez sur Appliquer, puis sur Exécuter pour effectuer un déploiement initial.

Vous pouvez faire un clic droit sur le dossier de l'adaptateur et sélectionnez Exécuter en tant que → Maven Déployer

+0

Seulement après avoir créé un nouvel espace de travail, j'ai pu déployer l'adaptateur. Merci!!! – CodeWriter