Changeset 4609


Ignore:
Timestamp:
11/12/08 00:17:05 (11 years ago)
Author:
curtis
Message:
  • Update Eclipse projects to match the latest codebase.
  • Add Eclipse classpath checking to dependency scanner script.
  • Move Bio-Formats code generation framework into its own component.
Location:
trunk
Files:
16 added
17 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/common.xml

    r4594 r4609  
    6464      includes="${component.source}"/> 
    6565  </target> 
     66 
     67  <!-- CTR TODO FINISH THIS 
     68  <target name="exec" depends="compile" description="execute package"> 
     69     <java classname="component.manifest-main" 
     70       classpath="${}" 
     71  </target> 
     72  --> 
    6673 
    6774  <target name="findbugs" depends="compile" 
  • trunk/components/bio-formats/.classpath

    r4472 r4609  
    33        <classpathentry kind="src" path="src"/> 
    44        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 
     5        <classpathentry combineaccessrules="false" kind="src" path="/common"/> 
    56        <classpathentry combineaccessrules="false" kind="src" path="/ome-xml"/> 
    67        <classpathentry kind="var" path="LOCI_JARS/forms-1.0.4.jar"/> 
  • trunk/components/bio-formats/build.properties

    r4604 r4609  
    2626                           forms-1.0.4.jar \ 
    2727                           netcdf-4.0.jar 
    28  
    29 # TODO - make the autogenerator into a separate bio-formats-auto component 
    30 auto.dir          = ${base.dir}/auto 
    31 auto.classpath    = ${auto.dir}:\ 
    32                     ${artifact.dir}/bio-formats.jar:\ 
    33                     ${artifact.dir}/loci-common.jar:\ 
    34                     ${lib.dir}/velocity-dep-1.5.jar 
    35 auto.java-version = 1.5 
  • trunk/components/bio-formats/build.xml

    r4604 r4609  
    1515  <property file="build.properties"/> 
    1616 
    17   <target name="compile-auto" 
    18     description="build the Bio-Formats autogeneration framework"> 
    19     <javac debug="true" deprecation="true" 
    20       source="${auto.java-version}" target="${auto.java-version}" 
    21       srcdir="${auto.dir}" destdir="${auto.dir}" 
    22       classpath="${auto.classpath}"/> 
    23   </target> 
    24  
    25   <target name="autogen-meta" depends="compile-auto" 
    26     description="autogenerate Bio-Formats metadata classes"> 
    27     <java classname="MetadataAutogen" 
    28       classpath="${auto.classpath}" 
    29       fork="true" dir="${base.dir}/src/loci/formats"/> 
    30   </target> 
    31  
    32   <target name="autogen-ice" depends="compile-auto" 
    33     description="autogenerate Bio-Formats Ice framework"> 
    34     <java classname="MetadataAutogen" 
    35       classpath="${auto.classpath}" 
    36       fork="true" dir="${base.dir}/../bio-formats-ice/src"> 
    37       <arg value="-ice"/> 
    38     </java> 
    39   </target> 
    40  
    4117</project> 
  • trunk/components/forks/poi/.classpath

    r4472 r4609  
    44        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 
    55        <classpathentry kind="var" path="LOCI_JARS/commons-logging.jar"/> 
     6        <classpathentry kind="src" path="/common"/> 
    67        <classpathentry kind="output" path="build/classes"/> 
    78</classpath> 
  • trunk/components/legacy/jvmlink/.classpath

    r4472 r4609  
    33        <classpathentry kind="src" path="src"/> 
    44        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 
    5         <classpathentry combineaccessrules="false" kind="src" path="/bio-formats"/> 
     5        <classpathentry kind="src" path="/common"/> 
    66        <classpathentry kind="output" path="build/classes"/> 
    77</classpath> 
  • trunk/components/legacy/ome-editor/.classpath

    r4472 r4609  
    55        <classpathentry kind="var" path="LOCI_JARS/forms-1.0.4.jar"/> 
    66        <classpathentry kind="var" path="LOCI_JARS/ome-java-deprecated.jar"/> 
    7         <classpathentry kind="var" path="LOCI_JARS/ome-java.jar"/> 
    87        <classpathentry combineaccessrules="false" kind="src" path="/ome-xml"/> 
    98        <classpathentry combineaccessrules="false" kind="src" path="/bio-formats"/> 
     9        <classpathentry combineaccessrules="false" kind="src" path="/common"/> 
     10        <classpathentry kind="var" path="LOCI_JARS/ome-java.jar"/> 
    1011        <classpathentry kind="output" path="build/classes"/> 
    1112</classpath> 
  • trunk/components/legacy/ome-notes/.classpath

    r4472 r4609  
    55        <classpathentry combineaccessrules="false" kind="src" path="/bio-formats"/> 
    66        <classpathentry kind="var" path="LOCI_JARS/forms-1.0.4.jar"/> 
     7        <classpathentry combineaccessrules="false" kind="src" path="/common"/> 
    78        <classpathentry kind="output" path="build/classes"/> 
    89</classpath> 
  • trunk/components/loci-plugins/.classpath

    r4472 r4609  
    66        <classpathentry kind="var" path="LOCI_JARS/ij.jar"/> 
    77        <classpathentry kind="var" path="LOCI_JARS/forms-1.0.4.jar"/> 
     8        <classpathentry combineaccessrules="false" kind="src" path="/common"/> 
    89        <classpathentry kind="output" path="build/classes"/> 
    910</classpath> 
  • trunk/components/loci-plugins/.project

    r4472 r4609  
    44        <comment></comment> 
    55        <projects> 
     6                <project>common</project> 
    67        </projects> 
    78        <buildSpec> 
  • trunk/components/ome-io/.classpath

    r4472 r4609  
    88        <classpathentry kind="var" path="LOCI_JARS/omero-importer-3.0-Beta3.jar"/> 
    99        <classpathentry kind="var" path="LOCI_JARS/omero-model-psql-3.0-Beta3.jar"/> 
     10        <classpathentry combineaccessrules="false" kind="src" path="/common"/> 
    1011        <classpathentry kind="output" path="build/classes"/> 
    1112</classpath> 
  • trunk/components/ome-plugins/.classpath

    r4472 r4609  
    77        <classpathentry kind="var" path="LOCI_JARS/ij.jar"/> 
    88        <classpathentry combineaccessrules="false" kind="src" path="/ome-io"/> 
     9        <classpathentry kind="src" path="/common"/> 
    910        <classpathentry kind="output" path="build/classes"/> 
    1011</classpath> 
  • trunk/components/slim-plotter/.classpath

    r4472 r4609  
    77        <classpathentry combineaccessrules="false" kind="src" path="/visbio"/> 
    88        <classpathentry kind="var" path="LOCI_JARS/lma.jar"/> 
     9        <classpathentry kind="src" path="/common"/> 
    910        <classpathentry kind="output" path="build/classes"/> 
    1011</classpath> 
  • trunk/components/slim-plotter/src/loci/slim/TwoDPane.java

    r4496 r4609  
    668668    else if (curProg == maxProg) { 
    669669      int totalIter = curveRenderers[c].getTotalIterations(); 
    670       int tRCSE = (int) (curveRenderers[c].getTotalRCSE() + 0.5); 
     670      long tRCSE = (long) (curveRenderers[c].getTotalRCSE() + 0.5); 
    671671      double wRCSE = curveRenderers[c].getWorstRCSE(); 
    672672      // format worst RCSE string to two decimal places 
  • trunk/components/test-suite/.classpath

    r4472 r4609  
    55        <classpathentry combineaccessrules="false" kind="src" path="/bio-formats"/> 
    66        <classpathentry kind="var" path="LOCI_JARS/testng-5.7-jdk14.jar"/> 
     7        <classpathentry combineaccessrules="false" kind="src" path="/common"/> 
    78        <classpathentry kind="output" path="build/classes"/> 
    89</classpath> 
  • trunk/components/visbio/.classpath

    r4472 r4609  
    1111        <classpathentry kind="var" path="LOCI_JARS/ij.jar"/> 
    1212        <classpathentry combineaccessrules="false" kind="src" path="/ome-xml"/> 
     13        <classpathentry combineaccessrules="false" kind="src" path="/common"/> 
     14        <classpathentry kind="var" path="LOCI_JARS/AppleJavaExtensions.jar"/> 
    1315        <classpathentry kind="output" path="build/classes"/> 
    1416</classpath> 
  • trunk/scan-deps.pl

    r4608 r4609  
    1313 
    1414# TODO - Use this script to check build.xml's depends clauses. 
    15  
    16 # TODO - Use this script to check Eclipse .classpath dependencies. 
    1715 
    1816use constant { 
     
    3230  COMPILE   => 13, # compile-time classpath for each component 
    3331  RUNTIME   => 14, # runtime classpath for each component 
     32  ECLIPSE   => 15, # Eclipse classpath for each component 
    3433}; 
    3534 
     
    7574 
    7675my %lociCommon = ( 
    77   NAME    => "loci-common", 
     76  NAME    => "common", 
    7877  TITLE   => "LOCI Common", 
    7978  PATH    => "components/common", 
     
    683682  \%omeXML, 
    684683  \%bioFormats, 
    685 #  \%bioFormatsAuto, 
     684  \%bioFormatsAuto, 
    686685  \%bioFormatsIce, 
    687686  \%lociPlugins, 
     
    817816 
    818817  # read compile-time and runtime classpaths from properties file 
    819   open FILE, "$path/build.properties" or die $!; 
     818  open FILE, "$path/build.properties" 
     819    or die "$path/build.properties: $!"; 
    820820  my @lines = <FILE>; 
    821821  close(FILE); 
     
    857857} 
    858858 
     859print STDERR "--== GATHERING ECLIPSE DEPENDENCIES ==--\n\n"; 
     860foreach my $c (@components) { 
     861  my $path = $$c{PATH}; 
     862 
     863  # read Eclipse classpath from classpath file 
     864  open FILE, "$path/.classpath" 
     865    or die "$path/.classpath: $!"; 
     866  my @lines = <FILE>; 
     867  close(FILE); 
     868  my @eclipse = (); 
     869  foreach my $line (@lines) { 
     870    $line = rtrim($line); 
     871    if ($line =~ /<classpathentry /) { 
     872      # found a compile-time classpath entry 
     873      $line =~ s/.* path="//; 
     874      $line =~ s/"\/>$//; 
     875      push(@eclipse, $line); 
     876    } 
     877  } 
     878  @eclipse = sort @eclipse; 
     879  $$c{ECLIPSE} = \@eclipse; 
     880} 
     881 
    859882print STDERR "--== VERIFYING CLASSPATH MATCHES ==--\n\n"; 
    860883foreach my $c (@components) { 
     
    863886  my @projOpt = @{$$c{PROJ_OPT}}; 
    864887  my @libOpt = @{$$c{LIB_OPT}}; 
     888  my $name = $$c{TITLE}; 
    865889 
    866890  # verify compile-time classpath 
    867891  my @deps = (@projDeps, @libDeps); 
    868892  my @cp = @{$$c{COMPILE}}; 
    869   my $name = $$c{TITLE}; 
    870893  my $compileError = 0; 
    871894  if (@deps != @cp) { 
     
    899922    print STDERR "\n"; 
    900923  } 
     924 
     925  # verify Eclipse classpath 
     926  # tweak list of dependencies 
     927  @deps = (); 
     928  foreach my $dep (@projDeps) { 
     929    push(@deps, "/" . $$dep{NAME}); 
     930  } 
     931  foreach my $dep (@libDeps) { 
     932    push(@deps, "LOCI_JARS/" . $$dep{JAR}); 
     933  } 
     934  push(@deps, "build/classes"); 
     935  push(@deps, "org.eclipse.jdt.launching.JRE_CONTAINER"); 
     936  push(@deps, "src"); 
     937  @deps = sort @deps; 
     938  @cp = @{$$c{ECLIPSE}}; 
     939  my $eclipseError = 0; 
     940  if (@deps != @cp) { 
     941    print STDERR "Dependency mismatch for $name Eclipse classpath:\n"; 
     942    $eclipseError = 1; 
     943  } 
     944  else { 
     945    for (my $i = 0; $i < @cp; $i++) { 
     946      my $depEntry = $deps[$i]; 
     947      my $cpEntry = $cp[$i]; 
     948      if ($cpEntry ne $depEntry) { 
     949        print STDERR "Dependency mismatch for $name Eclipse classpath:\n"; 
     950        print STDERR "  #$i: $depEntry != $cpEntry\n"; 
     951        $eclipseError = 1; 
     952        last; 
     953      } 
     954    } 
     955  } 
     956  if ($eclipseError) { 
     957    print STDERR "  project deps      ="; 
     958    foreach my $q (@projDeps) { 
     959      print STDERR " $$q{NAME}"; 
     960    } 
     961    print STDERR "\n  library deps      ="; 
     962    foreach my $q (@libDeps) { 
     963      print STDERR " $$q{NAME}"; 
     964    } 
     965    print STDERR "\n  Eclipse classpath = @cp\n"; 
     966    print STDERR "\n"; 
     967  } 
     968 
    901969  # verify runtime classpath 
    902970  @deps = (@projDeps, @projOpt, @libDeps, @libOpt); 
     
    904972  my $runtimeError = 0; 
    905973  if (@deps != @cp) { 
    906     print STDERR "Dependency mismatch for $$c{TITLE} runtime classpath:\n"; 
     974    print STDERR "Dependency mismatch for $name runtime classpath:\n"; 
    907975    $runtimeError = 1; 
    908976  } 
     
    913981      my $depJar = $$dep{JAR}; 
    914982      if ($cpJar ne $depJar) { 
    915         print STDERR "Dependency mismatch for $c runtime classpath:\n"; 
     983        print STDERR "Dependency mismatch for $name runtime classpath:\n"; 
    916984        print STDERR "  #$i: $depJar != $cpJar\n"; 
    917985        $runtimeError = 1; 
Note: See TracChangeset for help on using the changeset viewer.