IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Maven Java Discussion :

[MAVEN2] utilisation build.xml par maven


Sujet :

Maven Java

  1. #1
    Membre éclairé Avatar de DanielW33
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    327
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Mai 2006
    Messages : 327
    Par défaut [MAVEN2] utilisation build.xml par maven
    j'utilise le plugin maven-antrun-plugin pour lancer un script ant (fichier build.xml)
    Mes dependencies sont corrects
    Mais pour la task suivante :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <propertyselector property="categorie.list" delimiter="," match="categorie\.([^\.]*)\.name"  select="\1" casesensitive="false" />
    une erreur se produit :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    [DEBUG]   org.apache.maven:maven-plugin-api:jar:2.0.1:runtime (selected for runtime)
    [DEBUG]   ant:ant-antlr:jar:1.6.5:compile (selected for compile)
    [DEBUG]   ant:ant:jar:1.6.5:runtime (selected for runtime)
    [DEBUG]   antlr:antlrall:jar:2.7.4:compile (selected for compile)
    [DEBUG]   ant:ant-launcher:jar:1.6.5:runtime (selected for runtime)
    [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.1:run' -->
    [DEBUG]   (f) artifacts = [ant:ant-antlr:jar:1.6.5:compile, ant:ant:jar:1.6.5:runtime, antlr:antlrall:jar:2.7.4:compile, ant:ant-launcher:jar:1.6.5:runtime,
    org.apache.maven:maven-project:jar:2.0.1:runtime, org.apache.maven:maven-plugin-api:jar:2.0.1:runtime]
    [DEBUG]   (f) project = org.apache.maven.project.MavenProject@1fb4b788
    [DEBUG]   (f) tasks =
    [DEBUG] -- end configuration --
    [INFO] [antrun:run {execution: default}]
    [INFO] Executing tasks
    [DEBUG] getProperty(ns=null, name=ant.reuse.loader, user=false)
    [DEBUG] getProperty(ns=null, name=ant.executor.class, user=false)
    [DEBUG] getProperty(ns=null, name=ant.file, user=false)
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Error executing ant tasks
    
    Embedded error: The following error occurred while executing this line:
    C:\...\script\common\build.common.services:16: No supported regular expression matcher found
    [INFO] ------------------------------------------------------------------------
    [DEBUG] Trace
    org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
            at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
            at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
            at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
            at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
    Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
            at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:114)
            at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)
            at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
            ... 16 more
    Caused by: The following error occurred while executing this line:
    C:...\script\common\build.common.services:16: No supported regular expression matcher found
            at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
            at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:336)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
            at org.apache.tools.ant.Task.perform(Task.java:364)
            at org.apache.tools.ant.Target.execute(Target.java:341)
            at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:108)
            ... 19 more
    Caused by: ...\script\common\build.common.services:16: No supported regular expression matcher foun
    d
            at org.apache.tools.ant.util.regexp.RegexpFactory.newRegexp(RegexpFactory.java:85)
            at org.apache.tools.ant.types.RegularExpression.init(RegularExpression.java:82)
            at org.apache.tools.ant.types.RegularExpression.getRegexp(RegularExpression.java:126)
            at net.sf.antcontrib.property.PropertySelector.execute(PropertySelector.java:102)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
            at org.apache.tools.ant.Task.perform(Task.java:364)
            at org.apache.tools.ant.Target.execute(Target.java:341)
            at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
            at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
            at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:334)
            ... 23 more
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2 seconds
    [INFO] Finished at: Tue Dec 19 16:50:52 CET 2006
    [INFO] Final Memory: 2M/5M
    [INFO] ------------------------------------------------------------------------

    Je n'arrive pas a savoir comment pouvoir gerer cette tache s'il elle n'est pas connue par maven

    Quelqu'un aurai une idee ???

  2. #2
    Membre expérimenté Avatar de dvicente72
    Profil pro
    Inscrit en
    Novembre 2004
    Messages
    213
    Détails du profil
    Informations personnelles :
    Âge : 53
    Localisation : France

    Informations forums :
    Inscription : Novembre 2004
    Messages : 213
    Par défaut
    es-tu sûr que ta tâche ant fonctionne bien sous Ant ?

    ensuite vérifie que la version de ANT que tu utilises est bien la même que celle utilisée dans Maven.

    "Il se pourrait" que ton expression régulière soit valable sous ANT (avec la dernière version) et sous maven , ce soit une version de ANT ultérieure.

    J'ai des doutes mais ça vaut le coup de vérifier

    sinon passe en debug sous maven en lançant mvn -e + ton goal

    comme ça tu auras toute la trace

Discussions similaires

  1. [Framework] Ajoute les fichiers .jar par Maven dans le build path
    Par h2qutc dans le forum Spring
    Réponses: 2
    Dernier message: 27/07/2014, 18h00
  2. Compiler un .jar "runnable" en passant par build.xml
    Par Geoffrey49000 dans le forum Format d'échange (XML, JSON...)
    Réponses: 2
    Dernier message: 09/08/2011, 16h14
  3. Réponses: 2
    Dernier message: 12/10/2010, 10h11
  4. Réponses: 3
    Dernier message: 19/07/2010, 11h42
  5. [JAVA XML] : utilisation class générées par JAXB
    Par Michalak dans le forum Persistance des données
    Réponses: 0
    Dernier message: 31/10/2008, 15h43

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo