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 :

Incrément du numéro de build


Sujet :

Maven Java

  1. #1
    Membre très actif
    Profil pro
    Inscrit en
    Avril 2011
    Messages
    140
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2011
    Messages : 140
    Par défaut Incrément du numéro de build
    Bonjour je cherche à auto-incrémenter le build number gràce à http://commons.ucalgary.ca/projects/...gin/howto.html

    Mais j'obtiens cette erreur, je ne comprends pas pourquoi, avez-vous d'autres moyens, ou quelques explications ?

    Merci

    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
     
    [ERROR] Plugin org.codehaus.mojo:maven-buildnumber-plugin:0.9.6 or one of its de
    pendencies could not be resolved: Failed to read artifact descriptor for org.cod
    ehaus.mojo:maven-buildnumber-plugin:jar:0.9.6: Failure to find org.codehaus.mojo
    :maven-buildnumber-plugin:pom:0.9.6 in http://repo1.maven.org/maven2 was cached
    in the local repository, resolution will not be reattempted until the update int
    erval of central has elapsed or updates are forced -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
    ch.
    [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 rea
    d the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
    onException

  2. #2
    Expert éminent
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482

  3. #3
    Membre très actif
    Profil pro
    Inscrit en
    Avril 2011
    Messages
    140
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2011
    Messages : 140
    Par défaut
    J'ai quand même une erreur
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    [ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.0:cr
    eate (default) on project thrift-pay2you-android-poc: Execution default of goal
    org.codehaus.mojo:buildnumber-maven-plugin:1.0:create failed: The scm url cannot
     be null. -> [Help 1]
    Mon build :
    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
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
        <build>
     
     
            		<finalName>
    buildnumber-maven-plugin-1.0-r${buildNumber}
    </finalName>
            <sourceDirectory>src</sourceDirectory>
     
     
            <plugins>
     
    		 <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>buildnumber-maven-plugin</artifactId>
            <version>1.0</version>
            <executions>
              <execution>
                <phase>validate</phase>
                <goals>
                  <goal>create</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <doCheck>true</doCheck>
              <doUpdate>true</doUpdate>
            </configuration>
          </plugin>
     
     
                <plugin>
                    <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                    <artifactId>maven-android-plugin</artifactId>
                    <version>2.8.4</version>
                    <configuration>
                        <sdk>
                            <!-- platform or api level (api level 4 = platform 1.6)-->
                            <platform>8</platform>
                        </sdk>
                        <emulator>
                            <!-- the name of the avd device to use for starting the emulator -->
                            <avd>Android2.1-update1</avd>
                        </emulator>
                        <deleteConflictingFiles>true</deleteConflictingFiles>
                        <undeployBeforeDeploy>true</undeployBeforeDeploy>
                    </configuration>
                    <extensions>true</extensions>
                </plugin>
     
     
     
     
    			  <plugin>
                    <!-- Sets the AndroidManifest.xml Version Name to the projects version number -->
                    <groupId>org.codehaus.groovy.maven</groupId>
                    <artifactId>gmaven-plugin</artifactId>
                    <version>1.0</version>
                    <executions>
                        <execution>
                            <phase>generate-resources</phase>
                            <goals>
                                <goal>execute</goal>
                            </goals>
                            <configuration>
                                <source>
     
                                        try {
                                            def manifestFile = new File("AndroidManifest.xml")
                                            def ns = new groovy.xml.Namespace(
                                                "http://schemas.android.com/apk/res/android", "ns")
                                            def parser = new groovy.util.XmlParser(false, true)
                                            def rootNode = parser.parse(manifestFile)
                                            def attributes = rootNode.attributes()
                                            attributes[ns.versionName] = "${project.version}"
                                            def writer = new groovy.io.GroovyPrintWriter(manifestFile)
                                            writer.println('&lt;?xml version="1.0" encoding="UTF-8"?&gt;')
                                            def xmlWriter = new groovy.util.XmlNodePrinter(writer)
                                            xmlWriter.setPreserveWhitespace(false)
                                            xmlWriter.setNamespaceAware(true)
                                            xmlWriter.print(rootNode)
                                        } catch (FileNotFoundException e)
                                        {
                                            println('No AndroidManifest.xml file found. Skipping version update.')
                                            println('Probably not an Android project, but a library.')
                                            println('Skipping version update.')
                                        }
     
                                </source>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
     
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <!-- version 2.3 defaults to java 1.5, so no further configuration needed-->
                    <version>2.3</version>
                </plugin>
     
     
            </plugins>
        </build>

  4. #4
    Expert éminent
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Par défaut
    Citation Envoyé par frAydjwe Voir le message
    J'ai quand même une erreur
    Ce serait bien de nous donenr l'erreur complete et pas juste trois mots.

  5. #5
    Membre très actif
    Profil pro
    Inscrit en
    Avril 2011
    Messages
    140
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2011
    Messages : 140
    Par défaut
    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
     
    C:\svnrepo\ARKEA\Pay2you\Android\Pay2you>mvn install -DskipTests
    [INFO] Scanning for projects...
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building thrift-pay2you-android-poc 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- buildnumber-maven-plugin:1.0:create (default) @ thrift-pay2you-androi
    d-poc ---
    [INFO] Verifying there are no local modifications ...
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2.735s
    [INFO] Finished at: Tue Sep 13 12:24:07 CEST 2011
    [INFO] Final Memory: 6M/12M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.0:cr
    eate (default) on project thrift-pay2you-android-poc: Execution default of goal
    org.codehaus.mojo:buildnumber-maven-plugin:1.0:create failed: The scm url cannot
     be null. -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
    ch.
    [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 rea
    d the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutio
    nException

  6. #6
    Expert éminent
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Par défaut
    The scm url cannot be null
    Me semble que c'est clair

  7. #7
    Membre très actif
    Profil pro
    Inscrit en
    Avril 2011
    Messages
    140
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2011
    Messages : 140
    Par défaut
    Ah c'est bizarre .. Il t'en fallait plus pourtant ? ^o)
    Du coup, pour ne pas que scn soit null ?

  8. #8
    Expert éminent
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Par défaut
    Citation Envoyé par frAydjwe Voir le message
    Ah c'est bizarre .. Il t'en fallait plus pourtant ? ^o)
    Ben oui, si tu me met pas le messge d'erreur, je peux pas sucer de mon pouce. Mais c'est vrai que tu peux le lire aussi.
    Du coup, pour ne pas que scn soit null ?
    Ben préciser les informations de scm dans ton pom.

Discussions similaires

  1. incrémenter le numéro de l'objet
    Par lesafir dans le forum Langage
    Réponses: 5
    Dernier message: 07/06/2007, 15h41
  2. Incrémentation du numéro de version (dll et exe) en C
    Par biglolo dans le forum Général Dotnet
    Réponses: 1
    Dernier message: 07/02/2007, 18h09
  3. [D6] Incrémenter le numéro de version
    Par Lung dans le forum EDI
    Réponses: 3
    Dernier message: 08/08/2005, 10h12
  4. [D2005] Numéro de build
    Par Harry dans le forum Delphi .NET
    Réponses: 3
    Dernier message: 20/06/2005, 14h25
  5. Numéro de Build
    Par cjacquel dans le forum MFC
    Réponses: 2
    Dernier message: 09/05/2005, 16h44

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