Revision 29150

View differences:

tags/tmp_build/build/extension-pom/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
5
                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
6
                      
7
	<modelVersion>4.0.0</modelVersion>
8
	<groupId>org.gvsig</groupId>
9
	<artifactId>gvsig-extension-base-pom</artifactId>
10
	<packaging>pom</packaging>
11
	<version>2.0-SNAPSHOT</version>
12
	<name>extension-base-pom</name>
13
	<parent>
14
		<groupId>org.gvsig</groupId>
15
		<artifactId>gvsig-basepoms</artifactId>
16
		<version>2.0-SNAPSHOT</version>
17
	</parent>
18
	<description> Base POM for all GvSIG extension projects. This pom knows
19
		how to build and made an extension for GvSIG. The property
20
		"gvsig-path" must be set up correctly.</description>
21
	<properties>
22
		<config>config</config>
23
		<plugin-name> ${project.groupId}.${project.artifactId}</plugin-name>
24
		<temporaly-build> ${project.build.directory}/${plugin-name}
25
		</temporaly-build>
26
		<extension-lib-dir> ${extension-dir}/${plugin-name}/lib
27
		</extension-lib-dir>
28
		<build-dir>${basedir}/..</build-dir>
29
		<extension-ant-base-dir> ${build-dir}/extension-pom
30
		</extension-ant-base-dir>
31
		<extension-distribution-file>dist.xml</extension-distribution-file>
32
		<library-dir>lib</library-dir>
33
	</properties>
34
	
35
	<profiles>
36
	
37
		<profile>
38
			<id>install-extension</id>
39
			<activation>
40
				<activeByDefault>true</activeByDefault>
41
				<property>
42
					<name>install-extension</name>
43
				</property>
44
			</activation>
45
			<build>
46
				<plugins>
47
					<plugin>
48
						<artifactId>maven-assembly-plugin
49
						</artifactId>
50
						<configuration>
51
							<descriptors>
52
								<descriptor> ${extension-distribution-file}</descriptor>
53
							</descriptors>
54
							<outputDirectory> ${extension-distribution-output-directory}
55
							</outputDirectory>
56
							<finalName> ${distribution-final-name}</finalName>
57
							<appendAssemblyId>true</appendAssemblyId>
58
							<ignoreDirFormatExtensions> true</ignoreDirFormatExtensions>
59
						</configuration>
60
						<executions>
61
							<execution>
62
								<id>make-assembly</id>
63
								<!--
64
									this is used for inheritance merges
65
								-->
66
								<phase>install</phase>
67
								<!--
68
									append to the packaging phase.
69
								-->
70
								<goals>
71
									<goal>attached</goal><!-- goals == mojos -->
72
								</goals>
73
							</execution>
74
						</executions>
75
					</plugin>
76
					<plugin>
77
						<artifactId>maven-antrun-plugin</artifactId>
78
						<executions>
79
							<execution>
80
								<id>copy-to-andami</id>
81
								<phase>install</phase>
82
								<configuration>
83
									<tasks>
84
										<property name="project.build.directory" value="${project.build.directory}" />
85
										<property name="project.artifactId" value="${project.artifactId}" />
86
										<property name="project.version" value="${project.version}" />
87
										<property name="project.packaging" value="${project.packaging}" />
88
										<property name="temporaly-build" value="${temporaly-build}" />
89
										<property name="plugin-name" value="${plugin-name}" />
90
										<property name="config" value="${config}" />
91
										<property name="extension-dir" value="${extension-dir}" />
92
										<property name="library-dir" value="${library-dir}" />
93
										<property name="distribution-final-name" value="${distribution-final-name}" />
94
										<ant antfile="${extension-ant-base-dir}/build.xml"
95
											inheritRefs="true" />
96
									</tasks>
97
								</configuration>
98
								<goals>
99
									<goal>run</goal>
100
								</goals>
101
							</execution>
102
						</executions>
103
					</plugin>
104
					<plugin>
105
						<artifactId>maven-clean-plugin</artifactId>
106
						<configuration>
107
							<filesets>
108
								<fileset>
109
									<directory>${gvsig-path}/${extension-distribution}</directory>
110
									<includes>
111
										<include>**</include>
112
									</includes>
113
								</fileset>
114
							</filesets>
115
						</configuration>
116
					</plugin>
117
				</plugins>
118
			</build>
119
		</profile>
120
		<profile>
121
			<id>generate-installers</id>
122
			<activation>
123
				<property>
124
					<name>generate-install</name>
125
				</property>
126
			</activation>
127
			<build>
128
				<plugins>
129
					<plugin>
130
						<artifactId>maven-assembly-plugin</artifactId>
131
						<configuration>
132
							<descriptors>
133
								<descriptor>
134
									${distribution-win32-descriptor}
135
								</descriptor>
136
								<descriptor>
137
									${distribution-linux32-descriptor}
138
								</descriptor>
139
								<!-- descriptor>
