Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intellij IDEA webapp hotreload #10247

Merged
merged 5 commits into from
Jan 25, 2024

Conversation

beepsoft
Copy link
Contributor

@beepsoft beepsoft commented Jan 19, 2024

What this PR does / why we need it:

This is related to #9959.

When running Dataverse in Docker we still want to be able to just edit things under src/main/webapp using IntelliJ IDEA and then just reload the web page to see the changes. To do this in this PR:

  1. Mapped Payara /opt/payara/appserver/glassfish/domains/domain1/applications folder to ./docker-dev-volumes/glassfish/applications
  2. Added watchers.xml File watcher configuration, which can be imported into IDEA to ...
  3. ... run cpwebapp.sh to copy changed files under src/main/webapp to ./docker-dev-volumes/glassfish/applications/dataverse-{current version}

Which issue(s) this PR closes:

None.

Special notes for your reviewer:

You need IntelliJ IDEA Ultimate edition for File watchers support.

Suggestions on how to test this:

  1. Run Dataverse in Docker https://guides.dataverse.org/en/latest/container/index.html.
  2. In IntelliJ IDEA, import scripts/intellij/watchers.xml into File watchers (https://www.jetbrains.com/help/idea/settings-tools-file-watchers.html).
  3. Setup Payara remote run config and deploy Dataverse in debug mode (https://dataverse-guide--9959.org.readthedocs.build/en/9959/container/dev-usage.html)
  4. Open Dataverse in browser.
  5. Edit and save any XHTML/CSS/etc. file under src/main/webapp.
  6. Reload browser to see changes to the UI.

See this here in action: https://harvard.zoom.us/rec/share/EUOqzaq4NzsH4N8xX7kg9II8w292MEB6eqbyzPMlZOACsErKV-Z20hHBj1HerFH2.bGFh04EdU1Qnu9ic

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

No.

Is there a release notes update needed for this change?:

Yes.

Additional documentation:

The documentation for this is practically what is written in Suggestions on how to test this.

allowedApiCalls should be at the top level, not inside toolParameters.
Without this it also evaluates the FILE case causing NPE when dataFile
is accessed.
# Conflicts:
#	src/main/java/edu/harvard/iq/dataverse/externaltools/ExternalToolHandler.java
…ocker

When running Dataverse in Docker we still want to be able to just edit
things under src/main/webapp and then just reload the web page to see the
changes. To do this:

1. Mapped Payara /opt/payara/appserver/glassfish/domains/domain1/applications
folder to ./docker-dev-volumes/glassfish/applications
2. Added watchers.xml File watcher configuration, which can be imported into
IDEA to ...
3. ... run cpwebapp.sh to copy changed files under src/main/webapp to
./docker-dev-volumes/glassfish/applications/dataverse-{current version}
Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

I left a comment about commenting. 😄

docker-compose-dev.yml Outdated Show resolved Hide resolved
@pdurbin pdurbin self-assigned this Jan 22, 2024
@cmbz cmbz added the Size: 3 A percentage of a sprint. 2.1 hours. label Jan 23, 2024
Co-authored-by: Philip Durbin <philipdurbin@gmail.com>
Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

Looks good. As discussed in the container meeting this morning, we'll use these files as raw material as we work on the new PR:

@pdurbin pdurbin merged commit cea3e62 into IQSS:develop Jan 25, 2024
2 checks passed
@pdurbin pdurbin added this to the 6.2 milestone Jan 25, 2024
@pdurbin pdurbin removed their assignment Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size: 3 A percentage of a sprint. 2.1 hours.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants