Skip to content

Commit

Permalink
Merge pull request #7 from /issues/3-update_to_mycore_2022.06.2
Browse files Browse the repository at this point in the history
03 update to mycore 2022.06.2
  • Loading branch information
rsteph-de authored Jul 14, 2023
2 parents 5f42f42 + dc62863 commit ec938f6
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 32 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,7 +28,9 @@ ${symbol_pound}-----------------------------------------------------------------
${symbol_pound} Configure ACL Checking
${symbol_pound}----------------------------------------------------------------------
MCR.Access.Strategy.Class=org.mycore.access.strategies.MCRCreatorRuleStrategy
MCR.Access.Strategy.SubmittedCategory=state:submitted
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
MCR.Access.AddObjectDefaultRule=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>
6 changes: 2 additions & 4 deletions src/main/resources/archetype-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
<description>The main Maven Project for ${projectName}</description>
<inceptionYear>2020</inceptionYear>
<properties>
<changelog.since>2020-11-01</changelog.since>
<!-- until snapshot matches released version (required for 'mvn changes:changes-check') -->
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jetty.version>11.0.15</jetty.version>
<mycore.version>2022.06.2-SNAPSHOT</mycore.version>
<!-- specifiy the MyCoRe version here (release nr or *-SNAPSHOT): -->
<mycore.version>2022.06.3-SNAPSHOT</mycore.version>
</properties>
<!-- put your Git or SVN URLs here -->
<scm>
Expand Down Expand Up @@ -241,7 +240,6 @@
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.200</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mycore</groupId>
Expand Down

0 comments on commit ec938f6

Please sign in to comment.