140
									${distribution-mac-descriptor
141
									</descriptor-->
142
								<!--descriptor>
143
									/distribution/source-distribution.xml
144
									</descriptor-->
145
							</descriptors>
146
							<outputDirectory>
147
								${distribution-output-directory}
148
							</outputDirectory>
149
							<finalName>
150
								${distribution-final-name}
151
							</finalName>
152
							<appendAssemblyId>true</appendAssemblyId>
153
							<ignoreDirFormatExtensions>
154
								true
155
							</ignoreDirFormatExtensions>
156
						</configuration>
157
						<executions>
158
							<execution>
159
								<id>make-assembly</id><!-- this is used for inheritance merges -->
160
								<phase>package</phase><!-- append to the packaging phase. -->
161
								<goals>
162
									<goal>attached</goal><!-- goals == mojos -->
163
								</goals>
164
							</execution>
165
						</executions>
166
					</plugin>
167
				</plugins>
168
			</build>
169
		</profile>
170
	</profiles>
171
</project>
tags/tmp_build/build/extension-pom/build.xml
1
<project name="Complete build system" default="make-extension-new" basedir=".">
2
	<description>
3
	</description>
4
	<condition property="isJar">
5
		<equals arg1="${project.packaging}" arg2="jar" />
6
	</condition>
7

  
8
	<target name="make-extension" if="isJar">
9
		<echo message="======================== Copying to extensions dir..." />
10
		<mkdir dir="${temporaly-build}" />
11
		<mkdir dir="${temporaly-build}/${library-dir}" />
12
		<echo message="librari directory ${temporaly-build}/${library-dir}" />
13

  
14
		<echo message="Copying file ${project.build.directory}/${project.artifactId}-${project.version}.${project.packaging} to ${temporaly-build}/lib/" />
15
		<copy file="${project.build.directory}/${project.artifactId}-${project.version}.${project.packaging}" tofile="${temporaly-build}/${library-dir}/${plugin-name}.${project.packaging}">
16
		</copy>
17

  
18
		<copy todir="${temporaly-build}/images">
19
			<fileset dir="${basedir}/images/" includes="**/**" excludes="**/*.db" />
20
		</copy>
21
		<echo message="Copying config files to ${extension-dir}" />
22
		<copy todir="${temporaly-build}">
23
			<fileset dir="${basedir}/${config}" includes="**/**" />
24
		</copy>
25
		<move todir="${extension-dir}/${plugin-name}/">
26
			<fileset dir="${temporaly-build}" includes="**/**" />
27
		</move>
28
	</target>
29

  
30
	<target name="make-extension-new" if="isJar">
31
		<echo message="======================== New target " />
32
		<echo message="======================== Making Extension " />
33
		<echo message="======================== Copying to extensions dir..." />
34
		<copy todir="${extension-dir}/../../">
35
			<fileset dir="target/${distribution-final-name}-distribution/${distribution-final-name}" includes="**/**" />
36
		</copy>
37
	</target>
38
</project>
tags/tmp_build/build/extension-pom/dist.xml
1
<assembly>
2
	<id>distribution</id>
3
</assembly>
0 4

  
tags/tmp_build/build/libraries-pom/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
5
                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
6

  
7
	<modelVersion>4.0.0</modelVersion>
8
	<groupId>org.gvsig</groupId>
9
	<artifactId>gvsig-library-base-pom</artifactId>
10
	<packaging>pom</packaging>
11
	<version>2.0-SNAPSHOT</version>
12
	<name>library-base-pom</name>
13
	<parent>
14
		<groupId>org.gvsig</groupId>
15
		<artifactId>gvsig-basepoms</artifactId>
16
		<version>2.0-SNAPSHOT</version>
17
	</parent>
18
	<description>
19
		Base POM for all GvSIG libraries projects. This pom knows how to
20
		build and made an libraries for GvSIG. The property
21
		"gvsig-path" must be set up correctly.
22
	</description>
23
	<properties>
24
	<build-dir>${basedir}/..</build-dir>
25
	</properties>
26
	<build>
27
		<plugins>
28
			<plugin>
29
				<artifactId>maven-clean-plugin</artifactId>
30
				<configuration>
31
					<filesets>
32
						<fileset>
33
							<directory>${user.home}/.depman/</directory>
34
							<includes>
35
								<include>**</include>
36
							</includes>
37
						</fileset>
38
					</filesets>
39
					<followSymLinks>true</followSymLinks>
40
				</configuration>
41
			</plugin>
42
		</plugins>
43
	</build>
44
	<modules>
45
		<module>../libraries-jni-pom</module>
46
	</modules>
47
	<profiles>
48
		<profile>
49
			<id>windows-profile</id>
50
			<activation>
51
				<os>
52
					<family>windows</family>
53
				</os>
54
			</activation>
55
			<properties>
56
				<native-platform>win</native-platform>
57
				<native-distribution>nt</native-distribution>
58
				<native-compiler>vs8</native-compiler>
59
				<native-arch>i386</native-arch>
60
				<native-libraryType>dynamic</native-libraryType>
61
				<native-classifier>${native-platform}-${native-distribution}-${native-compiler}-${native-arch}-${native-libraryType}</native-classifier>
62
			</properties>
63
			<build>
64
				<plugins>
65
					<plugin>
66
						<groupId>org.apache.maven.plugins</groupId>
67
						<artifactId>maven-dependency-plugin</artifactId>
68
						<executions>
69
							<execution>
70
								<id>unpack-dependencies</id>
71
								<phase>generate-sources</phase>
72
								<goals>
73
									<goal>unpack-dependencies</goal>
74
								</goals>
75
								<configuration>
76
									<includeTypes>tar.gz</includeTypes>
77
									<outputDirectory>${user.home}/.depman</outputDirectory>
78
									<overWriteReleases>true</overWriteReleases>
79
									<overWriteSnapshots>true</overWriteSnapshots>
80
								</configuration>
81
							</execution>
82
						</executions>
83
					</plugin>
84
				</plugins>
85
			</build>
86
		</profile>
87
		<profile>
88
			<id>linux-profile</id>
89
			<activation>
90
				<os>
91
					<family>linux</family>
92
				</os>
93
			</activation>
94
			<properties>
95
				<native-platform>linux</native-platform>
96
				<native-distribution>Ubuntu-9.04</native-distribution>
97
				<native-compiler>gcc4</native-compiler>
98
				<native-arch>i386</native-arch>
99
				<native-libraryType>dynamic</native-libraryType>
100
				<native-classifier>${native-platform}-${native-distribution}-${native-compiler}-${native-arch}-${native-libraryType}</native-classifier>
101
			</properties>
102
			<build>
103
				<plugins>
104
					<plugin>
105
						<groupId>org.apache.maven.plugins</groupId>
106
						<artifactId>maven-dependency-plugin</artifactId>
107
						<executions>
108
							<execution>
109
								<id>copy-dependencies</id>
110
								<phase>generate-sources</phase>
111
								<goals>
112
									<goal>copy-dependencies</goal>
113
								</goals>
114
								<configuration>
115
									<includeTypes>tar.gz</includeTypes>
116
									<outputDirectory>${project.build.directory}/native_dependencies</outputDirectory>
117
									<overWriteReleases>true</overWriteReleases>
118
									<overWriteSnapshots>true</overWriteSnapshots>
119
									<overWriteIfNewer>true</overWriteIfNewer>
120
								</configuration>
121
							</execution>
122
						</executions>
123
					</plugin>
124
					<plugin>
125
						<groupId>org.codehaus.mojo</groupId>
126
						<artifactId>exec-maven-plugin</artifactId>
127
						<executions>
128
							<execution>
129
								<id>unpack-dependencies</id>
130
								<phase>generate-sources</phase>
131
								<goals>
132
									<goal>exec</goal>
133
								</goals>
134
								<configuration>
135
									<executable>sh</executable>
136
									<arguments>
137
										<argument>${build-dir}/scripts/unpack-dependencies.sh</argument>
138
										<argument>${project.build.directory}/native_dependencies</argument>
139
										<argument>${user.home}/.depman</argument>
140
									</arguments>
141
								</configuration>
142
							</execution>
143
						</executions>
144
					</plugin>
145
				</plugins>
146
			</build>
147
		</profile>
148
		<profile>
149
			<id>mac-profile</id>
150
			<activation>
151
				<os>
152
					<family>mac</family>
153
				</os>
154
			</activation>
155
			<properties>
156
				<native-platform>mac</native-platform>
157
				<native-distribution>10.5</native-distribution>
158
				<native-compiler>gcc4</native-compiler>
159
				<native-arch>universal</native-arch>
160
				<native-libraryType>dynamic</native-libraryType>
161
				<native-classifier>${native-platform}-${native-distribution}-${native-compiler}-${native-arch}-${native-libraryType}</native-classifier>
162
			</properties>
163
			<build>
164
				<plugins>
165
					<plugin>
166
						<groupId>org.apache.maven.plugins</groupId>
167
						<artifactId>maven-dependency-plugin</artifactId>
168
						<executions>
169
							<execution>
170
								<id>copy-dependencies</id>
171
								<phase>generate-sources</phase>
172
								<goals>
173
									<goal>copy-dependencies</goal>
174
								</goals>
175
								<configuration>
176
									<includeTypes>tar.gz</includeTypes>
177
									<outputDirectory>${project.build.directory}/native_dependencies</outputDirectory>
178
									<overWriteReleases>true</overWriteReleases>
179
									<overWriteSnapshots>true</overWriteSnapshots>
180
									<overWriteIfNewer>true</overWriteIfNewer>
181
								</configuration>
182
							</execution>
183
						</executions>
184
					</plugin>
185
					<plugin>
186
						<groupId>org.codehaus.mojo</groupId>
187
						<artifactId>exec-maven-plugin</artifactId>
188
						<executions>
189
							<execution>
190
								<id>unpack-dependencies</id>
191
								<phase>generate-sources</phase>
192
								<goals>
193
									<goal>exec</goal>
194
								</goals>
195
								<configuration>
196
									<executable>sh</executable>
197
									<arguments>
198
										<argument>${build-dir}/scripts/unpack-dependencies.sh</argument>
199
										<argument>${project.build.directory}/native_dependencies</argument>
200
										<argument>${user.home}/.depman</argument>
201
									</arguments>
202
								</configuration>
203
							</execution>
204
						</executions>
205
					</plugin>
206
				</plugins>
207
			</build>
208
		</profile>
209
	</profiles>
210
</project>
0 211

  
tags/tmp_build/build/maven/conf/settings.xml
1
<!--
2
Licensed to the Apache Software Foundation (ASF) under one
3
or more contributor license agreements.  See the NOTICE file
4
distributed with this work for additional information
5
regarding copyright ownership.  The ASF licenses this file
6
to you under the Apache License, Version 2.0 (the
7
"License"); you may not use this file except in compliance
8
with 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,
13
software distributed under the License is distributed on an
14
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
KIND, either express or implied.  See the License for the
16
specific language governing permissions and limitations
17
under the License.
18
-->
19

  
20
<!--
21
 | This is the configuration file for Maven. It can be specified at two levels:
22
 |
23
 |  1. User Level. This settings.xml file provides configuration for a single user, 
24
 |                 and is normally provided in $HOME/.m2/settings.xml.
25
 |
26
 |                 NOTE: This location can be overridden with the system property:
27
 |
28
 |                 -Dorg.apache.maven.user-settings=/path/to/user/settings.xml
29
 |
30
 |  2. Global Level. This settings.xml file provides configuration for all maven
31
 |                 users on a machine (assuming they're all using the same maven
32
 |                 installation). It's normally provided in 
33
 |                 ${maven.home}/conf/settings.xml.
34
 |
35
 |                 NOTE: This location can be overridden with the system property:
36
 |
37
 |                 -Dorg.apache.maven.global-settings=/path/to/global/settings.xml
38
 |
39
 | The sections in this sample file are intended to give you a running start at
40
 | getting the most out of your Maven installation. Where appropriate, the default
41
 | values (values used when the setting is not specified) are provided.
42
 |
43
 |-->
44
<settings xmlns="http://maven.apache.org/settings/1.0.0" 
45
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
46
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
47
  <!-- localRepository
48
   | The path to the local repository maven will use to store artifacts.
49
   |
50
   | Default: ~/.m2/repository
51
  <localRepository>/path/to/local/repo</localRepository>
52
  -->
53

  
54
  <!-- interactiveMode
55
   | This will determine whether maven prompts you when it needs input. If set to false,
56
   | maven will use a sensible default value, perhaps based on some other setting, for
57
   | the parameter in question.
58
   |
59
   | Default: true
60
  <interactiveMode>true</interactiveMode>
61
  -->
62

  
63
  <!-- offline
64
   | Determines whether maven should attempt to connect to the network when executing a build.
65
   | This will have an effect on artifact downloads, artifact deployment, and others.
66
   |
67
   | Default: false
68
  <offline>false</offline>
69
  -->
70

  
71
  <!-- proxies
72
   | This is a list of proxies which can be used on this machine to connect to the network.
73
   | Unless otherwise specified (by system property or command-line switch), the first proxy
74
   | specification in this list marked as active will be used.
75
   |-->
76
  <proxies>
77
    <!-- proxy
78
     | Specification for one proxy, to be used in connecting to the network.
79
     |
80
    <proxy>
81
      <id>optional</id>
82
      <active>true</active>
83
      <protocol>http</protocol>
84
      <username>proxyuser</username>
85
      <password>proxypass</password>
86
      <host>proxy.host.net</host>
87
      <port>80</port>
88
      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
89
    </proxy>
90
    -->
91
  </proxies>
92

  
93
  <!-- servers
94
   | This is a list of authentication profiles, keyed by the server-id used within the system.
95
   | Authentication profiles can be used whenever maven must make a connection to a remote server.
96
   |-->
97
  <servers>
98
    <!-- server
99
     | Specifies the authentication information to use when connecting to a particular server, identified by
100
     | a unique name within the system (referred to by the 'id' attribute below).
101
     | 
102
     | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are 
103
     |       used together.
104
     |
105
    <server>
106
      <id>deploymentRepo</id>
107
      <username>repouser</username>
108
      <password>repopwd</password>
109
    </server>
110
    -->
111
    
112
    <!-- Another sample, using keys to authenticate.
113
    <server>
114
      <id>siteServer</id>
115
      <privateKey>/path/to/private/key</privateKey>
116
      <passphrase>optional; leave empty if not used.</passphrase>
117
    </server>
118
    -->
119
  </servers>
120

  
121
  <!-- mirrors
122
   | This is a list of mirrors to be used in downloading artifacts from remote repositories.
123
   | 
124
   | It works like this: a POM may declare a repository to use in resolving certain artifacts.
125
   | However, this repository may have problems with heavy traffic at times, so people have mirrored
126
   | it to several places.
127
   |
128
   | That repository definition will have a unique id, so we can create a mirror reference for that
129
   | repository, to be used as an alternate download site. The mirror site will be the preferred 
130
   | server for that repository.
131
   |-->
132
  <mirrors>
133
    <!-- mirror
134
     | Specifies a repository mirror site to use instead of a given repository. The repository that
135
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
136
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
137
     |
138
    <mirror>
139
      <id>mirrorId</id>
140
      <mirrorOf>repositoryId</mirrorOf>
141
      <name>Human Readable Name for this Mirror.</name>
142
      <url>http://my.repository.com/repo/path</url>
143
    </mirror>
144
     -->
145
  </mirrors>
146
  
147
  <!-- profiles
148
   | This is a list of profiles which can be activated in a variety of ways, and which can modify
149
   | the build process. Profiles provided in the settings.xml are intended to provide local machine-
150
   | specific paths and repository locations which allow the build to work in the local environment.
151
   |
152
   | For example, if you have an integration testing plugin - like cactus - that needs to know where
153
   | your Tomcat instance is installed, you can provide a variable here such that the variable is 
154
   | dereferenced during the build process to configure the cactus plugin.
155
   |
156
   | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
157
   | section of this document (settings.xml) - will be discussed later. Another way essentially
158
   | relies on the detection of a system property, either matching a particular value for the property,
159
   | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a 
160
   | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
161
   | Finally, the list of active profiles can be specified directly from the command line.
162
   |
163
   | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
164
   |       repositories, plugin repositories, and free-form properties to be used as configuration
165
   |       variables for plugins in the POM.
166
   |
167
   |-->
168
  <profiles>
169
    <!-- profile
170
     | Specifies a set of introductions to the build process, to be activated using one or more of the
171
     | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
172
     | or the command line, profiles have to have an ID that is unique.
173
     |
174
     | An encouraged best practice for profile identification is to use a consistent naming convention
175
     | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
176
     | This will make it more intuitive to understand what the set of introduced profiles is attempting
177
     | to accomplish, particularly when you only have a list of profile id's for debug.
178
     |
179
     | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
180
    <profile>
181
      <id>jdk-1.4</id>
182

  
183
      <activation>
184
        <jdk>1.4</jdk>
185
      </activation>
186

  
187
      <repositories>
188
        <repository>
189
          <id>jdk14</id>
190
          <name>Repository for JDK 1.4 builds</name>
191
          <url>http://www.myhost.com/maven/jdk14</url>
192
          <layout>default</layout>
193
          <snapshotPolicy>always</snapshotPolicy>
194
        </repository>
195
      </repositories>
196
    </profile>
197
    -->
198

  
199
    <!--
200
     | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
201
     | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
202
     | might hypothetically look like:
203
     |
204
     | ...
205
     | <plugin>
206
     |   <groupId>org.myco.myplugins</groupId>
207
     |   <artifactId>myplugin</artifactId>
208
     |   
209
     |   <configuration>
210
     |     <tomcatLocation>${tomcatPath}</tomcatLocation>
211
     |   </configuration>
212
     | </plugin>
213
     | ...
214
     |
215
     | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
216
     |       anything, you could just leave off the <value/> inside the activation-property.
217
     |
218
    <profile>
219
      <id>env-dev</id>
220

  
221
      <activation>
222
        <property>
223
          <name>target-env</name>
224
          <value>dev</value>
225
        </property>
226
      </activation>
227

  
228
      <properties>
229
        <tomcatPath>/path/to/tomcat/instance</tomcatPath>
230
      </properties>
231
    </profile>
232
    -->
233
  </profiles>
234

  
235
  <!-- activeProfiles
236
   | List of profiles that are active for all builds.
237
   |
238
  <activeProfiles>
239
    <activeProfile>alwaysActiveProfile</activeProfile>
240
    <activeProfile>anotherAlwaysActiveProfile</activeProfile>
241
  </activeProfiles>
242
  -->
243
</settings>
tags/tmp_build/build/maven/bin/mvnDebug.bat
1
@REM ----------------------------------------------------------------------------
2
@REM Licensed to the Apache Software Foundation (ASF) under one
3
@REM or more contributor license agreements.  See the NOTICE file
4
@REM distributed with this work for additional information
5
@REM regarding copyright ownership.  The ASF licenses this file
6
@REM to you under the Apache License, Version 2.0 (the
7
@REM "License"); you may not use this file except in compliance
8
@REM with the License.  You may obtain a copy of the License at
9
@REM
10
@REM    http://www.apache.org/licenses/LICENSE-2.0
11
@REM
12
@REM Unless required by applicable law or agreed to in writing,
13
@REM software distributed under the License is distributed on an
14
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
@REM KIND, either express or implied.  See the License for the
16
@REM specific language governing permissions and limitations
17
@REM under the License.
18
@REM ----------------------------------------------------------------------------
19

  
20
@REM ----------------------------------------------------------------------------
21
@REM Maven2 Start Up Batch script
22
@REM
23
@REM Required ENV vars:
24
@REM JAVA_HOME - location of a JDK home dir
25
@REM
26
@REM Optional ENV vars
27
@REM M2_HOME - location of maven2's installed home dir
28
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
29
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
30
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
31
@REM     e.g. to debug Maven itself, use
32
@REM set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
33
@REM ----------------------------------------------------------------------------
34

  
35
set INT_MAVEN_OPTS=%MAVEN_OPTS% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
36
@echo Preparing to Execute Maven in Debug Mode
37

  
38
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
39
@echo off
40
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
41
@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
42

  
43
@REM set %HOME% to equivalent of $HOME
44
if "%HOME%" == "" (set HOME=%HOMEDRIVE%%HOMEPATH%)
45

  
46
@REM Execute a user defined script before this one
47
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
48

  
49
set ERROR_CODE=0
50

  
51
@REM set local scope for the variables with windows NT shell
52
if "%OS%"=="Windows_NT" @setlocal
53
if "%OS%"=="WINNT" @setlocal
54

  
55
@REM ==== START VALIDATION ====
56
if not "%JAVA_HOME%" == "" goto OkJHome
57

  
58
echo.
59
echo ERROR: JAVA_HOME not found in your environment.
60
echo Please set the JAVA_HOME variable in your environment to match the
61
echo location of your Java installation
62
echo.
63
goto error
64

  
65
:OkJHome
66
if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
67

  
68
echo.
69
echo ERROR: JAVA_HOME is set to an invalid directory.
70
echo JAVA_HOME = %JAVA_HOME%
71
echo Please set the JAVA_HOME variable in your environment to match the
72
echo location of your Java installation
73
echo.
74
goto error
75

  
76
:chkMHome
77
if not "%M2_HOME%"=="" goto valMHome
78

  
79
if "%OS%"=="Windows_NT" SET M2_HOME=%~dp0..
80
if "%OS%"=="WINNT" SET M2_HOME=%~dp0..
81
if not "%M2_HOME%"=="" goto valMHome
82

  
83
echo.
84
echo ERROR: M2_HOME not found in your environment.
85
echo Please set the M2_HOME variable in your environment to match the
86
echo location of the Maven installation
87
echo.
88
goto error
89

  
90
:valMHome
91

  
92
:stripMHome
93
if not _%M2_HOME:~-1%==_\ goto checkMBat
94
set M2_HOME=%M2_HOME:~0,-1%
95
goto stripMHome
96

  
97
:checkMBat
98
if exist "%M2_HOME%\bin\mvn.bat" goto init
99

  
100
echo.
101
echo ERROR: M2_HOME is set to an invalid directory.
102
echo M2_HOME = %M2_HOME%
103
echo Please set the M2_HOME variable in your environment to match the
104
echo location of the Maven installation
105
echo.
106
goto error
107
@REM ==== END VALIDATION ====
108

  
109
:init
110
@REM Decide how to startup depending on the version of windows
111

  
112
@REM -- Windows NT with Novell Login
113
if "%OS%"=="WINNT" goto WinNTNovell
114

  
115
@REM -- Win98ME
116
if NOT "%OS%"=="Windows_NT" goto Win9xArg
117

  
118
:WinNTNovell
119

  
120
@REM -- 4NT shell
121
if "%@eval[2+2]" == "4" goto 4NTArgs
122

  
123
@REM -- Regular WinNT shell
124
set MAVEN_CMD_LINE_ARGS=%*
125
goto endInit
126

  
127
@REM The 4NT Shell from jp software
128
:4NTArgs
129
set MAVEN_CMD_LINE_ARGS=%$
130
goto endInit
131

  
132
:Win9xArg
133
@REM Slurp the command line arguments.  This loop allows for an unlimited number
134
@REM of agruments (up to the command line limit, anyway).
135
set MAVEN_CMD_LINE_ARGS=
136
:Win9xApp
137
if %1a==a goto endInit
138
set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% %1
139
shift
140
goto Win9xApp
141

  
142
@REM Reaching here means variables are defined and arguments have been captured
143
:endInit
144
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
145

  
146
@REM -- 4NT shell
147
if "%@eval[2+2]" == "4" goto 4NTCWJars
148

  
149
@REM -- Regular WinNT shell
150
for %%i in ("%M2_HOME%"\boot\classworlds-*) do set CLASSWORLDS_JAR="%%i"
151
goto runm2
152

  
153
@REM The 4NT Shell from jp software
154
:4NTCWJars
155
for %%i in ("%M2_HOME%\boot\classworlds-*") do set CLASSWORLDS_JAR="%%i"
156
goto runm2
157

  
158
@REM Start MAVEN2
159
:runm2
160

  
161
%MAVEN_JAVA_EXE% %INT_MAVEN_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" org.codehaus.classworlds.Launcher %MAVEN_CMD_LINE_ARGS%
162
if ERRORLEVEL 1 goto error
163
goto end
164

  
165
:error
166
if "%OS%"=="Windows_NT" @endlocal
167
if "%OS%"=="WINNT" @endlocal
168
set ERROR_CODE=1
169

  
170
:end
171
@REM set local scope for the variables with windows NT shell
172
if "%OS%"=="Windows_NT" goto endNT
173
if "%OS%"=="WINNT" goto endNT
174

  
175
@REM For old DOS remove the set variables from ENV - we assume they were not set
176
@REM before we started - at least we don't leave any baggage around
177
set MAVEN_JAVA_EXE=
178
set MAVEN_CMD_LINE_ARGS=
179
goto postExec
180

  
181
:endNT
182
@endlocal & set ERROR_CODE=%ERROR_CODE%
183

  
184
:postExec
185
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
186
@REM pause the batch file if MAVEN_BATCH_PAUSE is set to 'on'
187
if "%MAVEN_BATCH_PAUSE%" == "on" pause
188

  
189
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
190

  
191
exit /B %ERROR_CODE%
192

  
tags/tmp_build/build/maven/bin/m2
1
#!/bin/sh
2
# ----------------------------------------------------------------------------
3
# Licensed to the Apache Software Foundation (ASF) under one
4
# or more contributor license agreements.  See the NOTICE file
5
# distributed with this work for additional information
6
# regarding copyright ownership.  The ASF licenses this file
7
# to you under the Apache License, Version 2.0 (the
8
# "License"); you may not use this file except in compliance
9
# with the License.  You may obtain a copy of the License at
10
#
11
#    http://www.apache.org/licenses/LICENSE-2.0
12
#
13
# Unless required by applicable law or agreed to in writing,
14
# software distributed under the License is distributed on an
15
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
# KIND, either express or implied.  See the License for the
17
# specific language governing permissions and limitations
18
# under the License.
19
# ----------------------------------------------------------------------------
20

  
21
echo ""
22
echo THE m2 COMMMAND IS DEPRECATED - PLEASE RUN mvn INSTEAD
23
echo ""
24

  
25
. `dirname "$0"`/mvn
26
exec "`dirname "$0"`/mvn" $QUOTED_ARGS
0 27

  
tags/tmp_build/build/maven/bin/mvn
1
#!/bin/sh
2
# ----------------------------------------------------------------------------
3
# Licensed to the Apache Software Foundation (ASF) under one
4
# or more contributor license agreements.  See the NOTICE file
5
# distributed with this work for additional information
6
# regarding copyright ownership.  The ASF licenses this file
7
# to you under the Apache License, Version 2.0 (the
8
# "License"); you may not use this file except in compliance
9
# with the License.  You may obtain a copy of the License at
10
#
11
#    http://www.apache.org/licenses/LICENSE-2.0
12
#
13
# Unless required by applicable law or agreed to in writing,
14
# software distributed under the License is distributed on an
15
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
# KIND, either express or implied.  See the License for the
17
# specific language governing permissions and limitations
18
# under the License.
19
# ----------------------------------------------------------------------------
20

  
21
# ----------------------------------------------------------------------------
22
# Maven2 Start Up Batch script
23
#
24
# Required ENV vars:
25
# ------------------
26
#   JAVA_HOME - location of a JDK home dir
27
#
28
# Optional ENV vars
29
# -----------------
30
#   M2_HOME - location of maven2's installed home dir
31
#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
32
#     e.g. to debug Maven itself, use
33
#       set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
34
# ----------------------------------------------------------------------------
35

  
36
QUOTED_ARGS=""
37
while [ "$1" != "" ] ; do
38

  
39
  QUOTED_ARGS="$QUOTED_ARGS \"$1\""
40
  shift
41

  
42
done
43

  
44
if [ -f /etc/mavenrc ] ; then
45
  . /etc/mavenrc
46
fi
47

  
48
if [ -f "$HOME/.mavenrc" ] ; then
49
  . "$HOME/.mavenrc"
50
fi
51

  
52
# OS specific support.  $var _must_ be set to either true or false.
53
cygwin=false;
54
darwin=false;
55
mingw=false
56
case "`uname`" in
57
  CYGWIN*) cygwin=true ;;
