반응형


Windows10 환경에서 visualStudio 2010 에 SpringFramework 닷넷 버전 1.3.2 의 Schema 설치를 위한 수정된 NAnt 스크립트 공유합니다.

바뀐 부분

SOFTWARE\Microsoft\VisualStudio\10.0_Config\InstallDir"

spring-database-1.3.xsd


<?xml version="1.0" ?>
<project name="Spring.NET-Schema" default="deploy-schema">

<target name="locations"
   descriptions="Shows directories where .xsd files will be copied">

  
  <property name="vsXXXX.version" value="VS.NET 2010"/>
<property name="vsXXXX.xml.schemas.install.dir" value="SOFTWARE\Microsoft\VisualStudio\10.0_Config\InstallDir"/>
<property name="vsXXXX.relative.dir" value="..\..\Xml\Schemas"/>
<!-- retrieve location of VS.NET 2010 schema store -->
<readregistry property="vs2010.xml.schemas" key="${vsXXXX.xml.schemas.install.dir}" hive="CurrentUser"
failonerror="false"/>
<echo message="VS.NET 2010 xsd install directory = ${vs2010.xml.schemas}${vsXXXX.relative.dir}"/> 

<property name="vsXXXX.version" value="VS.NET 2008"/>
<property name="vsXXXX.xml.schemas.install.dir" value="SOFTWARE\Microsoft\VisualStudio\9.0\InstallDir"/>
<property name="vsXXXX.relative.dir" value="..\..\Xml\Schemas"/>
<!-- retrieve location of VS.NET 2008 schema store -->
<readregistry property="vs2008.xml.schemas" key="${vsXXXX.xml.schemas.install.dir}" hive="LocalMachine"
failonerror="false"/>
<echo message="VS.NET 2008 xsd install directory = ${vs2008.xml.schemas}${vsXXXX.relative.dir}"/>

<property name="vsXXXX.version" value="VS.NET 2005"/>
<property name="vsXXXX.xml.schemas.install.dir" value="SOFTWARE\Microsoft\VisualStudio\8.0\InstallDir"/>
<property name="vsXXXX.relative.dir" value="..\..\Xml\Schemas"/>
<!-- retrieve location of VS.NET 2005 schema store -->
<readregistry property="vs2005.xml.schemas" key="${vsXXXX.xml.schemas.install.dir}" hive="LocalMachine"
failonerror="false"/>
<echo message="VS.NET 2005 xsd install directory = ${vs2005.xml.schemas}${vsXXXX.relative.dir}"/>

<property name="vsXXXX.version" value="VS.NET 2003"/>
<property name="vsXXXX.xml.schemas.install.dir" value="SOFTWARE\Microsoft\VisualStudio\7.1\InstallDir"/>
<property name="vsXXXX.relative.dir" value="..\Packages\schemas\xml"/>
<!-- retrieve location of VS.NET 2003 schema store -->
<readregistry property="vs2003.xml.schemas" key="${vsXXXX.xml.schemas.install.dir}" hive="LocalMachine"
failonerror="false"/>
<echo message="VS.NET 2003 xsd install directory = ${vs2003.xml.schemas}${vsXXXX.relative.dir}"/>
</target>


<target name="deploy-schema"
description="Deploys the Schema to VS.Net schemas dirs. Copies VS 7.0, 7.1, 8.0, 9.0">

<!-- deploy spring schema to the VS.NET 2010 schema store -->
<property name="vsXXXX.version" value="VS.NET 2010"/>
<property name="vsXXXX.xml.schemas.install.dir" value="SOFTWARE\Microsoft\VisualStudio\10.0_Config\InstallDir"/>
<property name="vsXXXX.relative.dir" value="..\..\Xml\Schemas"/>
<!-- retrieve location of VS.NET 2010 schema store -->
<readregistry property="vs2010.xml.schemas" key="${vsXXXX.xml.schemas.install.dir}" hive="CurrentUser"
failonerror="false"/>
<property name="vsXXXX.xml.schemas.notinstalled" value="true"/>
<if test="${property::exists('vs2010.xml.schemas')}">
<property name="vsXXXX.xml.schemas" value="${vs2010.xml.schemas}"/>
<call target="_deploy-schema"/>
</if>
<if test="${vsXXXX.xml.schemas.notinstalled}">
<echo message=""/>
<echo message="Failed installing schema files for VS.NET 2010."/>
<echo message=""/>
</if>    
    
