[code.view]

[top] / java / tomcat / res / maven / mvn-pub.xml

     <?xml version="1.0"?>
     <!--
       Licensed to the Apache Software Foundation (ASF) under one or more
       contributor license agreements.  See the NOTICE file distributed with
       this work for additional information regarding copyright ownership.
       The ASF licenses this file to You under the Apache License, Version 2.0
       (the "License"); you may not use this file except in compliance with
       the License.  You may obtain a copy of the License at
     
           http://www.apache.org/licenses/LICENSE-2.0
     
       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.
     -->
     <project name="Tomcat 6.0 Maven Deployment" default="" basedir="."
              xmlns:artifact="urn:maven-artifact-ant">
       <!--
         Built for using Maven Ant Tasks (version 2.1.0 is known to work)
       -->
     
       <property file="${basedir}/mvn.properties"/>
       <property file="${basedir}/mvn.properties.default"/>
       <property name="local.repo" value="${user.home}/.m2/repository"/>
     
       <target name="init-maven">
         <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
                  uri="urn:maven-artifact-ant">
           <classpath>
             <pathelement location="${basedir}/maven-ant-tasks-2.1.0.jar" />
           </classpath>
         </typedef>
       </target>
     
       <target name="maven-deploy-nexus" depends="init-maven">
         <!--deploy it in nexus -->
         <artifact:deploy file="${file}">
             <pom file="${pom}.tmp"/>
             <remoteRepository url="${maven.repo.url}" layout="default">
               <authentication username="${asf.ldap.username}"
                               password="${asf.ldap.password}"/>
             </remoteRepository>
             <attach file="${file}.asc" type="jar.asc"/>
             <attach file="${pom}.asc" type="pom.asc"/>
         </artifact:deploy>
       </target>
     
       <target name="maven-deploy" depends="init-maven">
         <!--cleanup-->
         <delete file="${pom}.tmp"/>
         <delete file="${pom}.asc"/>
         <delete file="${file}.asc"/>
     
         <!--replace the version in the pom-->
         <copy file="${pom}" tofile="${pom}.tmp">
           <filterset>
             <filter token="MAVEN.DEPLOY.VERSION" value="${maven.deploy.version}"/>
           </filterset>
         </copy>
         
         <!--sign the jar and the pom-->
         <exec executable="${gpg.exec}" failonerror="true"
               inputstring="${gpg.passphrase}">
           <arg value="--passphrase-fd"/>
           <arg value="0"/>
           <arg value="-a"/>
           <arg value="-b"/>
           <arg value="${file}"/>
         </exec>
         <exec executable="${gpg.exec}" failonerror="true"
               inputstring="${gpg.passphrase}">
           <arg value="--passphrase-fd"/>
           <arg value="0"/>
           <arg value="-a"/>
           <arg value="-b"/>
           <arg value="-o"/>
           <arg value="${pom}.asc"/>
           <arg value="${pom}.tmp"/>
         </exec>
         
         <!--deploy it-->
         <antcall target="maven-deploy-nexus">
             <param name="file" value="${file}"/>
             <param name="pom" value="${pom}"/>
         </antcall>
     
         <delete file="${pom}.tmp"/>
         <delete file="${pom}.asc"/>
         <delete file="${file}.asc"/>
       </target>
       
       <target name="maven-deploy-nosrc" depends="init-maven">
         <!--cleanup-->
         <delete file="${pom}.tmp"/>
         <delete file="${pom}.asc"/>
         <delete file="${file}.asc"/>
     
         <!--replace the version in the pom-->
         <copy file="${pom}" tofile="${pom}.tmp">
           <filterset>
             <filter token="MAVEN.DEPLOY.VERSION" value="${maven.deploy.version}"/>
           </filterset>
         </copy>
     
         <!--sign the jar and pom -->
         <exec executable="${gpg.exec}" failonerror="true"
               inputstring="${gpg.passphrase}">
           <arg value="--passphrase-fd"/>
           <arg value="0"/>
           <arg value="-a"/>
           <arg value="-b"/>
           <arg value="${file}"/>
         </exec>
         <exec executable="${gpg.exec}" failonerror="true"
               inputstring="${gpg.passphrase}">
           <arg value="--passphrase-fd"/>
           <arg value="0"/>
           <arg value="-a"/>
           <arg value="-b"/>
           <arg value="-o"/>
           <arg value="${pom}.asc"/>
           <arg value="${pom}.tmp"/>
         </exec>
     
         <!--deploy it-->
         <artifact:deploy file="${file}">
           <pom file="${pom}.tmp"/>
           <remoteRepository url="${maven.repo.url}" layout="default" >
             <authentication username="${asf.ldap.username}"
                             password="${asf.ldap.password}"/>
           </remoteRepository>
           <attach file="${file}.asc" type="jar.asc"/>
           <attach file="${pom}.asc" type="pom.asc"/>
         </artifact:deploy>
     
         <delete file="${pom}.tmp"/>
         <delete file="${pom}.asc"/>
         <delete file="${file}.asc"/>
       </target>
     
       <macrodef name="doMavenDeployNoSrc">
         <attribute name="artifactId"/>
         <attribute name="jarFileName" default="@{artifactId}.jar" />
         <attribute name="groupId" default="org.apache.tomcat" />
         <attribute name="file" default="${tomcat.lib.path}/@{jarFileName}" />
         <attribute name="pom" default="@{artifactId}.pom" />
         <sequential>
           <antcall target="maven-deploy-nosrc">
             <param name="file" value="@{file}"/>
             <param name="groupId" value="@{groupId}"/>
             <param name="artifactId" value="@{artifactId}"/>
             <param name="pom" value="${tomcat.pom.path}/@{pom}"/>
           </antcall>
         </sequential>
       </macrodef>
       
       <target name="generic-deploy" depends="init-maven,init-gpg,init-ldap">
         <!-- Standard jars in bin directory -->
         <doMavenDeployNoSrc artifactId="juli"
         	                      file="${tomcat.bin.path}/tomcat-juli.jar"/>
     
       	<!-- Standard jars in lib directory -->
         <doMavenDeployNoSrc artifactId="annotations-api"/>
       	<doMavenDeployNoSrc artifactId="catalina"/>
       	<doMavenDeployNoSrc artifactId="catalina-ant"/>
       	<doMavenDeployNoSrc artifactId="catalina-ha"/>
     
       	<doMavenDeployNoSrc artifactId="tribes"
       		               jarFileName="catalina-tribes.jar"/>
     
         <doMavenDeployNoSrc artifactId="el-api"/>
         <doMavenDeployNoSrc artifactId="jasper"/>
         <doMavenDeployNoSrc artifactId="jasper-el"/>
         <doMavenDeployNoSrc artifactId="jsp-api"/>
       	<doMavenDeployNoSrc artifactId="servlet-api"/>
     
         <doMavenDeployNoSrc artifactId="coyote"
                            jarFileName="tomcat-coyote.jar"/>
     
         <doMavenDeployNoSrc artifactId="dbcp"
         	               jarFileName="tomcat-dbcp.jar"/>
     
         <doMavenDeployNoSrc artifactId="tomcat-i18n-es"/>
         <doMavenDeployNoSrc artifactId="tomcat-i18n-fr"/>
         <doMavenDeployNoSrc artifactId="tomcat-i18n-ja"/>
     
         <!-- Extras jars -->
         <doMavenDeployNoSrc artifactId="juli"
             pom="juli-extras.pom"
             groupId="org.apache.tomcat.extras"
             file="${tomcat.extras.path}/tomcat-juli.jar" />
         <doMavenDeployNoSrc artifactId="juli-adapters"
             groupId="org.apache.tomcat.extras"
             file="${tomcat.extras.path}/tomcat-juli-adapters.jar" />
         <doMavenDeployNoSrc artifactId="tomcat-catalina-jmx-remote"
             groupId="org.apache.tomcat"
             file="${tomcat.extras.path}/catalina-jmx-remote.jar" />
         <doMavenDeployNoSrc artifactId="tomcat-catalina-ws"
             groupId="org.apache.tomcat"
             file="${tomcat.extras.path}/catalina-ws.jar" />
             	
       </target>
     
       <target name="deploy-snapshot">
         <antcall target="generic-deploy">
           <param name="maven.repo.repositoryId"
                  value="${maven.snapshot.repo.repositoryId}"/>
           <param name="maven.repo.url" value="${maven.snapshot.repo.url}"/>
           <param name="maven.deploy.version" value="6.0-SNAPSHOT"/>
         </antcall>
       </target>
     
       <target name="deploy-release">
         <antcall target="generic-deploy">
           <param name="maven.repo.repositoryId"
                  value="${maven.asf.release.repo.repositoryId}"/>
           <param name="maven.repo.url" value="${maven.asf.release.repo.url}"/>
           <param name="maven.deploy.version"
                  value="${maven.asf.release.deploy.version}"/>
         </antcall>
       </target>
     
       <target name="init-gpg">
         <input message="Enter GPG pass-phrase" addproperty="gpg.passphrase" >
           <handler type="secure"/>
         </input>
       </target>
     
       <target name="init-ldap">
         <input message="Enter ASF LDAP (same svn) password"
                addproperty="asf.ldap.password" >
           <handler type="secure"/>
         </input>
       </target>
     
     </project>
     

[top] / java / tomcat / res / maven / mvn-pub.xml

contact | logmethods.com