Skip to content

Commit 6aa5069

Browse files
committed
Merge projects
1 parent bac5e3d commit 6aa5069

9 files changed

Lines changed: 100 additions & 195 deletions

File tree

.github/workflows/build-content.yml

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

.github/workflows/build.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
1-
name: Build gwt-site-webapp
1+
name: Build GWT Site
2+
23
on:
34
push:
45
pull_request:
56

67
jobs:
78
build:
89
runs-on: ubuntu-latest
10+
911
steps:
1012
- uses: actions/checkout@v4
11-
- name: Set up Java
13+
- name: Set up Java 11
1214
uses: actions/setup-java@v4
1315
with:
1416
java-version: '11'
1517
distribution: 'temurin'
1618
cache: 'maven'
19+
- name: Build with Maven
20+
run: mvn -e --batch-mode --no-transfer-progress verify -Pgrunt
1721

18-
- name: Compile the webapp to JS
19-
run: mvn --batch-mode --no-transfer-progress -e verify
20-
21-
- name: Rename generated directory
22-
# Fixes issue where artifact zip contains top level directory due to wildcard expansion
23-
run: mv target/gwt-site-webapp-*/ target/gwt-site-webapp
24-
- name: Upload the generated JS
22+
- name: Upload artifact for testing/deployment
2523
uses: actions/upload-artifact@v4
2624
with:
27-
name: 'gwt-site-webapp'
28-
path: target/gwt-site-webapp/
25+
name: gwt-site
26+
path: 'content/target/generated-site/'

.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
target/
1+
*/target/
2+
.idea/
3+
*.iml
4+
.DS_Store
5+
npm-debug.log
6+
node/
7+
node_modules/
8+
content/src/main/site/assets/build/css/
9+
content/src/main/site/assets/build/img/
10+
content/src/main/site/assets/build/js/global.js
11+
content/src/main/site/assets/build/js/global.min.js

README.md

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,39 @@
1-
# gwt-site-webapp
2-
This project includes the client code of the GWT site. It does not include the
3-
site content which is in the gwt-site project nor the utilities to create and
4-
deploy with samples and plugin releases.
1+
# GWT Documentation
52

