sonatype-nexus-community / nexus-blobstore-google-cloud

Nexus Repository Manager Blobstore backed by Google Cloud Storage
https://help.sonatype.com/en/configuring-blob-stores.html#google-cloud-blob-store
Eclipse Public License 1.0
39 stars 16 forks source link

install-plugin.sh should also edit nexus-core-feature-...-features.xml #6

Closed nblair closed 6 years ago

nblair commented 6 years ago

The install plugin script added in #5 didn't have a solution for modifying path/to/your/nxrm3/install/system/org/sonatype/nexus/assemblies/nexus-core-feature/${NEXUS_VERSION}/nexus-core-feature-${NEXUS_VERSION}-features.xml since an input for NEXUS_VERSION wasn't handy/collected.

Idea: look for a config file under the path/to/your/nxrm3/install argument passed into install-plugin.sh for something that reports the nexus version.

clement-buchart commented 6 years ago

Hello,

sed -i "/nexus-task-log-cleanup<\/feature>/ a <feature version=\"$pluginVersion\" prerequisite=\"false\" dependency=\"false\">$plugin</feature>" $nxrmPath/system/org/sonatype/nexus/assemblies/nexus-core-feature/*/nexus-core-feature-*-features.xml

Seems to do the trick for me.

nblair commented 6 years ago

Nice @clement-buchart thanks!

I have one minor edit to that command, have to define plugin=nexus-blobstore-google-cloud. Would you do the honors of a PR to install-plugin.sh?

clement-buchart commented 6 years ago

Here you go. I went ahead and added a Dockerfile based on the official nexus one, if that's of with you.