Skip to content

Commit

Permalink
update documentation (generated README.MD) and properties #3
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteph-de committed Jul 14, 2023
1 parent 702c05c commit dc62863
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 27 deletions.
12 changes: 0 additions & 12 deletions documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,3 @@ Selbstdefinierte Properties
---------------------------
projectName, mcrSolrMainCoreName

Fragen / Todos
------
x-webapp/pom.xml
-> dependency zu mir-common-resources - Kann die weg?
- pom.xml
- Dependencies aufräumen
- Repositories konfigurieren

- Log4j2 konfiguration



63 changes: 50 additions & 13 deletions src/main/resources/archetype-resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,57 @@

${hash} ${projectName}

${hash}${hash} Installation Instructions
${hash}${hash} Installation instructions

* clone repository
${hash}${hash}${hash} Version control
* deploy the generated project files to your own Git repository

${hash}${hash}${hash} Build
* clone / checkout project from git repository
* run `mvn clean install`
* unzip ${rootArtifactId}-cli to user defined cli directory
* change to cli directory
* run `bin/${rootArtifactId}.sh create configuration directory`
* you now have a config dir `~/.mycore/${rootArtifactId}`

${hash}${hash}${hash} Create / find the directory with the MyCoRe Commandline interface
* unpack `${rootArtifactId}-cli/target/${rootArtifactId}-cli.tar` into a user defined CLI directory and change into it
* OR: use the generated CLI directory in `${rootArtifactId}/${rootArtifactId}-cli/target/appassember`
* remember that you can start the CLI with `bin\${rootArtifactId}.bat` on Windows and `bin/${rootArtifactId}.sh` on MAC/Linux
* remember taht you can exit the CLI with the command `exit`


${hash}${hash}${hash} Configure and run Solr server
* Change to `${rootArtifactId}-webapp` directory
* Install and configure solr with the commands:
* `mvn solr-runner:copyHome`
* `mvn solr-runner:installConfigSet -DconfigSetName=mycore_main -DgitRepository=https://github.com/MyCoRe-Org/mycore_solr_configset_main`
* `mvn solr-runner:installConfigSet -DconfigSetName=mycore_classification -DgitRepository=https://github.com/MyCoRe-Org/mycore_solr_configset_classification`

* Run solr with the command `mvn solr-runner:start`
* (Solr is usually running at: http://localhost:8983/solr/#/)
* (To stop it return to this directory an run: `mvn solr-runner:stop`)

${hash}${hash}${hash} Configure the application
* change into CLI directory and run:
`bin/${rootArtifactId}.sh create configuration directory`
* The configuration directory is created in: `~/.mycore/${rootArtifactId}`
* configure your database connection in `~/.mycore/${rootArtifactId}/resources/META-INF/persistence.xml`
* perhaps you need to download a driver to `~/.mycore/${rootArtifactId}/lib/`
* run cli command `bin/${rootArtifactId}.sh process config/setup-commands.txt to load default data`
* (for first steps you can use the preconfigured H2 database)
* perhaps you need to download a driver to `~/.mycore/${rootArtifactId}/lib/`
* run cli command `bin/${rootArtifactId}.sh reload mappings in jpa configuration file`
* Go to ${rootArtifactId}-webapp
* Install solr with the command: `mvn solr-runner:copyHome`
* Run solr with the command `mvn solr-runner:start` (End with `mvn solr-runner:stop`)
* Run Jetty with the command: `mvn jetty:run` (End with ctrl+c)
* Fast rebuild and Jetty restart `mvn clean install && cd ${rootArtifactId}-module && mvn jetty:run` (End with ctrl+c)
* configure Solr cores in `~/.mycore/${rootArtifactId}/mycore.properties`

```
MCR.Solr.ServerURL=http://localhost:8983/
MCR.Solr.Core.main.Name=${mcrSolrMainCoreName}
MCR.Solr.Core.main.ServerURL=%MCR.Solr.ServerURL%
MCR.Solr.Core.classification.Name=${mcrSolrClassCoreName}
MCR.Solr.Core.classification.ServerURL=%MCR.Solr.ServerURL%
```

${hash}${hash}${hash} Initialize the application
* change into CLI directory (see above)
* load default data by running: `bin/${rootArtifactId}.sh process config/setup-commands.txt`

${hash}${hash}${hash} Run web server
* Change to `${rootArtifactId}-webapp` directory
* Run Jetty with the command: `mvn jetty:run` (end with `ctrl+c`)
* Open your browser with: http://localhost:8080/${rootArtifactId}
* (Fast rebuild and Jetty restart `mvn clean install && cd ${rootArtifactId}-module && mvn jetty:run` (End with ctrl+c))
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ init superuser
process ${symbol_dollar}{app.home}/config/acl/defaultrules-commands.txt
process ${symbol_dollar}{app.home}/config/acl/webacl-commands.txt

reload solr configuration main in core main
reload solr configuration main in core main
reload solr configuration classification in core classification
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ ${symbol_pound}-----------------------------------------------------------------
${symbol_pound} Configure ACL Checking
${symbol_pound}----------------------------------------------------------------------
MCR.Access.Strategy.Class=org.mycore.access.strategies.MCRCreatorRuleStrategy
MCR.Access.Strategy.CreatorRole=org.mycore.access.strategies.MCRCreatorRuleStrategy
MCR.Access.Strategy.SubmittedCategories=state:submitted
MCR.Access.Strategy.ReviewCategories=state:review
MCR.Access.AddDerivateDefaultRule=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<properties>
<MCR.AppName>${rootArtifactId}</MCR.AppName>
<solr.location>${user.home}/.mycore/${rootArtifactId}/data/solr</solr.location>
<!-- solr.location>${user.home}/AppData/Local/MyCoRe/dev-${rootArtifactId}/data/solr</solr.location -->
<!-- Windows (see <profile> below: ${user.home}/AppData/Local/MyCoRe/dev-${rootArtifactId}/data/solr -->
<solr-runner.solrMirrorURL>https://dlcdn.apache.org/lucene/solr/</solr-runner.solrMirrorURL>
<solr-runner.solrVersionString>8.11.2</solr-runner.solrVersionString>
</properties>
Expand Down Expand Up @@ -91,4 +91,16 @@
<artifactId>jquery-migrate</artifactId>
</dependency>
</dependencies>

<profiles>
<profile>
<activation>
<os><family>Windows</family></os>
</activation>
<properties>
<solr.location>${user.home}/AppData/Local/MyCoRe/${rootArtifactId}/data/solr</solr.location>
</properties>
</profile>
</profiles>

</project>

0 comments on commit dc62863

Please sign in to comment.