6-
## Requirements
7-
[Apache Maven](http://maven.apache.org) 3.8 or greater, and JDK 11+ in order to run.
3+
* GWT documentation is published under https://www.gwtproject.org/doc/latest/DevGuide.html
84

9-
To build the project, invoke the following command:
5+
## Reference
106

11-
$ mvn verify
7+
* Markdown processor: https://github.com/sirthias/pegdown
128

13-
This only tests and builds the JS to enhance the site content. To build the contents
14-
first, you need to build the gwt-site project.
9+
## Adding content
1510

16-
1. Check out the [gwt-site](https://github.com/gwtproject/gwt-site) project.
17-
2. Build the gwt-site project:
11+
* See: https://www.gwtproject.org/makinggwtbetter.html#webpage
1812

19-
$ cd [...]/gwt-site
20-
$ mvn install
13+
## Requirements
14+
[Apache Maven](http://maven.apache.org) 3.8 or greater, and JDK 11+ in order to run.
2115

22-
3. Build the gwt-site-webapp project, with the -Pfull-site profile:
16+
## Building
2317

24-
$ cd [...]/gwt-site-webapp
25-
$ mvn verify -Pfull-site
18+
If you have Grunt installed :
19+
* build the assets using Grunt: `grunt`
20+
* then run: `mvn clean install`
21+
* after that you will find the generated documentation in `content/target/generated-site/`.
2622

27-
Now you can point your browser to the `target/www` folder, or you can serve
28-
its content with any web-server (i.e [serve](https://www.npmjs.com/package/serve) or
29-
[http.server](https://docs.python.org/3/library/http.server.html)).
30-
Notice that an http server is needed if you want to test site navigation via Ajax.
23+
If you don't have Grunt installer :
24+
* build the assets using Maven and Grunt plugin: `mvn clean install -Pgrunt`
25+
* after that you will find the generated documentation in `content/target/generated-site/`.
3126

32-
Building will run the **tests**, but to explicitly run them you can use the test target
27+
### Running locally
28+
Run the site locally for easy visual testing
3329

34-
$ mvn test
30+
Run without server:
31+
* Change to the `content/target/generated-site` folder.
32+
* Open the `index.html` file in your browser.
3533

36-
# Develop and Deploy
34+
Run with Maven:
35+
* Run: `mvn -pl content jetty:run`
36+
* Open URL `http://localhost:9999` in your browser.
3737

38-
Note that as configured, sourcemaps will not work locally - they must be deployed to gwtproject.org
39-
because the generated JS will attempt to load them from an absolute URL.
38+
# gwt-site-webapp
4039

41-
* The `target/gwt-site-webapp-<version>.war` file (and the `target/gwt-site-webapp-<version>`
42-
directory) contains the generated JavaScript and sourcemaps, and can be deployed along with the
43-
generated site content.
44-
* The `target/www` directory contains the generated JavaScript, sourcemaps (and Java sources),
45-
and the generated HTML from gwt-site itself, and is suitable for deployment directly to a
46-
server.

content/.gitignore

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

content/README.md

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

content/pom.xml

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44

55
<parent>
@@ -106,13 +106,26 @@
106106
<artifactItem>
107107
<groupId>org.gwtproject</groupId>
108108
<artifactId>gwt-dev</artifactId>
109-
<version>2.13.1</version>
109+
<version>2.12.2</version>
110110
<classifier>javadoc</classifier>
111111
</artifactItem>
112112
</artifactItems>
113113
<outputDirectory>${project.build.directory}/generated-site/javadoc/latest</outputDirectory>
114114
</configuration>
115115
</execution>
116+
<execution>
117+
<id>unpack-dependencies</id>
118+
<phase>prepare-package</phase>
119+
<goals>
120+
<goal>unpack-dependencies</goal>
121+
</goals>
122+
<configuration>
123+
<includeGroupIds>org.gwtproject.site</includeGroupIds>
124+
<includeArtifactIds>gwt-site-webapp</includeArtifactIds>
125+
<excludeTransitive>true</excludeTransitive>
126+
<outputDirectory>${project.build.directory}/generated-site/</outputDirectory>
127+
</configuration>
128+
</execution>
116129
</executions>
117130
</plugin>
118131
<plugin>
@@ -134,17 +147,17 @@
134147
</plugin>
135148
<plugin>
136149
<groupId>org.eclipse.jetty</groupId>
137-
<artifactId>jetty-maven-plugin</artifactId>
138-
<version>9.4.28.v20200408</version>
139-
<configuration>
140-
<httpConnector>
141-
<port>9999</port>
142-
</httpConnector>
143-
<supportedPackagings>
144-
<supportedPackaging>jar</supportedPackaging>
145-
</supportedPackagings>
146-
<webAppSourceDirectory>${project.build.directory}/generated-site</webAppSourceDirectory>
147-
</configuration>
150+
<artifactId>jetty-maven-plugin</artifactId>
151+
<version>9.4.28.v20200408</version>
152+
<configuration>
153+
<httpConnector>
154+
<port>9999</port>
155+
</httpConnector>
156+
<supportedPackagings>
157+
<supportedPackaging>jar</supportedPackaging>
158+
</supportedPackagings>
159+
<webAppSourceDirectory>${project.build.directory}/generated-site</webAppSourceDirectory>
160+
</configuration>
148161
</plugin>
149162
</plugins>
150163
</build>
@@ -175,8 +188,14 @@
175188
<artifactId>commons-io</artifactId>
176189
<version>2.7</version>
177190
</dependency>
191+
<dependency>
192+
<groupId>org.gwtproject.site</groupId>
193+
<artifactId>gwt-site-webapp</artifactId>
194+
<version>${project.version}</version>
195+
<type>war</type>
196+
<!-- <classifier>compiled-js</classifier> -->
197+
</dependency>
178198
</dependencies>
179-
180199
<profiles>
181200
<profile>
182201
<id>grunt</id>

pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<groupId>org.gwtproject.site</groupId>
6+
<artifactId>gwt-site-parent</artifactId>
7+
<version>2.0-SNAPSHOT</version>
8+
<packaging>pom</packaging>
9+
<modules>
10+
<module>content</module>
11+
<module>web-app</module>
12+
</modules>
13+
</project>

web-app/pom.xml

Lines changed: 9 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
44

55
<modelVersion>4.0.0</modelVersion>
6-
<groupId>com.google.gwt.site.webapp</groupId>
6+
<parent>
7+
<groupId>org.gwtproject.site</groupId>
8+
<version>2.0-SNAPSHOT</version>
9+
<artifactId>gwt-site-parent</artifactId>
10+
</parent>
711
<artifactId>gwt-site-webapp</artifactId>
8-
<version>2.0-SNAPSHOT</version>
912
<packaging>gwt-app</packaging>
1013

1114
<properties>
1215
<maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
1316
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1417

15-
<gwt.version>2.13.1</gwt.version>
18+
<gwt.version>2.12.1</gwt.version>
1619

1720
<junit.version>4.13.2</junit.version>
1821

@@ -59,7 +62,7 @@
5962
<directory>${basedir}/src/test/java</directory>
6063
</testResource>
6164
</testResources>
62-
65+
<finalName>compiled-js</finalName>
6366
<plugins>
6467
<plugin>
6568
<groupId>org.apache.maven.plugins</groupId>
@@ -130,65 +133,4 @@
130133
</plugin>
131134
</plugins>
132135
</build>
133-
<profiles>
134-
<profile>
135-
<!--
136-
Generates a full working site for testing, by unpacking the
137-
markdown along with this project's own output.
138-
-->
139-
<id>full-site</id>
140-
<dependencies>
141-
<dependency>
142-
<groupId>com.google.gwt.site</groupId>
143-
<artifactId>gwt-site</artifactId>
144-
<version>${project.version}</version>
145-
<type>zip</type>
146-
<classifier>generated-site</classifier>
147-
</dependency>
148-
</dependencies>
149-
<build>
150-
<plugins>
151-
<plugin>
152-
<artifactId>maven-dependency-plugin</artifactId>
153-
<executions>
154-
<execution>
155-
<id>unpack-dependencies</id>
156-
<phase>prepare-package</phase>
157-
<goals>
158-
<goal>unpack-dependencies</goal>
159-
</goals>
160-
<configuration>
161-
<includeGroupIds>com.google.gwt.site</includeGroupIds>
162-
<includeArtifactIds>gwt-site</includeArtifactIds>
163-
<excludeTransitive>true</excludeTransitive>
164-
<outputDirectory>${project.build.directory}/www/</outputDirectory>
165-
</configuration>
166-
</execution>
167-
</executions>
168-
</plugin>
169-
<plugin>
170-
<artifactId>maven-resources-plugin</artifactId>
171-
<executions>
172-
<execution>
173-
<!-- Along with the dependency:unpack-dependencies, this generates a complete site to test with -->
174-
<id>copy-www-resources</id>
175-
<phase>prepare-package</phase>
176-
<goals>
177-
<goal>copy-resources</goal>
178-
</goals>
179-
<configuration>
180-
<outputDirectory>${project.build.directory}/www/</outputDirectory>
181-
<resources>
182-
<resource>
183-
<directory>${project.build.directory}/${project.build.finalName}/</directory>
184-
</resource>
185-
</resources>
186-
</configuration>
187-
</execution>
188-
</executions>
189-
</plugin>
190-
</plugins>
191-
</build>
192-
</profile>
193-
</profiles>
194-
</project>
136+
</project>

0 commit comments

Comments
 (0)