58
  MINGW*) mingw=true;;
59
  Darwin*) darwin=true 
60
           if [ -z "$JAVA_VERSION" ] ; then
61
             JAVA_VERSION="CurrentJDK"
62
           else
63
             echo "Using Java version: $JAVA_VERSION"
64
           fi
65
           if [ -z "$JAVA_HOME" ] ; then
66
             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
67
           fi
68
           ;;
69
esac
70

  
71
if [ -z "$JAVA_HOME" ] ; then
72
  if [ -r /etc/gentoo-release ] ; then
73
    JAVA_HOME=`java-config --jre-home`
74
  fi
75
fi
76

  
77
if [ -z "$M2_HOME" ] ; then
78
  ## resolve links - $0 may be a link to maven's home
79
  PRG="$0"
80

  
81
  # need this for relative symlinks
82
  while [ -h "$PRG" ] ; do
83
    ls=`ls -ld "$PRG"`
84
    link=`expr "$ls" : '.*-> \(.*\)$'`
85
    if expr "$link" : '/.*' > /dev/null; then
86
      PRG="$link"
87
    else
88
      PRG="`dirname "$PRG"`/$link"
89
    fi
90
  done
91

  
92
  saveddir=`pwd`
93

  
94
  M2_HOME=`dirname "$PRG"`/..
