Skip to content

Commit db172b6

Browse files
authored
Merge pull request #944 from jeffgbutler/maven-eclipse-support
Add Eclipse lifecycle mapping for our Maven Plugin
2 parents 53c1801 + c02bf90 commit db172b6

File tree

8 files changed

+101
-8
lines changed

8 files changed

+101
-8
lines changed

core/mybatis-generator-core/src/site/xhtml/whatsNew.xhtml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
recommended for JDK 9+. If you prefer to use the "javax" annotations, there is a new property on the
3434
<commentGenerator> element that will override this behavior.
3535
</li>
36+
<li>The Maven plugin now includes an integration with Eclipse Maven support. If you import a Maven project with the
37+
generator configured into an Eclipse workspace, the code generator will run automatically.
38+
</li>
3639
</ul>
3740

3841

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Copyright 2006-2023 the original author or authors.
5+
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
https://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+
-->
19+
<lifecycleMappingMetadata>
20+
<pluginExecutions>
21+
<pluginExecution>
22+
<pluginExecutionFilter>
23+
<goals>
24+
<goal>generate</goal>
25+
</goals>
26+
</pluginExecutionFilter>
27+
<action>
28+
<execute>
29+
<runOnIncremental>false</runOnIncremental>
30+
<runOnConfiguration>true</runOnConfiguration>
31+
</execute>
32+
</action>
33+
</pluginExecution>
34+
</pluginExecutions>
35+
</lifecycleMappingMetadata>

eclipse/org.mybatis.generator.eclipse.doc/html-src/eclipseui/buildingFromSource.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ <h2>Eclipse Workspace Setup</h2>
158158
<li>Press "Finish", wait for the workspace to build.</li>
159159
</ol>
160160
</li>
161-
<li>The project includes an Eclipse target platform definition file. The purpose is to set the minimum version
161+
<li>The project includes Eclipse target platform definition files. The purpose is to set the minimum version
162162
of Eclipse supported by the feature and to ensure that you do not inadvertently use Eclipse features from later
163-
versions. The file is <code>releng/target-platform-definition.target</code>. To activate
164-
the target platform, open the file and click on the link that says "Set as active target platform". This action
165-
may take a few minutes to complete.
163+
versions. Target platform files are in the <code>releng</code> project. To activate
164+
the target platform, open the proper target file and click on the link that says "Set as active target platform". This action
165+
may take a few minutes to complete. The README in the releng project contains information about which target platform file to use.
166166
</li>
167167
<li>You will likely have workspace errors due to missing source code in the
168168
<code>org.mybatis.generator.core</code> project. There are two ways to solve this:
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<?pde version="3.8"?>
3-
<target includeMode="feature" name="java11Support">
3+
<target includeMode="feature" name="2018-12">
44
<locations>
5-
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
5+
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="false" type="InstallableUnit">
66
<repository location="http://download.eclipse.org/releases/2018-12"/>
77
<unit id="org.eclipse.jdt.feature.group" version="3.16.0.v20181206-1038"/>
88
<unit id="org.eclipse.wst.xml_ui.feature.feature.group" version="3.12.0.v201811192212"/>
99
<unit id="org.eclipse.platform.feature.group" version="4.10.0.v20181206-0815"/>
10-
<unit id="org.eclipse.pde.feature.group" version="3.13.300.v20181206-0815"/>
10+
<unit id="org.eclipse.m2e.feature.feature.group" version="1.10.0.20181127-2120"/>
1111
</location>
1212
</locations>
1313
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
14-
</target>
14+
</target>

eclipse/releng/2019-12.target

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<?pde version="3.8"?>
3+
<target includeMode="feature" name="2019-12">
4+
<locations>
5+
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="false" type="InstallableUnit">
6+
<repository location="http://download.eclipse.org/releases/2019-12"/>
7+
<unit id="org.eclipse.jdt.feature.group" version="3.18.200.v20191210-0610"/>
8+
<unit id="org.eclipse.wst.xml_ui.feature.feature.group" version="3.16.0.v201911262138"/>
9+
<unit id="org.eclipse.platform.feature.group" version="4.14.0.v20191210-0610"/>
10+
<unit id="org.eclipse.m2e.feature.feature.group" version="1.14.0.20191209-1925"/>
11+
</location>
12+
</locations>
13+
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
14+
</target>

eclipse/releng/2021-06.target

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<?pde version="3.8"?>
3+
<target includeMode="feature" name="2021-06">
4+
<locations>
5+
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="false" type="InstallableUnit">
6+
<repository location="http://download.eclipse.org/releases/2021-06/"/>
7+
<unit id="org.eclipse.jdt.feature.group" version="3.18.800.v20210611-1600"/>
8+
<unit id="org.eclipse.wst.xml_ui.feature.feature.group" version="3.22.0.v202103232331"/>
9+
<unit id="org.eclipse.platform.feature.group" version="4.20.0.v20210611-1600"/>
10+
<unit id="org.eclipse.m2e.feature.feature.group" version="1.18.0.20210603-1206"/>
11+
</location>
12+
</locations>
13+
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
14+
</target>

eclipse/releng/2021-12.target

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<?pde version="3.8"?>
3+
<target includeMode="feature" name="2021-12">
4+
<locations>
5+
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="false" type="InstallableUnit">
6+
<repository location="http://download.eclipse.org/releases/2021-12/"/>
7+
<unit id="org.eclipse.jdt.feature.group" version="3.18.1000.v20211124-1800"/>
8+
<unit id="org.eclipse.wst.xml_ui.feature.feature.group" version="3.24.0.v202111190506"/>
9+
<unit id="org.eclipse.platform.feature.group" version="4.22.0.v20211124-1800"/>
10+
<unit id="org.eclipse.m2e.feature.feature.group" version="1.19.0.20211116-0804"/>
11+
</location>
12+
</locations>
13+
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
14+
</target>

eclipse/releng/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Release Engineering Support
2+
3+
This project includes target platform definition files for Eclipse to support running and debugging
4+
the feature and plugins in Eclipse. These files are used to make sure we maintain backwards compatibility.
5+
6+
| Target File | Our Plugin Version | Notes |
7+
|-------------|--------------------|--------------------------------------------------------|
8+
| 2018-12 | 1.4.1 | First Eclipse version that supports Java 11 in the AST |
9+
| 2019-12 | 1.4.2? | Normally we would use this version for 1.4.2, but it won't support M1 if we do |
10+
| 2021-06 | 1.4.2? | First Eclipse version that supports M1 Mac |
11+
| 2021-12 | 1.4.2? | First Eclipse version that supports Java 17 in the AST |
12+
13+
Find p2 Repository sites for the various releases here: https://wiki.eclipse.org/Simultaneous_Release

0 commit comments

Comments
 (0)