Skip to content

Commit 3cfd934

Browse files
committed
Update documentation for the new resources configuration
1 parent 45ca8c4 commit 3cfd934

35 files changed

+126
-211
lines changed

docs-source/book/ide-setup/eclipse.md

Lines changed: 39 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -11,59 +11,54 @@ To install, just drag and drop the following button on your Eclipse window:
1111

1212
## ✅ Make Eclipse find your Templates
1313

14-
Eclipse will filter your template files in `src/main/java` (which will throw an error that your templates cannot be found).
14+
Because of the `resources` block in the `pom.xml`, Eclipse automatically adds a rule to ignore files in `src/main/java`.
15+
This will throw an error that your templates cannot be found.
1516

16-
To fix this, right click on your project then select: `Properties > Maven`.
17-
In `Active Maven profiles` add `!vue-gwt-resources`.
17+
To fix this, the easiest way is placing the `resources` block from your pom.xml in a profile that will only be enabled when not in Eclipse.
1818

19-
![Setting Maven Profile for Eclipse](https://axellience.github.io/vue-gwt/resources/images/eclipse-set-maven-profile.png)
19+
So remove this block that you added in the project setup:
20+
```xml
21+
<resources>
22+
<resource>
23+
<directory>src/main/java</directory>
24+
</resource>
25+
</resources>
26+
```
27+
28+
And add this block instead:
29+
30+
```xml
31+
<profiles>
32+
<profile>
33+
<id>vue-gwt-resources</id>
34+
<activation>
35+
<property>
36+
<name>!m2e.version</name>
37+
</property>
38+
</activation>
39+
<build>
40+
<resources>
41+
<resource>
42+
<directory>src/main/java</directory>
43+
</resource>
44+
</resources>
45+
</build>
46+
</profile>
47+
</profiles>
48+
```
49+
50+
<p class="warning-panel">
51+
Adding this profile will disable your default Maven profiles if you have any.
52+
So you will have to add -PmyDefaultProfile when compiling in command line.
53+
<p>
2054

2155
## ✅ Annotation Processing
2256

2357
We then need to enable Annotation Processing on Eclipse.
2458
First install the `m2e-apt` plugin:
2559
[https://marketplace.eclipse.org/content/m2e-apt](https://marketplace.eclipse.org/content/m2e-apt).
26-
27-
Then you need to add the following to your `pom.xml`:
28-
29-
```xml
30-
<pluginManagement>
31-
<plugins>
32-
<plugin>
33-
<groupId>org.eclipse.m2e</groupId>
34-
<artifactId>lifecycle-mapping</artifactId>
35-
<version>1.0.0</version>
36-
<configuration>
37-
<lifecycleMappingMetadata>
38-
<pluginExecutions>
39-
<pluginExecution>
40-
<pluginExecutionFilter>
41-
<groupId>
42-
org.codehaus.mojo
43-
</groupId>
44-
<artifactId>
45-
gwt-maven-plugin
46-
</artifactId>
47-
<versionRange>
48-
[2.7.0,)
49-
</versionRange>
50-
<goals>
51-
<goal>compile</goal>
52-
</goals>
53-
</pluginExecutionFilter>
54-
<action>
55-
<ignore></ignore>
56-
</action>
57-
</pluginExecution>
58-
</pluginExecutions>
59-
</lifecycleMappingMetadata>
60-
</configuration>
61-
</plugin>
62-
</plugins>
63-
</pluginManagement>
64-
```
6560

66-
Once this is done, you need to enable annotation processing for your project in the `m2e-apt` project settings:
61+
Then you need to enable annotation processing for your project in the `m2e-apt` project settings:
6762

6863
![Enabling Annotation processing in Eclipse](https://axellience.github.io/vue-gwt/resources/images/eclipse-enable-annotation-processing.png)
6964

docs-source/book/project-setup.md

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,27 +56,16 @@ First, in the `plugins` section of your Maven `pom.xml` add the following `plugi
5656
</project>
5757
```
5858

59-
Then add this profile, this is to expose templates to the annotation processor:
59+
Then add this to expose templates to the annotation processor:
6060

6161
```xml
62-
<profiles>
63-
<profile>
64-
<id>vue-gwt-resources</id>
65-
<activation>
66-
<activeByDefault>true</activeByDefault>
67-
</activation>
68-
<build>
69-
<resources>
70-
<resource>
71-
<directory>src/main/java</directory>
72-
<includes>
73-
<include>**/*.html</include>
74-
</includes>
75-
</resource>
76-
</resources>
77-
</build>
78-
</profile>
79-
</profiles>
62+
<build>
63+
<resources>
64+
<resource>
65+
<directory>src/main/java</directory>
66+
</resource>
67+
</resources>
68+
</build>
8069
```
8170

8271
## ✅ Configure `JsInterop`
-81.9 KB
Binary file not shown.

docs-source/examples/pom.xml

Lines changed: 5 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,9 @@
7171
</repositories>
7272

7373
<build>
74-
<!-- Output classes directly into the webapp, so that IDEs and "mvn process-classes" update them in DevMode -->
75-
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes
76-
</outputDirectory>
74+
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
7775

7876
<plugins>
79-
80-
<!-- Mojo's Maven Plugin for GWT -->
8177
<plugin>
8278
<groupId>org.codehaus.mojo</groupId>
8379
<artifactId>gwt-maven-plugin</artifactId>
@@ -90,8 +86,6 @@
9086
</goals>
9187
</execution>
9288
</executions>
93-
<!-- Plugin configuration. There are many available options, see
94-
gwt-maven-plugin documentation at codehaus.org -->
9589
<configuration>
9690
<runTarget>index.html</runTarget>
9791
<modules>
@@ -104,8 +98,7 @@
10498
<plugin>
10599
<groupId>org.apache.maven.plugins</groupId>
106100
<artifactId>maven-compiler-plugin</artifactId>
107-
<!-- version is important to have java annotation processing correctly handled -->
108-
<version>3.3</version><!--$NO-MVN-MAN-VER$-->
101+
<version>3.3</version>
109102
<configuration>
110103
<compilerArgument>-parameters</compilerArgument>
111104
<testCompilerArgument>-parameters</testCompilerArgument>
@@ -115,65 +108,20 @@
115108
</configuration>
116109
</plugin>
117110
</plugins>
118-
119-
<pluginManagement>
120-
<plugins>
121-
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
122-
<plugin>
123-
<groupId>org.eclipse.m2e</groupId>
124-
<artifactId>lifecycle-mapping</artifactId>
125-
<version>1.0.0</version>
126-
<configuration>
127-
<lifecycleMappingMetadata>
128-
<pluginExecutions>
129-
<pluginExecution>
130-
<pluginExecutionFilter>
131-
<groupId>
132-
org.codehaus.mojo
133-
</groupId>
134-
<artifactId>
135-
gwt-maven-plugin
136-
</artifactId>
137-
<versionRange>
138-
[2.7.0,)
139-
</versionRange>
140-
<goals>
141-
<goal>compile</goal>
142-
</goals>
143-
</pluginExecutionFilter>
144-
<action>
145-
<ignore></ignore>
146-
</action>
147-
</pluginExecution>
148-
</pluginExecutions>
149-
</lifecycleMappingMetadata>
150-
</configuration>
151-
</plugin>
152-
</plugins>
153-
</pluginManagement>
154-
155-
<resources>
156-
<resource>
157-
<directory>src/main/java</directory>
158-
</resource>
159-
</resources>
160111
</build>
161112

162113
<profiles>
163114
<profile>
164115
<id>vue-gwt-resources</id>
165116
<activation>
166-
<activeByDefault>true</activeByDefault>
117+
<property>
118+
<name>!m2e.version</name>
119+
</property>
167120
</activation>
168121
<build>
169122
<resources>
170123
<resource>
171124
<directory>src/main/java</directory>
172-
<includes>
173-
<include>
174-
**/*.html
175-
</include>
176-
</includes>
177125
</resource>
178126
</resources>
179127
</build>

docs/advanced/custom-elements.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,7 @@ <h1 class="search-results-title">No results matching "<span class='search-query'
13141314
<script>
13151315
var gitbook = gitbook || [];
13161316
gitbook.push(function() {
1317-
gitbook.page.hasChanged({"page":{"title":"Custom Elements (Web Components)","level":"8.1","depth":1,"next":{"title":"Integrating With JS Components","level":"8.2","depth":1,"path":"advanced/integrating-with-js-components.md","ref":"advanced/integrating-with-js-components.md","articles":[{"title":"Using JS Components in Java","level":"8.2.1","depth":2,"anchor":"#using-js-components-in-java","path":"advanced/integrating-with-js-components.md","ref":"advanced/integrating-with-js-components.md#using-js-components-in-java","articles":[]},{"title":"Using our Java Components in JS","level":"8.2.2","depth":2,"anchor":"#using-java-components-in-js","path":"advanced/integrating-with-js-components.md","ref":"advanced/integrating-with-js-components.md#using-java-components-in-js","articles":[]}]},"previous":{"title":"Routing","level":"7.1","depth":1,"path":"scaling-up/routing.md","ref":"scaling-up/routing.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["include","toggle-chapters"],"pluginsConfig":{"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":true},"include":{},"toggle-chapters":{},"highlight":{},"search":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"advanced/custom-elements.md","mtime":"2017-12-02T16:27:14.987Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2018-03-16T13:51:01.080Z"},"basePath":"..","book":{"language":""}});
1317+
gitbook.page.hasChanged({"page":{"title":"Custom Elements (Web Components)","level":"8.1","depth":1,"next":{"title":"Integrating With JS Components","level":"8.2","depth":1,"path":"advanced/integrating-with-js-components.md","ref":"advanced/integrating-with-js-components.md","articles":[{"title":"Using JS Components in Java","level":"8.2.1","depth":2,"anchor":"#using-js-components-in-java","path":"advanced/integrating-with-js-components.md","ref":"advanced/integrating-with-js-components.md#using-js-components-in-java","articles":[]},{"title":"Using our Java Components in JS","level":"8.2.2","depth":2,"anchor":"#using-java-components-in-js","path":"advanced/integrating-with-js-components.md","ref":"advanced/integrating-with-js-components.md#using-java-components-in-js","articles":[]}]},"previous":{"title":"Routing","level":"7.1","depth":1,"path":"scaling-up/routing.md","ref":"scaling-up/routing.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["include","toggle-chapters"],"pluginsConfig":{"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":true},"include":{},"toggle-chapters":{},"highlight":{},"search":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"advanced/custom-elements.md","mtime":"2017-12-02T16:27:14.987Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2018-03-28T17:44:18.729Z"},"basePath":"..","book":{"language":""}});
13181318
});
13191319
</script>
13201320
</div>

docs/advanced/integrating-with-js-components.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ <h1 class="search-results-title">No results matching "<span class='search-query'
12131213
<script>
12141214
var gitbook = gitbook || [];
12151215
gitbook.push(function() {
1216-
gitbook.page.hasChanged({"page":{"title":"Integrating With JS Components","level":"8.2","depth":1,"next":{"title":"Using JS Components in Java","level":"8.2.1","depth":2,"anchor":"#using-js-components-in-java","path":"advanced/integrating-with-js-components.md","ref":"advanced/integrating-with-js-components.md#using-js-components-in-java","articles":[]},"previous":{"title":"Custom Elements (Web Components)","level":"8.1","depth":1,"path":"advanced/custom-elements.md","ref":"advanced/custom-elements.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["include","toggle-chapters"],"pluginsConfig":{"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":true},"include":{},"toggle-chapters":{},"highlight":{},"search":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"advanced/integrating-with-js-components.md","mtime":"2017-11-18T11:53:05.446Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2018-03-16T13:51:01.080Z"},"basePath":"..","book":{"language":""}});
1216+
gitbook.page.hasChanged({"page":{"title":"Integrating With JS Components","level":"8.2","depth":1,"next":{"title":"Using JS Components in Java","level":"8.2.1","depth":2,"anchor":"#using-js-components-in-java","path":"advanced/integrating-with-js-components.md","ref":"advanced/integrating-with-js-components.md#using-js-components-in-java","articles":[]},"previous":{"title":"Custom Elements (Web Components)","level":"8.1","depth":1,"path":"advanced/custom-elements.md","ref":"advanced/custom-elements.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["include","toggle-chapters"],"pluginsConfig":{"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":true},"include":{},"toggle-chapters":{},"highlight":{},"search":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"advanced/integrating-with-js-components.md","mtime":"2017-11-18T11:53:05.446Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2018-03-28T17:44:18.729Z"},"basePath":"..","book":{"language":""}});
12171217
});
12181218
</script>
12191219
</div>

0 commit comments

Comments
 (0)