<!-- deploy spring schema to the VS.NET 2008 schema store -->
<property name="vsXXXX.version" value="VS.NET 2008"/>
<property name="vsXXXX.xml.schemas.install.dir" value="SOFTWARE\Microsoft\VisualStudio\9.0\InstallDir"/>
<property name="vsXXXX.relative.dir" value="..\..\Xml\Schemas"/>
<!-- retrieve location of VS.NET 2005 schema store -->
<readregistry property="vs2008.xml.schemas" key="${vsXXXX.xml.schemas.install.dir}" hive="LocalMachine"
failonerror="false"/>
<property name="vsXXXX.xml.schemas.notinstalled" value="true"/>
<if test="${property::exists('vs2008.xml.schemas')}">
<property name="vsXXXX.xml.schemas" value="${vs2008.xml.schemas}"/>
<call target="_deploy-schema"/>
</if>
<if test="${vsXXXX.xml.schemas.notinstalled}">
<echo message=""/>
<echo message="Failed installing schema files for VS.NET 2008."/>
<echo message=""/>
</if>

<!-- deploy spring schema to the VS.NET 2005 schema store -->
<property name="vsXXXX.version" value="VS.NET 2005"/>
<property name="vsXXXX.xml.schemas.install.dir" value="SOFTWARE\Microsoft\VisualStudio\8.0\InstallDir"/>
<property name="vsXXXX.relative.dir" value="..\..\Xml\Schemas"/>
<!-- retrieve location of VS.NET 2005 schema store -->
<readregistry property="vs2005.xml.schemas" key="${vsXXXX.xml.schemas.install.dir}" hive="LocalMachine"
failonerror="false"/>
<property name="vsXXXX.xml.schemas.notinstalled" value="true"/>
<if test="${property::exists('vs2005.xml.schemas')}">
<property name="vsXXXX.xml.schemas" value="${vs2005.xml.schemas}"/>
<call target="_deploy-schema"/>
</if>
<if test="${vsXXXX.xml.schemas.notinstalled}">
<echo message=""/>
<echo message="Failed installing schema files for VS.NET 2005."/>
<echo message=""/>
</if>


<!-- deploy spring schema to the VS.NET 2003 schema store -->
<property name="vsXXXX.version" value="VS.NET 2003"/>
<property name="vsXXXX.xml.schemas.install.dir" value="SOFTWARE\Microsoft\VisualStudio\7.1\InstallDir"/>
<property name="vsXXXX.relative.dir" value="..\Packages\schemas\xml"/>
<!-- retrieve location of VS.NET 2003 schema store -->
<readregistry property="vs2003.xml.schemas" key="${vsXXXX.xml.schemas.install.dir}" hive="LocalMachine"
failonerror="false"/>
<property name="vsXXXX.xml.schemas.notinstalled" value="true"/>
<if test="${property::exists('vs2003.xml.schemas')}">
<property name="vsXXXX.xml.schemas" value="${vs2003.xml.schemas}"/>
<call target="_deploy-schema"/>
</if>
<if test="${vsXXXX.xml.schemas.notinstalled}">
<echo message=""/>
<echo message="Failed installing schema files for VS.NET 2003."/>
<echo message=""/>
</if>


<!-- deploy spring schema to the VS.NET 2002 schema store -->
<property name="vsXXXX.version" value="VS.NET 2002"/>
<property name="vsXXXX.xml.schemas.install.dir" value="SOFTWARE\Microsoft\VisualStudio\7.0\InstallDir"/>
<property name="vsXXXX.relative.dir" value="..\Packages\schemas\xml"/>
<!-- retrieve location of VS.NET 2003 schema store -->
<readregistry property="vs2002.xml.schemas" key="${vsXXXX.xml.schemas.install.dir}" hive="LocalMachine"
failonerror="false"/>
<property name="vsXXXX.xml.schemas.notinstalled" value="true"/>
<if test="${property::exists('vs2002.xml.schemas')}">
<property name="vsXXXX.xml.schemas" value="${vs2002.xml.schemas}"/>
<call target="_deploy-schema"/>
</if>
<if test="${vsXXXX.xml.schemas.notinstalled}">
<echo message=""/>
<echo message="Failed installing schema files for VS.NET 2003."/>
<echo message=""/>
</if>
</target>

<!-- 'private' scoped parameterised version of the 'deploy-schema' target -->


<target name="_deploy-schema" depends="_clean">