95

  
96
  # make it fully qualified
97
  M2_HOME=`cd "$M2_HOME" && pwd`
98

  
99
  cd "$saveddir"
100
  # echo Using m2 at $M2_HOME
101
fi
102

  
103
# For Cygwin, ensure paths are in UNIX format before anything is touched
104
if $cygwin ; then
105
  [ -n "$M2_HOME" ] &&
106
    M2_HOME=`cygpath --unix "$M2_HOME"`
107
  [ -n "$JAVA_HOME" ] &&
108
    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
109
  [ -n "$CLASSPATH" ] &&
110
    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
111
fi
112

  
113
# For Migwn, ensure paths are in UNIX format before anything is touched
114
if $mingw ; then
115
  [ -n "$M2_HOME" ] &&
116
    M2_HOME="`(cd "$M2_HOME"; pwd)`"
117
  [ -n "$JAVA_HOME" ] &&
118
    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
119
  # TODO classpath?
120
fi
121

  
122
if [ -z "$JAVACMD" ] ; then
123
  if [ -n "$JAVA_HOME"  ] ; then
124
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
125
      # IBM's JDK on AIX uses strange locations for the executables
126
      JAVACMD="$JAVA_HOME/jre/sh/java"
127
    else
128
      JAVACMD="$JAVA_HOME/bin/java"
