Changeset 1395 for extensions


Ignore:
Timestamp:
Sep 15, 2011, 2:58:04 PM (12 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #312: Updates required for BASE 3 support

Fixes build script so that it:

  • Can download BASE JAR file with ant download-lib
  • Put the current version numbers in various places
  • Removed obsolete file META-INF/base-plugins.xml

Fixes JSP files so that the compile against the BASE 3 API.

Fixes installation plug-in so that it doesn't crash when updating.

Location:
extensions/net.sf.basedb.mev/trunk
Files:
1 added
1 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.mev/trunk/META-INF/extensions.xml

    r1383 r1395  
    88      it import data from the current bioassay set.
    99    </description>
    10     <version>1.8pre</version>
     10    <version>1.8-alfa</version>
    1111    <copyright>BASE development team</copyright>
    1212    <email>basedb-users@lists.sourceforge.net</email>
     
    2525    </about>
    2626    <plugin-class>net.sf.basedb.mev.install.Install</plugin-class>
     27    <settings>
     28      <property name="immediate-execution">1</property>
     29    </settings>
    2730  </plugin-definition>
    2831  <plugin-definition id="CghExporterPlugin">
     
    3538    </about>   
    3639    <plugin-class>net.sf.basedb.mev.plugin.CghExporterPlugin</plugin-class>
     40    <settings>
     41      <property name="everyone-use">1</property>
     42    </settings>
    3743  </plugin-definition>
    3844  <plugin-definition id="TdmsExporterPlugin">
     
    4551    </about>   
    4652    <plugin-class>net.sf.basedb.mev.plugin.TdmsExporterPlugin</plugin-class>
     53    <settings>
     54      <property name="everyone-use">1</property>
     55    </settings>
    4756  </plugin-definition>
    4857  <extension
  • extensions/net.sf.basedb.mev/trunk/README

    r1383 r1395  
    2020 2. Unpack the downloaded file to a directory of your choice.
    2121 3. Copy the mev-launcher.jar file to your BASE plug-ins directory. Look in
    22   your 'base.config' file if you don't know where this is.
     22   your 'base.config' file if you don't know where this is.
    2323 4. Go to 'Administrate->Plug-ins & Extensions->Overview' page.
    2424 5. Run the installation wizard and select to install 'mev-launcher.jar'.
     
    3535    for the four CGH file columns (chromosome, start, end and description).
    3636    Finish the configuration.
    37  8. Share the TDMS and CGH exporter plug-ins, including the configuration
    38     that you created in the previous step, plug-ins to the desired
    39     users and/or groups. Otherwise, only the root user and administrators
    40     can use MeV.
     37 8. The TDMS and CGH exporter plug-ins are shared to everyone by default. If
     38    that isn't desired, you may want to change this at this stage.
    4139 9. Done.
    4240 
     
    6765 2. Type `ant download-lib` to automatically download the BASE core JAR files that
    6866    are neeed for compilation. You can also do this manually by copying the
    69     base-core-3.0.0.jar, base-webclient-3.0.0.jar, base-coreplugins-3.0.0.jar and base-webservices-client-3.0.0.jar
    70     from the BASE installation directory (<basedir>/www/WEB-INF/lib/) to the
    71     ./lib/compile directory.
     67    base-core-3.0.0.jar, base-webclient-3.0.0.jar, base-coreplugins-3.0.0.jar and
     68    base-webservices-client-3.0.0.jar from the BASE installation directory
     69    (<basedir>/www/WEB-INF/lib/) to the ./lib/compile directory.
    7270
    7371 3. Type 'ant' to compile the code and generate the 'mev-launcher.jar' file
  • extensions/net.sf.basedb.mev/trunk/RELEASE

    r1239 r1395  
    1515    In build.xml:
    1616      <property name="version" value="A.B" />
    17       <property name="minbaseversion" value="X.Y" />
     17      <property name="depend.base-version" value="X.Y.Z" />
    1818     
    1919    Run `ant update-version`. This should put the version
    20     numbers in a lot of files, including, Mev.java,
    21     META-INF/extensions.xml and META-INF/base-plugins.xml.
     20    numbers in a lot of files, including, Mev.java and
     21    META-INF/extensions.xml.
    2222   
    2323    Check (and update if needed) the README file and
     
    666611. Update the version numbers.
    6767 
    68     In build.xml: <property name="version" value="A.(B+1)pre" />
     68    In build.xml: <property name="version" value="A.(B+1)-dev" />
    6969    Run `ant update-version` and commit the changes to
    7070    subversion:
  • extensions/net.sf.basedb.mev/trunk/build.xml

    r1384 r1395  
    1010  <!-- variables used -->
    1111  <property name="name" value="mev-launcher" />
    12   <property name="version" value="1.8pre" />
    13   <property name="minbaseversion" value="3.0"
    14       description="Minimal BASE version required by the plug-ins" />
     12  <property name="version" value="1.8-alfa" />
    1513  <property name="src" location="src" description="Location of source files" />
    1614  <property name="build" location="build" description="Location of compiled files" />
     
    2523  <property name="javac.target" value="1.6" />
    2624  <property name="javac.encoding" value="UTF-8" />
    27   <property name="depend.jars" value="http://base2.thep.lu.se/base/jars/" />
     25  <property name="depend.base-version"
     26    value="3.0.0"
     27    description="The BASE version that this project depends on."
     28  />
     29  <property name="depend.jars"
     30    value="http://base2.thep.lu.se/base/jars/${depend.base-version}"
     31    description="The location of the BASE core JARs that this project depends on."
     32  />
    2833
    2934  <!-- set up classpath for compiling -->
     
    8489      <fileset dir="." includes="META-INF/*" />
    8590    </copy>
    86     <replace token="%%plugins.jar%%" value="${jar.name}" file="${build}/server/META-INF/base-plugins.xml" />
    8791    <jar
    8892      jarfile="${jar.name}"
     
    180184    />
    181185   
    182     <echo>base-plugins.xml</echo>
    183186    <replaceregexp
    184       file="META-INF/base-plugins.xml"
    185       match="&lt;minbaseversion&gt;.*&lt;/minbaseversion&gt;"
    186       replace="&lt;minbaseversion&gt;${minbaseversion}&lt;/minbaseversion&gt;"
     187      file="META-INF/extensions.xml"
     188      match="&lt;min-base-version&gt;.*&lt;/min-base-version&gt;"
     189      replace="&lt;min-base-version&gt;${depend.base-version}&lt;/min-base-version&gt;"
    187190      encoding="UTF-8"
    188       flags="g"
    189191    />
    190192    <echo>Don't forget to commit the changes to the subversion repository!</echo>
     
    193195  <target
    194196    name="checkjar"
    195     description="Checks that the base-core-3.0.0.jar, base-webclient-3.0.0.jar, base-coreplugins-3.0.0.jar and base-webservices-client-3.0.0.jar exists."
     197    description="Checks that the required BASE JAR files exists."
    196198    >
    197199    <available classname="net.sf.basedb.util.export.spotdata.AbstractBioAssaySetExporter"
     
    203205    <available classname="net.sf.basedb.info.BioAssaySetInfo"
    204206      classpathref="classpath" property="basewebservice" />
    205     <fail unless="basecore" message="Can't find base-core-3.0.0.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
    206     <fail unless="baseplugins" message="Can't find base-coreplugins-3.0.0.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
    207     <fail unless="baseweb" message="Can't find base-webclient-3.0.0.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
    208     <fail unless="basewebservice" message="Can't find base-webservices-client-3.0.0.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
    209     <echo>Found base-core-3.0.0.jar, base-coreplugins-3.0.0.jar, base-webclient-3.0.0.jar and base-webservices-client-3.0.0.jar.</echo>
     207    <fail unless="basecore" message="Can't find base-core-${depend.base-version}.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
     208    <fail unless="baseplugins" message="Can't find base-coreplugins-${depend.base-version}.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
     209    <fail unless="baseweb" message="Can't find base-webclient-${depend.base-version}.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
     210    <fail unless="basewebservice" message="Can't find base-webservices-client-${depend.base-version}.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
     211    <echo>Found all requried BASE core JAR files.</echo>
    210212  </target>
    211213 
     
    251253  <target
    252254    name="download-lib"
    253     description="Download base-core-3.0.0.jar, base-webclient-3.0.0.jar, base-coreplugins-3.0.0.jar and base-webservices-client-3.0.0.jar"
     255    description="Download base-core-3.x.jar, base-webclient-3.0.0.jar, base-coreplugins-3.x.jar and base-webservices-client-3.0x.jar"
    254256    >
    255257    <echo>
     
    260262-------------------------------------------------------
    261263    </echo>
    262     <download-lib file="base-core-3.0.0.jar" />
    263     <download-lib file="base-webclient-3.0.0.jar" />
    264     <download-lib file="base-coreplugins-3.0.0.jar" />
    265     <download-lib file="base-webservices-client-3.0.0.jar" />
     264    <download-lib file="base-core-${depend.base-version}.jar" />
     265    <download-lib file="base-webclient-${depend.base-version}.jar" />
     266    <download-lib file="base-coreplugins-${depend.base-version}.jar" />
     267    <download-lib file="base-webservices-client-${depend.base-version}.jar" />
    266268  </target>
    267269 
  • extensions/net.sf.basedb.mev/trunk/resources/launch_mev.jsp

    r1181 r1395  
    6161  try
    6262  {
    63     file = FileStoreUtil.getDataFile(dc, bas, fileType);
     63    file = FileStoreUtil.getDataFile(dc, bas, fileType, false);
    6464  }
    6565  catch (Throwable t)
  • extensions/net.sf.basedb.mev/trunk/resources/mev_jnlp.jsp

    r1228 r1395  
    5959{
    6060  BioAssaySet bas = BioAssaySet.getById(dc, bioAssaySetId);
    61   File mevFile = FileStoreUtil.getDataFile(dc, bas, fileType);
     61  File mevFile = FileStoreUtil.getDataFile(dc, bas, fileType, false);
    6262  if (mevFile == null)
    6363  {
  • extensions/net.sf.basedb.mev/trunk/src/server/net/sf/basedb/mev/Mev.java

    r1383 r1395  
    99public class Mev
    1010{
     11
     12  /**
     13    The current version of this plug-in package.
     14  */
     15  public static final String VERSION = "1.8-alfa";
     16
    1117  /**
    1218    The external ID for the file type representing
  • extensions/net.sf.basedb.mev/trunk/src/server/net/sf/basedb/mev/install/Install.java

    r1383 r1395  
    4848import net.sf.basedb.core.SessionControl;
    4949import net.sf.basedb.core.SystemItems;
    50 import net.sf.basedb.core.plugin.About;
    51 import net.sf.basedb.core.plugin.AboutImpl;
    5250import net.sf.basedb.core.plugin.AbstractPlugin;
    5351import net.sf.basedb.core.plugin.GuiContext;
     
    114112    return false;
    115113  }
     114  @Override
    116115  public Plugin.MainType getMainType()
    117116  {
    118117    return Plugin.MainType.OTHER;
    119118  }
     119  @Override
    120120  public void run(Request request, Response response, ProgressReporter progress)
    121121  {
     
    144144    -------------------------------------------
    145145  */
     146  @Override
    146147  public Set<GuiContext> getGuiContexts()
    147148  {
    148149    return guiContexts;
    149150  }
     151  @Override
    150152  public String isInContext(GuiContext context, Object item)
    151153  {
     
    166168  }
    167169
     170  @Override
    168171  public void configure(GuiContext context, Request request, Response response)
    169172  {
     
    196199  }
    197200
     201  @Override
    198202  public RequestInformation getRequestInformation(GuiContext context, String command)
    199203    throws BaseException
     
    219223
    220224      // MIME type
    221       MimeType mimeType = MimeType.getNew(dc);
    222       mimeType.setExtension("anl");
    223       mimeType.setDescription("A MeV analysis file (*.anl)");
    224       mimeType.setName("application/zip");
    225       mimeType.setAutoCompress(false);
    226       mimeType.setFileType(spotDataType);
    227       dc.saveItem(mimeType);
    228      
     225      MimeType mimeType = createMimeType(dc,
     226        "anl", "application/zip",
     227        "A MeV analysis file (*.anl)",
     228        false, spotDataType);
     229         
    229230      //Data file types
    230231      DataFileType mevAnalysisFile = createDataFileType(dc, Mev.ANALYSIS_FILE, "MeV analysis file",
     
    358359  }
    359360 
     361  private MimeType createMimeType(DbControl dc, String extension, String name,
     362    String description, boolean autoCompress, ItemSubtype fileType)
     363  {
     364    MimeType mimeType = null;
     365    try
     366    {
     367      mimeType = MimeType.getByExtension(dc, extension);
     368    }
     369    catch (ItemNotFoundException ex)
     370    {
     371      mimeType = MimeType.getNew(dc);
     372      mimeType.setExtension(extension);
     373      mimeType.setDescription(description);
     374      mimeType.setName(name);
     375      mimeType.setAutoCompress(autoCompress);
     376      mimeType.setFileType(fileType);
     377      dc.saveItem(mimeType);
     378    }
     379    return mimeType;
     380  }
     381 
    360382  private ItemKey getEveryoneUseKey(DbControl dc)
    361383  {
  • extensions/net.sf.basedb.mev/trunk/src/server/net/sf/basedb/mev/plugin/CghExporterPlugin.java

    r1383 r1395  
    3030import net.sf.basedb.core.StringParameterType;
    3131import net.sf.basedb.core.Type;
    32 import net.sf.basedb.core.plugin.About;
    33 import net.sf.basedb.core.plugin.AboutImpl;
    3432import net.sf.basedb.core.plugin.AbstractExporterPlugin;
    3533import net.sf.basedb.core.plugin.ExportOutputStream;
  • extensions/net.sf.basedb.mev/trunk/src/server/net/sf/basedb/mev/plugin/TdmsExporterPlugin.java

    r1383 r1395  
    2626import net.sf.basedb.core.ProgressReporter;
    2727import net.sf.basedb.core.RequestInformation;
    28 import net.sf.basedb.core.plugin.About;
    29 import net.sf.basedb.core.plugin.AboutImpl;
    3028import net.sf.basedb.core.plugin.AbstractExporterPlugin;
    3129import net.sf.basedb.core.plugin.ExportOutputStream;
  • extensions/net.sf.basedb.mev/trunk/src/server/net/sf/basedb/mev/servlet/MevDownload.java

    r1227 r1395  
    5757  private static final long serialVersionUID = -681581186110420461L;
    5858
     59  @Override
    5960  public void doGet(HttpServletRequest request, HttpServletResponse response)
    6061    throws IOException, ServletException
     
    120121  }
    121122
     123  @Override
    122124  public void doPost(HttpServletRequest request, HttpServletResponse response)
    123125    throws IOException, ServletException
Note: See TracChangeset for help on using the changeset viewer.