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

ANT Java Discussion :

[NetBeans] [ant]warning: .....class modified in the future


Sujet :

ANT Java

  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    4
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 4
    Par défaut [NetBeans] [ant]warning: .....class modified in the future
    Bonjour.

    Voici mon probleme.
    J'utilise netbeans 4.1 et je compile mon projet avec un script ant.
    Des que je modifie un fichier fic.java et que je le compile, j'obtiens le message:

    Warning: fic.class modified in the future.

    J'ai fait un touch sur tous mes fichiers .class et .java et ca n'a rien changé.
    Je suppose que le probleme vient de netbeans ou de mon script ant car qd je compile "à la main" depuis une console, le warning n'apparait pas.

    Est ce que quelqu'un as une idée ?? merci beacoup d'avance.
    Pour info voici mon script ant:

    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
    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
     
    <?xml version="1.0" encoding="UTF-8"?>
    <project basedir="." default="all" name="somewhere">
        <!-- Written to assume that classpath is rooted in the current directory. -->
        <!-- So this should be OK if you make this script in the root of a filesystem. -->
        <!-- If not, just change src.dir to be the root of your sources' package tree -->
        <!-- and use e.g. View over a Filesystem to mount that subdirectory with all capabilities. -->
        <!-- The idea is that both Ant and NetBeans have to know what the package root is -->
        <!-- for the classes in your application. -->
     
        <!-- Don't worry if you don't know the Ant syntax completely or need help on some tasks! -->
        <!-- The standard Ant documentation can be downloaded from AutoUpdate and -->
        <!-- and then you can access the Ant manual in the online help. -->
     
        <target name="init">
            <property location="../classes" name="classes.dir"/>
            <property location="." name="src.dir"/>
            <property location="../doc/javadoc/api" name="javadoc.dir"/>
            <property name="project.name" value="${ant.project.name}"/>
            <property location="../jarfiles/${project.name}.jar" name="jarServer"/>
            <property location="../jarfiles/client.jar" name="jarClient"/>
        </target>
     
        <target depends="init" name="compile">
            <!-- Both srcdir and destdir should be package roots. -->
            <mkdir dir="${classes.dir}"/>
            <javac debug="true" deprecation="true" destdir="${classes.dir}" srcdir="${src.dir}">
                <!-- To add something to the classpath: -->
                <!-- <classpath><pathelement location="${mylib}"/></classpath> -->
                <!-- To exclude some files: -->
                <!-- <exclude name="com/foo/SomeFile.java"/><exclude name="com/foo/somepackage/"/> -->
            </javac>        
        </target>
     
        <target name="makeParser">
            <exec executable="sh">
                <arg value="makeParser.sh"/>
            </exec>
        </target>
     
     
        <target depends="init,compile" name="jar">
            <!-- To make a standalone app, insert into <jar>: -->
            <!-- <manifest><attribute name="Main-Class" value="com.foo.Main"/></manifest> -->
            <jar basedir="${classes.dir}" 
                 compress="true" 
                 manifest="somewhereManifest" 
                 jarfile="${jarServer}"/>
            <jar basedir="${classes.dir}" 
                 compress="true" 
                 manifest="clientManifest" 
                 jarfile="${jarClient}"/>   
        </target>
     
        <target depends="init,makeParser,jar" description="Build everything." name="all"/>
     
        <target depends="init" description="Javadoc for my API." name="javadoc">
            <mkdir dir="${javadoc.dir}"/>
            <javadoc sourcepath = "${src.dir}"
                     excludepackagenames="JLex.*,java_cup.*"
                     destdir="${javadoc.dir}" 
                     packagenames="*" 
                     windowtitle="Somewhere Plateform">
                <doctitle><![CDATA[Somewhere Platform API Specification]]></doctitle>
           </javadoc>
        </target>
     
        <target depends="init" description="Clean all build products." name="clean">
            <delete dir="${classes.dir}"/>
            <delete dir="${javadoc.dir}"/>
            <delete file="${jar}"/>
        </target>
     
    </project><?xml version="1.0" encoding="UTF-8"?>
    <project basedir="." default="all" name="somewhere">
        <!-- Written to assume that classpath is rooted in the current directory. -->
        <!-- So this should be OK if you make this script in the root of a filesystem. -->
        <!-- If not, just change src.dir to be the root of your sources' package tree -->
        <!-- and use e.g. View over a Filesystem to mount that subdirectory with all capabilities. -->
        <!-- The idea is that both Ant and NetBeans have to know what the package root is -->
        <!-- for the classes in your application. -->
     
        <!-- Don't worry if you don't know the Ant syntax completely or need help on some tasks! -->
        <!-- The standard Ant documentation can be downloaded from AutoUpdate and -->
        <!-- and then you can access the Ant manual in the online help. -->
     
        <target name="init">
            <property location="../classes" name="classes.dir"/>
            <property location="." name="src.dir"/>
            <property location="../doc/javadoc/api" name="javadoc.dir"/>
            <property name="project.name" value="${ant.project.name}"/>
            <property location="../jarfiles/${project.name}.jar" name="jarServer"/>
            <property location="../jarfiles/client.jar" name="jarClient"/>
        </target>
     
        <target depends="init" name="compile">
            <!-- Both srcdir and destdir should be package roots. -->
            <mkdir dir="${classes.dir}"/>
            <javac debug="true" deprecation="true" destdir="${classes.dir}" srcdir="${src.dir}">
                <!-- To add something to the classpath: -->
                <!-- <classpath><pathelement location="${mylib}"/></classpath> -->
                <!-- To exclude some files: -->
                <!-- <exclude name="com/foo/SomeFile.java"/><exclude name="com/foo/somepackage/"/> -->
            </javac>        
        </target>
     
        <target name="makeParser">
            <exec executable="sh">
                <arg value="makeParser.sh"/>
            </exec>
        </target>
     
     
        <target depends="init,compile" name="jar">
            <!-- To make a standalone app, insert into <jar>: -->
            <!-- <manifest><attribute name="Main-Class" value="com.foo.Main"/></manifest> -->
            <jar basedir="${classes.dir}" 
                 compress="true" 
                 manifest="somewhereManifest" 
                 jarfile="${jarServer}"/>
            <jar basedir="${classes.dir}" 
                 compress="true" 
                 manifest="clientManifest" 
                 jarfile="${jarClient}"/>   
        </target>
     
        <target depends="init,makeParser,jar" description="Build everything." name="all"/>
     
        <target depends="init" description="Javadoc for my API." name="javadoc">
            <mkdir dir="${javadoc.dir}"/>
            <javadoc sourcepath = "${src.dir}"
                     excludepackagenames="JLex.*,java_cup.*"
                     destdir="${javadoc.dir}" 
                     packagenames="*" 
                     windowtitle="Somewhere Plateform">
                <doctitle><![CDATA[Somewhere Platform API Specification]]></doctitle>
           </javadoc>
        </target>
     
        <target depends="init" description="Clean all build products." name="clean">
            <delete dir="${classes.dir}"/>
            <delete dir="${javadoc.dir}"/>
            <delete file="${jar}"/>
        </target>
     
    </project>

  2. #2
    Membre émérite

    Profil pro
    Inscrit en
    Juin 2004
    Messages
    882
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Juin 2004
    Messages : 882
    Par défaut
    voici la reponse a ton probleme
    J ai eu le meme probleme recemment avec ant!

    http://www.mail-archive.com/ant-user.../msg05295.html

  3. #3
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    4
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 4
    Par défaut
    Salut benjamin,

    merci beacoup de ta réponse.
    En gros ils expliquent les causes eventuelles de l'affichage du message mais ils n'expliquent pas comment faire pour le faire disparaitre (modifier le code de ant en ajoutant quelques secondes a la variable now ?).

    Toi tu as reussi a faire disparaitre le message ? ou alors tu l'ignores ?

    Merci encore.

    Phil

  4. #4
    Membre émérite

    Profil pro
    Inscrit en
    Juin 2004
    Messages
    882
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Juin 2004
    Messages : 882
    Par défaut
    travailles tu avec cvs pour la gestion de versions de ton projet???

  5. #5
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    4
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 4
    Par défaut
    non je ne travaille pas avec cvs. Etant seul a bosser sur mon projet, j'archive pour l'instant manuellement les differentes versions dans des archives .tgz.
    Je prevois de passer sous cvs d'ici septembre car nous allons bientot etre plusieurs a coté (meme si je sais que cvs peut etre avantageux meme etant seul a coder).

    Pourquoi ? cvs gere mieux les timestamps que le systeme de fichier sous linux ?
    Je ne comprends toujours pas pourquoi ant crois que la date de mes fichiers est superieure a sa variable now ??? (car comme je te le disais, si je compile manuelement sans ant, le warning n'apparait pas !!!)

    Phil.

  6. #6
    Membre émérite

    Profil pro
    Inscrit en
    Juin 2004
    Messages
    882
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Juin 2004
    Messages : 882
    Par défaut
    je te dis ca car moi en detruisant le projet dans mon workspace et en faisant un nouveau checkout les traces ont disparues, apres ca je n ai pas cherche plus loin

Discussions similaires

  1. warning: modified in the future
    Par ceriise dans le forum NetBeans
    Réponses: 7
    Dernier message: 13/11/2007, 11h24
  2. Réponses: 4
    Dernier message: 19/02/2006, 17h59
  3. [Ant] Warning Tache Ant
    Par SEMPERE Benjamin dans le forum ANT
    Réponses: 9
    Dernier message: 16/03/2005, 15h11
  4. [NetBeans] [Ant] Problème à la compil'
    Par GLDavid dans le forum NetBeans
    Réponses: 2
    Dernier message: 05/07/2004, 21h10
  5. [Netbeans][ANT]apllication j2ee
    Par vempiria dans le forum NetBeans
    Réponses: 3
    Dernier message: 09/04/2004, 21h54

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