View | Details | Raw Unified | Return to bug 51300
Collapse All | Expand All

(-)maven/mvn-install.sh (+37 lines)
Line 0 Link Here
1
#! /bin/sh
2
#
3
#   Licensed to the Apache Software Foundation (ASF) under one or more
4
#   contributor license agreements.  See the NOTICE file distributed with
5
#   this work for additional information regarding copyright ownership.
6
#   The ASF licenses this file to You under the Apache License, Version 2.0
7
#   (the "License"); you may not use this file except in compliance with
8
#   the License.  You may obtain a copy of the License at
9
#
10
#       http://www.apache.org/licenses/LICENSE-2.0
11
#
12
#   Unless required by applicable law or agreed to in writing, software
13
#   distributed under the License is distributed on an "AS IS" BASIS,
14
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
#   See the License for the specific language governing permissions and
16
#   limitations under the License.
17
#
18
# Shell script to install POI artifacts in a local maven repository.
19
#
20
#  Usage:
21
#   1. ant dist
22
#   2. cd build/dist
23
#   3. ./mvn-install.sh 
24
#
25
# @author Yegor Kozlov
26
27
VERSION=@VERSION@
28
DSTAMP=@DSTAMP@
29
30
GOAL=install:install-file
31
for artifactId in poi poi-scratchpad poi-ooxml poi-examples poi-ooxml-schemas poi-excelant
32
do
33
  mvn $GOAL -Dfile=$artifactId-$VERSION-$DSTAMP.jar -DpomFile=$artifactId-$VERSION.pom -DgeneratePom=false
34
  if [ -r $artifactId-$VERSION-sources-$DSTAMP.jar ]; then
35
    mvn $GOAL -Dfile=$artifactId-$VERSION-sources-$DSTAMP.jar -Dversion=$VERSION -DgeneratePom=false -DartifactId=$artifactId -DgroupId=org.apache.poi -Dpackaging=java-source
36
  fi
37
done
0
  + *
38
  + *
1
  + Date Revision
39
  + Date Revision
2
  + native
40
  + native
(-)build.xml (-37 / +11 lines)
Lines 866-923 Link Here
866
            description="Builds the POM files for a maven distribution, and copies these and the jars to the appropriate locations">
866
            description="Builds the POM files for a maven distribution, and copies these and the jars to the appropriate locations">
867
867
868
        <!-- Build the org.apache.poi poms -->
868
        <!-- Build the org.apache.poi poms -->
869
        <copy file="maven/poi.pom" tofile="${dist.dir}/poi-${version.id}.pom">
869
        <copy todir="${dist.dir}">
870
            <globmapper from="poi*.pom" to="poi*-${version.id}.pom"/>
871
            <fileset dir="maven">
872
                <include name="*.pom"/>
873
            </fileset>
870
            <filterchain>
874
            <filterchain>
871
                <replacetokens>
875
                <replacetokens>
872
                    <token key="VERSION" value="${version.id}"/>
876
                    <token key="VERSION" value="${version.id}"/>
873
                </replacetokens>
877
                </replacetokens>
874
            </filterchain>
878
            </filterchain>
875
        </copy>
879
        </copy>
876
        <copy file="maven/poi-scratchpad.pom" tofile="${dist.dir}/poi-scratchpad-${version.id}.pom">
880
        <copy todir="${dist.dir}">
881
            <fileset dir="maven">
882
                <include name="mvn-deploy.sh"/>
883
                <include name="mvn-install.sh"/>
884
            </fileset>
877
            <filterchain>
885
            <filterchain>
878
                <replacetokens>
886
                <replacetokens>
879
                    <token key="VERSION" value="${version.id}"/>
887
                    <token key="VERSION" value="${version.id}"/>
880
                </replacetokens>
881
            </filterchain>
882
        </copy>
883
        <copy file="maven/poi-ooxml.pom" tofile="${dist.dir}/poi-ooxml-${version.id}.pom">
884
            <filterchain>
885
                <replacetokens>
886
                    <token key="VERSION" value="${version.id}"/>
887
                </replacetokens>
888
            </filterchain>
889
        </copy>
890
        <copy file="maven/poi-examples.pom" tofile="${dist.dir}/poi-examples-${version.id}.pom">
891
            <filterchain>
892
                <replacetokens>
893
                    <token key="VERSION" value="${version.id}"/>
894
                </replacetokens>
895
            </filterchain>
896
        </copy>
897
        <copy file="maven/poi-ooxml-schemas.pom" tofile="${dist.dir}/poi-ooxml-schemas-${version.id}.pom">
898
            <filterchain>
899
                <replacetokens>
900
                    <token key="VERSION" value="${version.id}"/>
901
                </replacetokens>
902
            </filterchain>
903
        </copy>
904
        <copy file="maven/poi-excelant.pom" tofile="${dist.dir}/poi-excelant-${version.id}.pom">
905
            <filterchain>
906
                <replacetokens>
907
                    <token key="VERSION" value="${version.id}"/>
908
                </replacetokens>
909
            </filterchain>
910
        </copy>
911
        <copy file="maven/mvn-deploy.sh" todir="${dist.dir}">
912
            <filterchain>
913
                <replacetokens>
914
                    <token key="VERSION" value="${version.id}"/>
915
                    <token key="DSTAMP" value="${DSTAMP}"/>
888
                    <token key="DSTAMP" value="${DSTAMP}"/>
916
                </replacetokens>
889
                </replacetokens>
917
            </filterchain>
890
            </filterchain>
918
        </copy>
891
        </copy>
919
        <echo>Maven POMs are located in ${dist.dir}</echo>
892
        <echo>Maven POMs are located in ${dist.dir}</echo>
920
        <echo>Use mvn-deploy.sh to deploy the artifacts in the remote repository</echo>
893
        <echo>Use mvn-deploy.sh to deploy the artifacts in the remote repository</echo>
894
        <echo>or mvn-install.sh to install the artifacts in the local repository</echo>
921
    </target>
895
    </target>
922
896
923
    <target name="jar" depends="compile-all, compile-version" description="Creates jar files for distribution">
897
    <target name="jar" depends="compile-all, compile-version" description="Creates jar files for distribution">

Return to bug 51300