129
    fi
130
  else
131
    JAVACMD="`which java`"
132
  fi
133
fi
134

  
135
if [ ! -x "$JAVACMD" ] ; then
136
  echo "Error: JAVA_HOME is not defined correctly."
137
  echo "  We cannot execute $JAVACMD"
138
  exit 1
139
fi
140

  
141
if [ -z "$JAVA_HOME" ] ; then
142
  echo "Warning: JAVA_HOME environment variable is not set."
143
fi
144

  
145
CLASSWORLDS_LAUNCHER=org.codehaus.classworlds.Launcher
146

  
147
# For Cygwin, switch paths to Windows format before running java
148
if $cygwin; then
149
  [ -n "$M2_HOME" ] &&
150
    M2_HOME=`cygpath --path --windows "$M2_HOME"`
151
  [ -n "$JAVA_HOME" ] &&
152
    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
153
  [ -n "$HOME" ] &&
154
    HOME=`cygpath --path --windows "$HOME"`
155
fi
156

  
157
exec "$JAVACMD" \
158
  $MAVEN_OPTS \
159
  -classpath "${M2_HOME}"/boot/classworlds-*.jar \
160
  "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
161
  "-Dmaven.home=${M2_HOME}"  \
162
  ${CLASSWORLDS_LAUNCHER} $QUOTED_ARGS
