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 :

Problème de recompilation projet GIT avec Maven


Sujet :

Maven Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Homme Profil pro
    Urbaniste
    Inscrit en
    Septembre 2011
    Messages
    16
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Urbaniste
    Secteur : Conseil

    Informations forums :
    Inscription : Septembre 2011
    Messages : 16
    Par défaut Problème de recompilation projet GIT avec Maven
    Bonjour, je souhaite recompiler ce projet après l'avoir modifier: https://github.com/Energy0124/MCFreedomLauncher
    le problème c'est que lorsque je fais clique droit sur le projet puis "RUN As" et "Maven Build..." dans la fenêtre qui s'ouvre je mes dans Goals "Package" mais il en ressort une archive "MCFreedomLauncher-1.2.7.app.zip" comme cela: .
    Si quelqu'un a une idée pour résoudre ce problème et obtenir un jar executable fonctionel.

    Cordialement et merci d'avance!

  2. #2
    Rédacteur/Modérateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Par défaut
    Bonjour,

    Tu as probablement un
    Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    <formats>
        <format>zip</format>
    </formats>
    dans ton pom.xml .
    Peux-tu nous montrer ton pom.xml?

    A+.

  3. #3
    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
    Le jar se trouve dans target, si c'est la seule chose que tu veux. Le zip n'est jamais qu'une coque supplémentaire, configurée dans le pom.xml, pour créer un package mac-osx

    Code XML : 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
            <profile>
                <id>package-mac</id>
                <activation>
                    <activeByDefault>true</activeByDefault>
                </activation>
                <!--<activation>
    <os>
    <family>mac</family>
    </os>
    </activation>-->
                <build>
                    <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>osxappbundle-maven-plugin</artifactId>
                        <version>1.0-alpha-2</version>
                        <configuration>
                            <bundleName>${project.name}</bundleName>
                            <version>${project.version}</version>
                            <internetEnable>true</internetEnable>
                            <mainClass>org.hopto.energy.Main</mainClass>
                            <javaApplicationStub>${basedir}/src/main/resources/JavaApplicationStub</javaApplicationStub>
                            <jvmVersion>1.6+</jvmVersion>
                            <zipFile>${project.build.directory}/${project.build.finalName}.app.zip</zipFile>
                            <diskImageFile>${project.build.directory}/${project.build.finalName}.dmg</diskImageFile>
                            <iconFile>icon.icns</iconFile>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>bundle</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    </plugins>
                </build>
            </profile>

  4. #4
    Membre averti
    Homme Profil pro
    Urbaniste
    Inscrit en
    Septembre 2011
    Messages
    16
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Urbaniste
    Secteur : Conseil

    Informations forums :
    Inscription : Septembre 2011
    Messages : 16
    Par défaut
    Tous d’abord, merci de vos réponses! Je post ici le porm.xml
    Code XML : 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
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
     
        <groupId>org.hopto.energy</groupId>
        <artifactId>MCFreedomLauncher</artifactId>
        <description>Minecraft Freedom Launcher-Free the New Minecraft Launcher with Energy!</description>
        <version>1.2.7</version>
        <url>http://energy0124.github.io/MCFreedomLauncher/</url>
        <scm>
            <connection>scm:git:git://github.com/Energy0124/MCFreedomLauncher.git</connection>
            <url>https://github.com/Energy0124/MCFreedomLauncher</url>
            <developerConnection>scm:git:git@github.com:Energy0124/MCFreedomLauncher.git</developerConnection>
        </scm>
        <properties>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        </properties>
     
        <!-- Dependency repositories -->
        <repositories>
            <repository>
                <id>spout-repo</id>
                <url>http://repo.spout.org</url>
                <snapshots>
                    <enabled>true</enabled>
                    <updatePolicy>always</updatePolicy>
                </snapshots>
            </repository>
        </repositories>
     
        <!-- Build plugin repositories -->
        <pluginRepositories>
            <pluginRepository>
                <id>spout-repo</id>
                <url>http://repo.spout.org</url>
            </pluginRepository>
        </pluginRepositories>
     
        <dependencies>
     
            <dependency>
                <groupId>net.sf.jopt-simple</groupId>
                <artifactId>jopt-simple</artifactId>
                <version>4.5</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>2.2.4</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.4</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.1</version>
            </dependency>
     
     
        </dependencies>
        <build>
            <resources>
                <resource>
                    <targetPath>resources/locale</targetPath>
                    <filtering>false</filtering>
                    <directory>${basedir}/src/main/resources/locale/</directory>
                    <includes>
                        <include>*.properties</include>
                        <!--<include>MessagesBundle.properties</include>
                        <include>MessagesBundle_zh_HK.properties</include>
                        <include>MessagesBundle_en_US.properties</include>-->
                    </includes>
                </resource>
     
                <resource>
                    <filtering>false</filtering>
                    <directory>${basedir}/src/main/java/</directory>
                    <includes>
                        <include>*.png</include>
                    </includes>
                </resource>
               <resource>
                   <targetPath>${project.basedir}/target</targetPath>
                   <directory>${project.basedir}</directory>
                   <includes>
                       <include>launch.bat</include>
                   </includes>
               </resource>
            </resources>
     
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <source>1.6</source>
                        <target>1.6</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.4</version>
                    <configuration>
                        <archive>
                            <addMavenDescriptor>false</addMavenDescriptor>
                            <manifest>
                                <mainClass>org.hopto.energy.Main</mainClass>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>2.1</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>shade</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <minimizeJar>true</minimizeJar>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <executions>
                        <execution>
                            <phase>deploy</phase>
                            <configuration>
                                <tasks>
     
                                    <!--
                                      Place any Ant task here. You can add anything
                                      you can add between <target> and </target> in a
                                      build.xml.
                                    -->
     
                                </tasks>
                            </configuration>
                            <goals>
                                <goal>run</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!--
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>osxappbundle-maven-plugin</artifactId>
                    <version>1.0-alpha-2</version>
                    <configuration>
                        <bundleName>${project.name}</bundleName>
                        <version>${project.version}</version>
                        <internetEnable>true</internetEnable>
                        <mainClass>org.hopto.energy.Main</mainClass>
                        <javaApplicationStub>${basedir}/src/main/resources/JavaApplicationStub</javaApplicationStub>
                        <jvmVersion>1.6+</jvmVersion>
                        <zipFile>${project.build.directory}/${project.build.finalName}.app.zip</zipFile>
                        <diskImageFile>${project.build.directory}/${project.build.finalName}.dmg</diskImageFile>
                        <iconFile>icon.icns</iconFile>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>bundle</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.bluestemsoftware.open.maven.plugin</groupId>
                    <artifactId>launch4j-plugin</artifactId>
                    <version>1.5.0.0</version>
                    <executions>
                        <execution>
                            <id>l4j-gui</id>
                            <phase>package</phase>
                            <goals>
                                <goal>launch4j</goal>
                            </goals>
                            <configuration>
                                <headerType>gui</headerType>
                                <outfile>${project.build.directory}/${project.build.finalName}.exe</outfile>
                                <jar>target/${project.build.finalName}.jar</jar>
                                <errTitle>${project.name} Error</errTitle>
                                <classPath>
                                    <mainClass>org.hopto.energy.Main</mainClass>
                                </classPath>
                                <icon>${basedir}/icon.ico</icon>
                                <jre>
                                    <minVersion>1.6.0</minVersion>
                                    <initialHeapSize>32</initialHeapSize>
                                    <maxHeapSize>1024</maxHeapSize>
                                </jre>
                                <versionInfo>
                                    <fileVersion>1.0.0.0</fileVersion> &lt;!&ndash; Cannot use ${project.version} &ndash;&gt;
                                    <txtFileVersion>1.0.0.0</txtFileVersion>
                                    <productVersion>1.0.0.0</productVersion>
                                    <txtProductVersion>1.0.0.0</txtProductVersion>
                                    <fileDescription>${project.name}</fileDescription>
                                    <copyright>https://github.com/Energy0124/MCFreedomLauncher</copyright>
                                    <productName>${project.name}</productName>
                                    <internalName>MCFreedomLauncher</internalName>
                                    <originalFilename>${project.build.finalName}.exe</originalFilename>
                                </versionInfo>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>-->
            </plugins>
        </build>
        <!-- Build profiles -->
        <profiles>
            <!-- Package for Windows  -->
            <profile>
                <id>package-win</id>
                <activation>
                    <activeByDefault>true</activeByDefault>
                </activation>
                <!--<activation>
                     <os>
                         <family>windows</family>
                     </os>
                 </activation>-->
                <build>
                    <plugins>
                        <plugin>
                            <groupId>org.bluestemsoftware.open.maven.plugin</groupId>
                            <artifactId>launch4j-plugin</artifactId>
                            <version>1.5.0.0</version>
                            <executions>
                                <execution>
                                    <configuration>
                                        <headerType>gui</headerType>
                                        <stayAlive>false</stayAlive>
     
                                        <jar>${project.build.directory}/${project.artifactId}-${project.version}.jar</jar>
                                        <outfile>${project.build.directory}/${project.artifactId}-${project.version}.exe
                                        </outfile>
                                        <classPath>
                                            <mainClass>org.hopto.energy.Main</mainClass>
                                            <addDependencies>false</addDependencies>
                                            <preCp>anything</preCp>
                                        </classPath>
                                        <jre>
                                            <minVersion>1.6.0</minVersion>
                                        </jre>
                                        <icon>${basedir}/icon.ico</icon>
                                        <versionInfo>
                                            <fileVersion>1.0.0.0</fileVersion>
                                            <txtFileVersion>1.0.0.0</txtFileVersion>
                                            <productVersion>1.0.0.0</productVersion>
                                            <txtProductVersion>1.0.0.0</txtProductVersion>
                                            <fileDescription>${project.name}</fileDescription>
                                            <productName>${project.name}</productName>
                                            <copyright>${project.organization.name}, ${project.organization.url}</copyright>
                                            <internalName>${project.artifactId}</internalName>
                                            <originalFilename>${project.artifactId}.exe</originalFilename>
                                        </versionInfo>
                                    </configuration>
                                    <phase>package</phase>
                                    <goals>
                                        <goal>launch4j</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </build>
            </profile>
            <profile>
                <id>package-mac</id>
                <activation>
                    <activeByDefault>true</activeByDefault>
                </activation>
                <!--<activation>
                    <os>
                        <family>mac</family>
                    </os>
                </activation>-->
                <build>
                    <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>osxappbundle-maven-plugin</artifactId>
                        <version>1.0-alpha-2</version>
                        <configuration>
                            <bundleName>${project.name}</bundleName>
                            <version>${project.version}</version>
                            <internetEnable>true</internetEnable>
                            <mainClass>org.hopto.energy.Main</mainClass>
                            <javaApplicationStub>${basedir}/src/main/resources/JavaApplicationStub</javaApplicationStub>
                            <jvmVersion>1.6+</jvmVersion>
                            <zipFile>${project.build.directory}/${project.build.finalName}.app.zip</zipFile>
                            <diskImageFile>${project.build.directory}/${project.build.finalName}.dmg</diskImageFile>
                            <iconFile>icon.icns</iconFile>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>bundle</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    </plugins>
                </build>
            </profile>
        </profiles>
    </project>

    Effectivement le jar se trouve dans le dossier target mais même sans modification dans le projet il ne s’exécute pas

  5. #5
    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 anthonybreda Voir le message


    Effectivement le jar se trouve dans le dossier target mais même sans modification dans le projet il ne s’exécute pas
    Message d'erreur?

  6. #6
    Membre averti
    Homme Profil pro
    Urbaniste
    Inscrit en
    Septembre 2011
    Messages
    16
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Urbaniste
    Secteur : Conseil

    Informations forums :
    Inscription : Septembre 2011
    Messages : 16
    Par défaut
    Bonjour, effectivement il y a bien une erreur mais elle ne se montre que lorsque je lance le jar avec le "launch.bat" qui c'est créer lors du build sinon rien ne se lance...

Discussions similaires

  1. gestion projet multimodule avec maven assembly
    Par yenfou2000 dans le forum Maven
    Réponses: 0
    Dernier message: 30/03/2010, 14h38
  2. Problème accès servlet (config tomcat avec maven ?)
    Par didinho88 dans le forum Tomcat et TomEE
    Réponses: 1
    Dernier message: 17/11/2009, 17h40
  3. Comment reprendre un projet existant avec maven
    Par Anthony14 dans le forum Maven
    Réponses: 6
    Dernier message: 22/04/2009, 11h16
  4. Réponses: 2
    Dernier message: 02/04/2009, 16h42
  5. creation d'un projet Xfire avec Maven
    Par friedamichelle dans le forum Maven
    Réponses: 5
    Dernier message: 31/01/2008, 15h26

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