Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions website/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<!--Generate build output (/docs/latest) that you can deploy locally with something like http-server
to look at changes.
The actual output used for deploying a staging or prod build is done in
`druid-website-src`, which is also where version
interpolation is done.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>druid-website</artifactId>
<name>druid-website</name>
<description>Website for druid.apache.org</description>

<parent>
<groupId>org.apache.druid</groupId>
<artifactId>druid</artifactId>
<version>28.0.0-SNAPSHOT</version>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess this needs to be 29 snapshot now since #15121 has been merged

Copy link
Copy Markdown
Contributor Author

@317brian 317brian Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this used for anything outside of building the website and interpolating the version variable used in the docs?? The variable interpolation got moved to druid-website-src along with the rest of the stuff for a production build.

If not, we can probably delete it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it needs to match the rest of the pom versions if we are keeping this file at all i think, https://github.com/apache/druid/blob/master/pom.xml#L2128 has a profile that refers to this file. It seems useful to me to have a pom for the website that can run basic npm build and test commands the same as we have for web-console if its going to live in the same repository as the rest of druid stuff. whether or not it needs to build the full website or not i suppose is a different matter, but i think at least it should be able to run npm build and run the spellcheck (so that it can be done independently of whatever node/npm versions exist on the developers machine globally)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for example https://github.com/apache/druid/blob/master/distribution/asf-release-process-guide.md#set-version-and-make-a-tag still refers to bumping the website version so it matches everything else. it does look like maybe this part has been updated at least https://github.com/apache/druid/blob/master/distribution/asf-release-process-guide.md#update-druidstagedapacheorg, having not built the full website i'm not sure if it would ever make sense to try to drive that process through here instead of having to drive from the website-src repo...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks for taking the time to explain it! I'm pretty unfamiliar with Maven since it's not really in the typical docs workflow.

I haven't had time to figure out why the spellchecker doesn't run when I do something like mvn compile though or if it runs, it doesn't return any feedback. Manually running it returns feedback on errors or success. The spellchecking script hasn't changed. The build runs and completes and we get feedback on it though

</parent>

<properties>
<node.version>v16.17.0</node.version>
<npm.version>8.15.0</npm.version>
Comment on lines +42 to +43
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these the recommended docusaurus 2 versions?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They don't have a recommended NPM version and the recommended node version is 16.14 or later

</properties>

<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<id>install-node-and-npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<npmVersion>${npm.version}</npmVersion>
<workingDirectory>${project.build.directory}</workingDirectory>
<installDirectory>${project.build.directory}</installDirectory>
</configuration>
</execution>
<execution>
<id>npm-install</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>ci</arguments>
<installDirectory>${project.build.directory}</installDirectory>
</configuration>
</execution>
<execution>
<id>spellcheck</id>
<goals>
<goal>npm</goal>
</goals>
<phase>test</phase>
<configuration>
<arguments>run spellcheck</arguments>
<workingDirectory>${project.build.directory}</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>npm-run-build</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>run</argument>
<argument>build</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>