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>