<!-- deploy schema to VS.NET XXXX schema store -->
<echo message="-------------------------------------------------------"/>
<echo message="Copying spring-objects-1.3.xsd to ${vsXXXX.version} installation."/>
<echo message="-------------------------------------------------------"/>
<echo message=""/>
<copy file="spring-objects-1.3.xsd" todir="${vsXXXX.xml.schemas}${vsXXXX.relative.dir}"
verbose="true"
overwrite="true"/>

<echo message="-------------------------------------------------------"/>
<echo message="Copying spring-tool-1.1.xsd to ${vsXXXX.version} installation."/>
<echo message="-------------------------------------------------------"/>
<echo message=""/>
<copy file="spring-tool-1.1.xsd" todir="${vsXXXX.xml.schemas}${vsXXXX.relative.dir}"
verbose="true"
   overwrite="true"/>

<echo message="----------------------------------------------------------"/>
<echo message="Copying spring-validation-1.3.xsd to ${vsXXXX.version} installation."/>
<echo message="----------------------------------------------------------"/>
<echo message=""/>
<copy file="spring-validation-1.3.xsd" todir="${vsXXXX.xml.schemas}${vsXXXX.relative.dir}"
verbose="true"
overwrite="true"/>

<echo message="----------------------------------------------------------"/>
<echo message="Copying spring-aop-1.1.xsd to ${vsXXXX.version} installation."/>
<echo message="----------------------------------------------------------"/>
<echo message=""/>
<copy file="spring-aop-1.1.xsd" todir="${vsXXXX.xml.schemas}${vsXXXX.relative.dir}"
verbose="true"
overwrite="true"/>

<echo message="----------------------------------------------------------"/>
<echo message="Copying spring-remoting-1.1.xsd to ${vsXXXX.version} installation."/>
<echo message="----------------------------------------------------------"/>
<echo message=""/>
<copy file="spring-remoting-1.1.xsd" todir="${vsXXXX.xml.schemas}${vsXXXX.relative.dir}"
verbose="true"
overwrite="true"/>

<echo message="----------------------------------------------------------"/>
<echo message="Copying spring-database.xsd to ${vsXXXX.version} installation."/>
<echo message="----------------------------------------------------------"/>
<echo message=""/>
<copy file="spring-database-1.3.xsd" todir="${vsXXXX.xml.schemas}${vsXXXX.relative.dir}"
verbose="true"
overwrite="true"/>

<echo message="----------------------------------------------------------"/>
<echo message="Copying spring-tx-1.1.xsd to ${vsXXXX.version} installation."/>
<echo message="----------------------------------------------------------"/>
<echo message=""/>
<copy file="spring-tx-1.1.xsd" todir="${vsXXXX.xml.schemas}${vsXXXX.relative.dir}"
verbose="true"
overwrite="true"/>

<echo message="----------------------------------------------------------"/>
<echo message="Copying spring-nms-1.3.xsd to ${vsXXXX.version} installation."/>
<echo message="----------------------------------------------------------"/>
<echo message=""/>
<copy file="spring-nms-1.3.xsd" todir="${vsXXXX.xml.schemas}${vsXXXX.relative.dir}"
verbose="true"
overwrite="true"/>

<echo message="----------------------------------------------------------"/>
<echo message="Copying spring-ems-1.3.xsd to ${vsXXXX.version} installation."/>
<echo message="----------------------------------------------------------"/>
<echo message=""/>
<copy file="spring-ems-1.3.xsd" todir="${vsXXXX.xml.schemas}${vsXXXX.relative.dir}"
verbose="true"
overwrite="true"/>

<echo message="----------------------------------------------------------"/>
<echo message="Copying spring-nvelocity-1.3.xsd to ${vsXXXX.version} installation."/>
<echo message="----------------------------------------------------------"/>
<echo message=""/>
<copy file="spring-nvelocity-1.3.xsd" todir="${vsXXXX.xml.schemas}${vsXXXX.relative.dir}"
verbose="true"
overwrite="true"/>

<property name="vsXXXX.xml.schemas.notinstalled" value="false"/>
</target>

  <target name="_clean">
<echo message="-------------------------------------------------"/>
<echo message="Removing previously installed spring schema files"/>
<echo message="from ${vsXXXX.version} installation."/>
<echo message="-------------------------------------------------"/>
<echo message=""/>
    <delete failonerror="false">
      <fileset basedir="${vsXXXX.xml.schemas}${vsXXXX.relative.dir}">
        <include name="spring-*.xsd"/>
      </fileset>
    </delete>
  </target>
</project>


반응형

+ Recent posts