163

  
0 164

  
tags/tmp_build/build/maven/bin/m2.conf
1
main is org.apache.maven.cli.MavenCli from plexus.core
2

  
3
set maven.home default ${user.home}/m2
4

  
5
[plexus.core]
6
load ${maven.home}/lib/*.jar
tags/tmp_build/build/maven/bin/m2.bat
1
@REM ----------------------------------------------------------------------------
2
@REM Licensed to the Apache Software Foundation (ASF) under one
3
@REM or more contributor license agreements.  See the NOTICE file
4
@REM distributed with this work for additional information
5
@REM regarding copyright ownership.  The ASF licenses this file
6
@REM to you under the Apache License, Version 2.0 (the
7
@REM "License"); you may not use this file except in compliance
8
@REM with the License.  You may obtain a copy of the License at
9
@REM
10
@REM    http://www.apache.org/licenses/LICENSE-2.0
11
@REM
12
@REM Unless required by applicable law or agreed to in writing,
13
@REM software distributed under the License is distributed on an
14
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
@REM KIND, either express or implied.  See the License for the
16
@REM specific language governing permissions and limitations
17
@REM under the License.
18
@REM ----------------------------------------------------------------------------
19

  
20
@ECHO OFF
21
echo.
22
echo THE m2 COMMMAND IS DEPRECATED - PLEASE RUN mvn INSTEAD
23
echo.
24

  
25
"%~dp0\mvn" %*
26

  
tags/tmp_build/build/maven/bin/mvn.bat
1
@REM ----------------------------------------------------------------------------
2
@REM Licensed to the Apache Software Foundation (ASF) under one
3
@REM or more contributor license agreements.  See the NOTICE file
4
@REM distributed with this work for additional information
5
@REM regarding copyright ownership.  The ASF licenses this file
6
@REM to you under the Apache License, Version 2.0 (the
7
@REM "License"); you may not use this file except in compliance
8
@REM with the License.  You may obtain a copy of the License at
9
@REM
10
@REM    http://www.apache.org/licenses/LICENSE-2.0
11
@REM
12
@REM Unless required by applicable law or agreed to in writing,
13
@REM software distributed under the License is distributed on an
14
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
@REM KIND, either express or implied.  See the License for the
16
@REM specific language governing permissions and limitations
17
@REM under the License.
18
@REM ----------------------------------------------------------------------------
19

  
20
@REM ----------------------------------------------------------------------------
21
@REM Maven2 Start Up Batch script
22
@REM
23
@REM Required ENV vars:
24
@REM JAVA_HOME - location of a JDK home dir
25
@REM
26
@REM Optional ENV vars
27
@REM M2_HOME - location of maven2's installed home dir
28
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
29
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
30
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
31
@REM     e.g. to debug Maven itself, use
32
@REM set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
33
@REM ----------------------------------------------------------------------------
34

  
35
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
36
@echo off
37
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
38
@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
39

  
40
@REM set %HOME% to equivalent of $HOME
41
if "%HOME%" == "" (set HOME=%HOMEDRIVE%%HOMEPATH%)
42

  
43
@REM Execute a user defined script before this one
44
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
45

  
46
set ERROR_CODE=0
47

  
48
@REM set local scope for the variables with windows NT shell
49
if "%OS%"=="Windows_NT" @setlocal
50
if "%OS%"=="WINNT" @setlocal
51

  
52
@REM ==== START VALIDATION ====
53
if not "%JAVA_HOME%" == "" goto OkJHome
54

  
55
echo.
56
echo ERROR: JAVA_HOME not found in your environment.
57
echo Please set the JAVA_HOME variable in your environment to match the
58
echo location of your Java installation
59
echo.
60
goto error
61

  
62
:OkJHome
63
if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
64

  
65
echo.
66
echo ERROR: JAVA_HOME is set to an invalid directory.
67
echo JAVA_HOME = %JAVA_HOME%
68
echo Please set the JAVA_HOME variable in your environment to match the
69
echo location of your Java installation
70
echo.
71
goto error
72

  
73
:chkMHome
74
if not "%M2_HOME%"=="" goto valMHome
75

  
76
if "%OS%"=="Windows_NT" SET M2_HOME=%~dp0..
77
if "%OS%"=="WINNT" SET M2_HOME=%~dp0..
78
if not "%M2_HOME%"=="" goto valMHome
79

  
80
echo.
81
echo ERROR: M2_HOME not found in your environment.
82
echo Please set the M2_HOME variable in your environment to match the
83
echo location of the Maven installation
84
echo.
85
goto error
86

  
87
:valMHome
88

  
89
:stripMHome
90
if not _%M2_HOME:~-1%==_\ goto checkMBat
91
set M2_HOME=%M2_HOME:~0,-1%
92
goto stripMHome
93

  
94
:checkMBat
95
if exist "%M2_HOME%\bin\mvn.bat" goto init
96

  
97
echo.
98
echo ERROR: M2_HOME is set to an invalid directory.
99
echo M2_HOME = %M2_HOME%
100
echo Please set the M2_HOME variable in your environment to match the
101
echo location of the Maven installation
102
echo.
103
goto error
104
@REM ==== END VALIDATION ====
105

  
106
:init
107
@REM Decide how to startup depending on the version of windows
108

  
109
@REM -- Windows NT with Novell Login
110
if "%OS%"=="WINNT" goto WinNTNovell
111

  
112
@REM -- Win98ME
113
if NOT "%OS%"=="Windows_NT" goto Win9xArg
114

  
115
:WinNTNovell
116

  
117
@REM -- 4NT shell
118
if "%@eval[2+2]" == "4" goto 4NTArgs
119

  
120
@REM -- Regular WinNT shell
121
set MAVEN_CMD_LINE_ARGS=%*
122
goto endInit
123

  
124
@REM The 4NT Shell from jp software
125
:4NTArgs
126
set MAVEN_CMD_LINE_ARGS=%$
127
goto endInit
128

  
129
:Win9xArg
130
@REM Slurp the command line arguments.  This loop allows for an unlimited number
131
@REM of agruments (up to the command line limit, anyway).
132
set MAVEN_CMD_LINE_ARGS=
133
:Win9xApp
134
if %1a==a goto endInit
135
set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% %1
136
shift
137
goto Win9xApp
138

  
139
@REM Reaching here means variables are defined and arguments have been captured
140
:endInit
141
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
142

  
143
@REM -- 4NT shell
144
if "%@eval[2+2]" == "4" goto 4NTCWJars
145

  
146
@REM -- Regular WinNT shell
147
for %%i in ("%M2_HOME%"\boot\classworlds-*) do set CLASSWORLDS_JAR="%%i"
148
goto runm2
149

  
150
@REM The 4NT Shell from jp software
151
:4NTCWJars
152
for %%i in ("%M2_HOME%\boot\classworlds-*") do set CLASSWORLDS_JAR="%%i"
153
goto runm2
154

  
155
@REM Start MAVEN2
156
:runm2
157
%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" org.codehaus.classworlds.Launcher %MAVEN_CMD_LINE_ARGS%
158
if ERRORLEVEL 1 goto error
159
goto end
160

  
161
:error
162
if "%OS%"=="Windows_NT" @endlocal
163
if "%OS%"=="WINNT" @endlocal
164
set ERROR_CODE=1
165

  
166
:end
167
@REM set local scope for the variables with windows NT shell
168
if "%OS%"=="Windows_NT" goto endNT
169
if "%OS%"=="WINNT" goto endNT
170

  
171
@REM For old DOS remove the set variables from ENV - we assume they were not set
172
@REM before we started - at least we don't leave any baggage around
173
set MAVEN_JAVA_EXE=
174
set MAVEN_CMD_LINE_ARGS=
175
goto postExec
176

  
177
:endNT
178
@endlocal & set ERROR_CODE=%ERROR_CODE%
179

  
180
:postExec
181
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
182
@REM pause the batch file if MAVEN_BATCH_PAUSE is set to 'on'
183
if "%MAVEN_BATCH_PAUSE%" == "on" pause
184

  
185
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
186

  
187
cmd /C exit /B %ERROR_CODE%
188

  
tags/tmp_build/build/maven/bin/mvnDebug
1
#!/bin/sh
2
# ----------------------------------------------------------------------------
3
# Licensed to the Apache Software Foundation (ASF) under one
4
# or more contributor license agreements.  See the NOTICE file
5
# distributed with this work for additional information
6
# regarding copyright ownership.  The ASF licenses this file
7
# to you under the Apache License, Version 2.0 (the
8
# "License"); you may not use this file except in compliance
9
# with the License.  You may obtain a copy of the License at
10
#
11
#    http://www.apache.org/licenses/LICENSE-2.0
12
#
13
# Unless required by applicable law or agreed to in writing,
14
# software distributed under the License is distributed on an
15
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
# KIND, either express or implied.  See the License for the
17
# specific language governing permissions and limitations
18
# under the License.
19
# ----------------------------------------------------------------------------
20

  
21
# ----------------------------------------------------------------------------
22
# Maven2 Start Up Batch script
23
#
24
# Required ENV vars:
25
# ------------------
26
#   JAVA_HOME - location of a JDK home dir
27
#
28
# Optional ENV vars
29
# -----------------
30
#   M2_HOME - location of maven2's installed home dir
31
#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
32
#     e.g. to debug Maven itself, use
33
#       set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
34
# ----------------------------------------------------------------------------
35

  
36
INT_MAVEN_OPTS="$MAVEN_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
37

  
38
echo Preparing to Execute Maven in Debug Mode
39

  
40
QUOTED_ARGS=""
41
while [ "$1" != "" ] ; do
42

  
43
  QUOTED_ARGS="$QUOTED_ARGS \"$1\""
44
  shift
45

  
46
done
47

  
48
if [ -f /etc/mavenrc ] ; then
49
  . /etc/mavenrc
50
fi
51

  
52
if [ -f "$HOME/.mavenrc" ] ; then
53
  . "$HOME/.mavenrc"
54
fi
55

  
56
# OS specific support.  $var _must_ be set to either true or false.
57
cygwin=false;
58
darwin=false;
59
mingw=false
60
case "`uname`" in
61
  CYGWIN*) cygwin=true ;;
62
  MINGW*) mingw=true;;
63
  Darwin*) darwin=true 
64
           if [ -z "$JAVA_VERSION" ] ; then
65
             JAVA_VERSION="CurrentJDK"
66
           else
67
             echo "Using Java version: $JAVA_VERSION"
68
           fi
69
           if [ -z "$JAVA_HOME" ] ; then
70
             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
71
           fi
72
           ;;
73
esac
74

  
75
if [ -z "$JAVA_HOME" ] ; then
76
  if [ -r /etc/gentoo-release ] ; then
77
    JAVA_HOME=`java-config --jre-home`
78
  fi
79
fi
80

  
81
if [ -z "$M2_HOME" ] ; then
82
  ## resolve links - $0 may be a link to maven's home
83
  PRG="$0"
84

  
85
  # need this for relative symlinks
86
  while [ -h "$PRG" ] ; do
87
    ls=`ls -ld "$PRG"`
88
    link=`expr "$ls" : '.*-> \(.*\)$'`
89
    if expr "$link" : '/.*' > /dev/null; then
90
      PRG="$link"
91
    else
92
      PRG="`dirname "$PRG"`/$link"
93
    fi
94
  done
95

  
96
  saveddir=`pwd`
97

  
98
  M2_HOME=`dirname "$PRG"`/..
99

  
100
  # make it fully qualified
101
  M2_HOME=`cd "$M2_HOME" && pwd`
102

  
103
  cd "$saveddir"
104
  # echo Using m2 at $M2_HOME
105
fi
106

  
107
# For Cygwin, ensure paths are in UNIX format before anything is touched
108
if $cygwin ; then
109
  [ -n "$M2_HOME" ] &&
110
    M2_HOME=`cygpath --unix "$M2_HOME"`
111
  [ -n "$JAVA_HOME" ] &&
112
    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
113
  [ -n "$CLASSPATH" ] &&
114
    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
115
fi
116

  
117
# For Migwn, ensure paths are in UNIX format before anything is touched
118
if $mingw ; then
119
  [ -n "$M2_HOME" ] &&
120
    M2_HOME="`(cd "$M2_HOME"; pwd)`"
121
  [ -n "$JAVA_HOME" ] &&
122
    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
123
  # TODO classpath?
124
fi
125

  
126
if [ -z "$JAVACMD" ] ; then
127
  if [ -n "$JAVA_HOME"  ] ; then
128
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
129
      # IBM's JDK on AIX uses strange locations for the executables
130
      JAVACMD="$JAVA_HOME/jre/sh/java"
131
    else
132
      JAVACMD="$JAVA_HOME/bin/java"
133
    fi
134
  else
135
    JAVACMD=java
136
  fi
137
fi
138

  
139
if [ ! -x "$JAVACMD" ] ; then
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff