File: mmg.bat

package info (click to toggle)
openjpa 2.4.2-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 42,496 kB
  • sloc: java: 428,979; xml: 61,124; sql: 1,610; jsp: 691; javascript: 676; python: 160; sh: 11; makefile: 2
file content (66 lines) | stat: -rw-r--r-- 3,009 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
@rem
@rem Licensed to the Apache Software Foundation (ASF) under one
@rem or more contributor license agreements.  See the NOTICE file
@rem distributed with this work for additional information
@rem regarding copyright ownership.  The ASF licenses this file
@rem to you under the Apache License, Version 2.0 (the
@rem "License"); you may not use this file except in compliance
@rem with the License.  You may obtain a copy of the License at
@rem
@rem  http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing,
@rem software distributed under the License is distributed on an
@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@rem KIND, either express or implied.  See the License for the
@rem specific language governing permissions and limitations
@rem under the License.
@rem

@rem ---------------------------------------------------------------------------
@rem Example Batch script to generate canonical meta-model classes
@rem
@rem Usage
@rem   $ mmg.bat <class.list>
@rem 
@rem The canonical meta-model classes can be generated during compilation of
@rem domain classes. This batch file compiles a set of classes (X.java) listed 
@rem in <class.list> file. The compiler discoveres the annotation
@rem processor if openjpa classes are in classpath. The discovered annotation
@rem processor, however, is active only if -Aopenjpa.metamodel=true is set.  
@rem 
@rem See also 
@rem    domain-class.list : The domain classes to be compiled
@rem ---------------------------------------------------------------------------
@echo off
setlocal
set JAVAC=%JAVA_HOME%\bin\javac

@rem ---------------------------------------------------------------------------
@rem Compiler classpath shown for a typical OpenJPA development environment in Windows. 
@rem The essential aspect is openjpa libraries must be in the compiler's classpath.
set M_REPO="%USERPROFILE%\.m2\repository"
set SPEC=geronimo-jpa_2.0_spec
set VERSION=1.0-EA9-SNAPSHOT
set JPA_LIB=%M_REPO%\org\apache\geronimo\specs\%SPEC%\%VERSION%\%SPEC%-%VERSION%.jar

set CLASSPATH=%JPA_LIB%
set CLASSPATH=%CLASSPATH%;%~dp0\..\openjpa\src\main\resources
set CLASSPATH=%CLASSPATH%;%~dp0\..\openjpa-persistence\target\classes
set CLASSPATH=%CLASSPATH%;%~dp0\..\openjpa-persistence\src\main\resources
set CLASSPATH=%CLASSPATH%;%~dp0\..\openjpa-kernel\target\classes
set CLASSPATH=%CLASSPATH%;%~dp0\..\openjpa-lib\target\classes

@rem ---------------------------------------------------------------------------
echo Using Java Compiler %JAVAC%
%JAVAC% -version

@rem ---------------------------------------------------------------------------
@rem Root directory for of the generated source files. Specified as -s option 
set GEN_DIR=%~dp0\..\openjpa-persistence-jdbc\src\test\java

@rem Only one option is shown for logging. Other available options are documented in
@rem OpenJPA User Manual and JavaDoc
%JAVAC% -cp %CLASSPATH% -s %GEN_DIR% -Aopenjpa.metamodel=true -Aopenjpa.log=TRACE @%1

endlocal