Revision 75

View differences:

org.gvsig.maven.base/trunk/org.gvsig.maven.base/org.gvsig.maven.base.pom/pom.xml
744 744
					<family>windows</family>
745 745
				</os>
746 746
			</activation>
747
			<properties>
748
				<native-platform>win</native-platform>
749
				<native-distribution>nt</native-distribution>
750
				<native-compiler>vs8</native-compiler>
751
				<native-arch>i386</native-arch>
752
				<native-libraryType>dynamic</native-libraryType>
753
				<native-classifier>${native-platform}-${native-distribution}-${native-compiler}-${native-arch}-${native-libraryType}</native-classifier>
754
			</properties>
755 747
			<build>
756 748
				<plugins>
757 749
					<plugin>
......
783 775
					<family>linux</family>
784 776
				</os>
785 777
			</activation>
786
			<properties>
787
				<native-platform>linux</native-platform>
788
				<native-distribution>Ubuntu-9.10</native-distribution>
789
				<native-compiler>gcc4</native-compiler>
790
				<native-arch>i386</native-arch>
791
				<native-libraryType>dynamic</native-libraryType>
792
				<native-classifier>${native-platform}-${native-distribution}-${native-compiler}-${native-arch}-${native-libraryType}</native-classifier>
793
			</properties>
794 778
			<build>
795 779
				<plugins>
796 780
					<plugin>
......
844 828
					<family>mac</family>
845 829
				</os>
846 830
			</activation>
847
			<properties>
848
				<native-platform>mac</native-platform>
849
				<native-distribution>10.5</native-distribution>
850
				<native-compiler>gcc4</native-compiler>
851
				<native-arch>universal</native-arch>
852
				<native-libraryType>dynamic</native-libraryType>
853
				<native-classifier>${native-platform}-${native-distribution}-${native-compiler}-${native-arch}-${native-libraryType}</native-classifier>
854
			</properties>
855 831
			<build>
856 832
				<plugins>
857 833
					<plugin>
org.gvsig.maven.base/trunk/org.gvsig.maven.base/org.gvsig.maven.base.build/src/main/resources/org.gvsig.maven.base.build/ant-tasks-config.xml
57 57
		<echo>ant.libs.dir = ${ant.libs.dir}</echo>
58 58
		<property name="path.properties.shown" value="true" />
59 59
	</target>
60
	
61
	
62
	<target name="gvsig.platform" description="hola">
63
	
64
		<property file="${user.home}/.gvsig.platform.properties"></property>
65
		
66
		<echo>Native dist: ${native-distribution}</echo>
67
	</target>
60 68

  
61 69
	<!-- Maven targets -->
62 70
	<macrodef name="maven">
63 71
		<attribute name="arg" />
64 72
		<sequential>
65
			<echo>mvn @{arg}</echo>
66
			<artifact:mvn mavenHome="${build.folder}/maven" fork="true" 
73
		    <condition property="gvsig.platform.exists">
74
	            <available file="${user.home}/.gvsig.platform.properties"/>
75
		    </condition>
76

  
77
			<fail unless="gvsig.platform.exists">
78
ERROR!!
79
		
80
You have to define your gvSIG platform properties, 
81
by creating the file: ${user.home}/.gvsig.platform.properties
82
with the following content:
83
	
84
	native_platform=linux
85
	native_distribution=Ubuntu-9.10
86
	native_compiler=gcc4
87
	native_arch=i386
88
	native_libraryType=dynamic
89
	export native_classifier=${native_platform}-${native_distribution}-${native_compiler}-${native_arch}-${native_libraryType}
90

  
91
Replace the fifth initial variables values with the ones appropiate 
92
to your platform.
93
		
94
If you use maven in the command line, you can use the previous file also
95
to define the MAVEN_OPTS environment variable, by adding to your 
96
.bash_rc file something like this:
97

  
98
	if [ -f "${HOME}/.gvsig.platform.properties" ]
99
	then
100
	    . ${HOME}/.gvsig.platform.properties
101
	    export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m -Dnative-classifier=${native_classifier}"
102
	else
103
	    export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m"
104
	fi
105
	
106
It will work if you use the bash shell. In any other case or platform, you'll
107
have to define your MAVEN_OPTS environment variable and set the 
108
"native-classifier" parameter directly.
109
			</fail>
110
			
111
		    <loadproperties srcFile="${user.home}/.gvsig.platform.properties">
112
		      <filterchain>
113
		        <linecontains>
114
		          <contains value="native_"/>
115
		        </linecontains>
116
		      </filterchain>
117
		    </loadproperties>
118
			<property name="native_classifier" value="${native_platform}-${native_distribution}-${native_compiler}-${native_arch}-${native_libraryType}"/>
119
			<echo>mvn -Dnative-classifier=${native_classifier} @{arg}</echo>
120
			<artifact:mvn mavenHome="${build.folder}/maven" fork="true"
67 121
				failonerror="true" maxmemory="256M">
68
				<arg line="@{arg}" />
122
				<arg line="-Dnative-classifier=${native_classifier} @{arg}" />
69 123
				<jvmarg value="-XX:MaxPermSize=64M" />
70 124
			</artifact:mvn>
71 125
		</sequential>
72 126
	</macrodef>
73

  
127
	
74 128
	<macrodef name="readpom">
75 129
		<sequential>
76 130
			<artifact:pom id="mypom" file="pom.xml">

Also available in: Unified diff