[ 
https://issues.apache.org/jira/browse/BUILDR-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616970#action_12616970
 ] 

Alexis Midon commented on BUILDR-103:
-------------------------------------

I think this bug is reproductible:
check out ODE trunk.

cd into axis2 module for instance and execute 'buildr compile' many times, you 
will get the output below each time.
Obviously some compilations are done.

The same output with traces activated is attached to this issue. 

~/w/ode/tr-ode.git/axis2(master)$buildr compile
/home/alexis/w/ode/tr-ode.git/tasks/derby.rake:22: Deprecated: See 
documentation for new way to access Java code.
/home/alexis/w/ode/tr-ode.git/tasks/derby.rake:22: Deprecated: Append to 
Java.classpath instead.
(in /home/alexis/w/ode/tr-ode.git, development)
/home/alexis/w/ode/tr-ode.git/Rakefile:418: Deprecated: We changed the way 
package_as methods are implemented.  See the package method documentation for 
more details.
/home/alexis/w/ode/tr-ode.git/Rakefile:523:in `distro': Deprecated: Use 
dependencies instead.
Compiling ode:axis2
Compiling ode:utils
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Compiling ode:bpel-obj
Compiling ode:bpel-schemas
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Compiling ode:bpel-api
Note: 
/home/alexis/w/ode/tr-ode.git/bpel-api/src/main/java/org/apache/ode/bpel/evt/BpelEvent.java
 uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Compiling ode:bpel-compiler
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Compiling ode:bpel-api-jca
Compiling ode:bpel-dao
Compiling ode:il-common
Note: 
/home/alexis/w/ode/tr-ode.git/il-common/src/main/java/org/apache/ode/il/epr/URLEndpoint.java
 uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Compiling ode:jacob-ap
Compiling ode:jacob
Compiling ode:bpel-ql
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Compiling ode:dao-hibernate
Note: 
/home/alexis/w/ode/tr-ode.git/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/ql/HibernateInstancesQueryCompiler.java
 uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Compiling ode:bpel-store
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1150  ode-store  INFO   [main] openjpa.Tool - No targets were given.  Running 
on all classes in your persistent classes list, or all metadata files in 
classpath directories if you have not listed your persistent classes.  Use 
-help to display tool usage information.
Compiling ode:bpel-runtime
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Compiling ode:jca-ra
Compiling ode:jca-server
Compiling ode:bpel-connector
Compiling ode:scheduler-simple
Compiling ode:axis2
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: 
/home/alexis/w/ode/tr-ode.git/axis2/src/main/java/org/apache/ode/axis2/Properties.java
 uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Completed in 37.267s


> buildr recompiles unchanged java files if they are not in default package
> -------------------------------------------------------------------------
>
>                 Key: BUILDR-103
>                 URL: https://issues.apache.org/jira/browse/BUILDR-103
>             Project: Buildr
>          Issue Type: Bug
>          Components: Compilers
>    Affects Versions: 1.3.1
>            Reporter: Lacton
>         Attachments: output.txt
>
>
> If a java file is in default package, buildr will recompile it only if it 
> changes. If a java file is in a named package, buildr will recompile it 
> everytime, even when unecessary.
> = Example 1 (default package) =
> File src/main/java/Hello.java
> <buildfile>
> define 'buildr_nopackage' do
>   project.version = '1.0'
>   package(:jar)
> end
> </buildfile>
> $ buildr compile
> (in /home/lacton/workspace/buildr_nopackage, development)
> Compiling buildr_nopackage
> Compiling buildr_nopackage
> Completed in 0.715s
> $ buildr compile --trace
> (in /home/lacton/workspace/buildr_nopackage, development)
> ** Invoke buildr:initialize (first_time)
> ** Execute buildr:initialize
> ** Invoke buildr_nopackage (first_time)
> ** Execute buildr_nopackage
> ** Invoke /home/lacton/workspace/buildr_nopackage/lib/scala-library.jar 
> (first_time)
> ** Execute /home/lacton/workspace/buildr_nopackage/lib/scala-library.jar
> ** Invoke /home/lacton/workspace/buildr_nopackage/lib/scala-compiler.jar 
> (first_time)
> ** Execute /home/lacton/workspace/buildr_nopackage/lib/scala-compiler.jar
> ** Invoke /home/lacton/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar 
> (first_time, not_needed)
> ** Invoke 
> /home/lacton/.m2/repository/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar
>  (first_time, not_needed)
> ** Invoke 
> /home/lacton/.m2/repository/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar 
> (first_time, not_needed)
> ** Invoke /var/lib/gems/1.8/gems/buildr-1.3.1.1/lib/buildr/java (first_time, 
> not_needed)
> ** Invoke 
> /home/lacton/.m2/repository/org/apache/ant/ant-trax/1.7.0/ant-trax-1.7.0.jar 
> (first_time, not_needed)
> ** Invoke 
> /home/lacton/.m2/repository/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar
>  (first_time, not_needed)
> ** Invoke /usr/lib/jvm/java-1.5.0-sun/lib/tools.jar (first_time, not_needed)
> ** Invoke buildr_nopackage
> ** Invoke compile (first_time)
> ** Execute compile
> ** Invoke buildr_nopackage
> ** Invoke buildr_nopackage
> Compiling buildr_nopackage
> ** Invoke buildr_nopackage:compile (first_time, not_needed)
> ** Invoke buildr_nopackage:resources (first_time)
> ** Execute buildr_nopackage:resources
> ** Invoke /home/lacton/workspace/buildr_nopackage/src/main/java (first_time, 
> not_needed)
> Completed in 0.095s
> There is no compilation at all on the second call, as expected.
> = Example 2 (named package) =
> File src/main/java/mypackage/Hello.java
> <buildfile>
> define 'buildr_package' do
>   project.version = '1.0'
>   package(:jar)
> end
> </buildfile>
> $ buildr compile
> (in /home/lacton/workspace/buildr_package, development)
> Compiling buildr_package
> Compiling buildr_package
> Completed in 0.664s
> $ buildr compile --trace
> (in /home/lacton/workspace/buildr_package, development)
> ** Invoke buildr:initialize (first_time)
> ** Execute buildr:initialize
> ** Invoke buildr_package (first_time)
> ** Execute buildr_package
> ** Invoke /home/lacton/workspace/buildr_package/lib/scala-library.jar 
> (first_time)
> ** Execute /home/lacton/workspace/buildr_package/lib/scala-library.jar
> ** Invoke /home/lacton/workspace/buildr_package/lib/scala-compiler.jar 
> (first_time)
> ** Execute /home/lacton/workspace/buildr_package/lib/scala-compiler.jar
> ** Invoke /home/lacton/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar 
> (first_time, not_needed)
> ** Invoke 
> /home/lacton/.m2/repository/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar
>  (first_time, not_needed)
> ** Invoke 
> /home/lacton/.m2/repository/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar 
> (first_time, not_needed)
> ** Invoke /var/lib/gems/1.8/gems/buildr-1.3.1.1/lib/buildr/java (first_time, 
> not_needed)
> [parsing started 
> /home/lacton/workspace/buildr_package/src/main/java/mypackage/Hello.java]
> [parsing completed 37ms]
> [search path for source files: 
> [/home/lacton/workspace/buildr_package/src/main/java]]
> [search path for class files: 
> [/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/rt.jar, 
> /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/jsse.jar, 
> /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/jce.jar, 
> /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/charsets.jar, 
> /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/ext/localedata.jar, 
> /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/ext/sunjce_provider.jar, 
> /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/ext/dnsns.jar, 
> /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/ext/sunpkcs11.jar, 
> /usr/lib/jvm/java-1.5.0-sun/lib/tools.jar]]
> [loading 
> /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/rt.jar(java/lang/Object.class)]
> [loading 
> /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/rt.jar(java/lang/String.class)]
> [checking mypackage.Hello]
> [wrote 
> /home/lacton/workspace/buildr_package/target/classes/mypackage/Hello.class]
> [total 340ms]
> ** Invoke 
> /home/lacton/.m2/repository/org/apache/ant/ant-trax/1.7.0/ant-trax-1.7.0.jar 
> (first_time, not_needed)
> ** Invoke 
> /home/lacton/.m2/repository/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar
>  (first_time, not_needed)
> ** Invoke /usr/lib/jvm/java-1.5.0-sun/lib/tools.jar (first_time, not_needed)
> ** Invoke buildr_package
> ** Invoke compile (first_time)
> ** Execute compile
> ** Invoke buildr_package
> ** Invoke buildr_package
> Compiling buildr_package
> ** Invoke buildr_package:compile (first_time)
> ** Invoke buildr_package:resources (first_time)
> ** Execute buildr_package:resources
> ** Invoke /home/lacton/workspace/buildr_package/src/main/java (first_time, 
> not_needed)
> ** Execute buildr_package:compile
> Compiling buildr_package
> javac -classpath /usr/lib/jvm/java-1.5.0-sun/lib/tools.jar -sourcepath 
> /home/lacton/workspace/buildr_package/src/main/java -d 
> /home/lacton/workspace/buildr_package/target/classes -verbose -g 
> /home/lacton/workspace/buildr_package/src/main/java/mypackage/Hello.java
> Completed in 0.744s
> Hello.java was recompiled and the file target/classes/mypackage/Hello.class 
> was written once more, with a new timestamp, although nothing changed between 
> the two compilation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to