Skip to content

Commit c059e17

Browse files
committed
mybatis-migrations repackaged using the appassembler plugin with generated shell/cmd scripts,updated migrations user manual
1 parent ad6012a commit c059e17

File tree

7 files changed

+81
-31
lines changed

7 files changed

+81
-31
lines changed

MIGRATIONS-README

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Install MyBatis Migrations
2+
3+
MyBatis Migrations is a Java tool, so you must have Java installed in order to proceed. Users need at least the
4+
Java Runtime Environment (JRE), the Java Development Kit (JDK) is a plus.
5+
6+
Additional optional installation steps are listed after the platform specific instructions.
7+
8+
* Windows 2000/XP
9+
10+
[1] Unzip the distribution archive, i.e. mybatis-${project.version}-migrations.zip to the directory you wish
11+
to install MyBatis Migrations.
12+
These instructions assume you chose C:\Program Files\mybatis.
13+
The subdirectory mybatis-migrations-${project.version} will be created from the archive.
14+
15+
[2] Add the MIGRATIONS_HOME environment variable by opening up the system properties (WinKey + Pause), selecting the
16+
Advanced tab, and the Environment Variables button, then adding the MIGRATIONS_HOME variable in the user
17+
variables with the value C:\Program Files\mybatis\mybatis-migrations-${project.version}.
18+
Be sure to omit any quotation marks around the path even if it contains spaces.
19+
20+
[3] In the same dialog, add the MIGRATIONS environment variable in the user variables with the
21+
value %MIGRATIONS_HOME%\bin.
22+
23+
[4] In the same dialog, update/create the Path environment variable in the user variables and prepend the value
24+
%MIGRATIONS% to add MyBatis Migrations available in the command line.
25+
26+
* Unix-based Operating Systems (Linux, Solaris and Mac OS X)
27+
28+
[1] Extract the distribution archive, i.e. mybatis-${project.version}-migrations.zip to the directory you wish to
29+
install MyBatis Migrations. These instructions assume you chose
30+
/usr/local/mybatis/mybatis-migrations-${project.version}.
31+
The subdirectory mybatis-migrations-${project.version} will be created from the archive.
32+
33+
[2] In a command terminal, add the MIGRATIONS_HOME environment variable,
34+
e.g. export MIGRATIONS_HOME=/usr/local/mybatis/mybatis-migrations-${project.version}.
35+
36+
[3] Add the MIGRATIONS environment variable, e.g. export MIGRATIONS=$MIGRATIONS_HOME/bin.
37+
38+
[4] Add MIGRATIONS environment variable to your path, e.g. export PATH=$MIGRATIONS:$PATH.

doc/en/MyBatis-3-Migrations.doc

-208 KB
Binary file not shown.

doc/en/MyBatis-3-Migrations.pdf

11.5 KB
Binary file not shown.

pom.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,33 @@
6363
</reporting>
6464
<build>
6565
<plugins>
66+
<plugin>
67+
<groupId>org.codehaus.mojo</groupId>
68+
<artifactId>appassembler-maven-plugin</artifactId>
69+
<version>1.1.1</version>
70+
<executions>
71+
<execution>
72+
<phase>package</phase>
73+
<goals>
74+
<goal>assemble</goal>
75+
</goals>
76+
</execution>
77+
</executions>
78+
<configuration>
79+
<repositoryLayout>flat</repositoryLayout>
80+
<repositoryName>lib</repositoryName>
81+
<extraJvmArguments>-Xms500m -Xmx500m -XX:PermSize=128m -XX:-UseGCOverheadLimit</extraJvmArguments>
82+
<binFileExtensions>
83+
<windows>.cmd</windows>
84+
</binFileExtensions>
85+
<programs>
86+
<program>
87+
<mainClass>org.apache.ibatis.migration.Migrator</mainClass>
88+
<name>migrate</name>
89+
</program>
90+
</programs>
91+
</configuration>
92+
</plugin>
6693
<plugin>
6794
<groupId>org.apache.maven.plugins</groupId>
6895
<artifactId>maven-assembly-plugin</artifactId>

src/main/assembly/migrations.xml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,37 @@
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
44
<id>migrations</id>
5-
<baseDirectory>ibatis-migrations-${project.version}</baseDirectory>
5+
<baseDirectory>mybatis-migrations-${project.version}</baseDirectory>
66
<formats>
77
<format>zip</format>
88
</formats>
99
<files>
1010
<file>
1111
<source>${project.build.directory}/${project.artifactId}-${project.version}.${project.packaging}</source>
12-
<outputDirectory>lib</outputDirectory>
12+
<outputDirectory>/lib</outputDirectory>
1313
</file>
1414
<file>
1515
<source>LICENSE</source>
1616
</file>
1717
<file>
1818
<source>NOTICE</source>
1919
</file>
20+
<file>
21+
<source>doc/en/MyBatis-3-Migrations.pdf</source>
22+
</file>
23+
<file>
24+
<source>MIGRATIONS-README</source>
25+
<filtered>true</filtered>
26+
</file>
2027
</files>
2128
<fileSets>
29+
<!--
30+
| shell scripts are generated
31+
-->
2232
<fileSet>
23-
<directory>src/main/scripts</directory>
24-
<outputDirectory></outputDirectory>
33+
<directory>${project.build.directory}/appassembler/bin/</directory>
34+
<outputDirectory>/bin</outputDirectory>
35+
<fileMode>755</fileMode>
2536
</fileSet>
2637
</fileSets>
27-
</assembly>
38+
</assembly>

src/main/scripts/migrate

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/main/scripts/migrate.cmd

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)