diff --git a/.github/buildScripts/createStandalonePom.groovy b/.github/buildScripts/createStandalonePom.groovy new file mode 100644 index 0000000..910c1e0 --- /dev/null +++ b/.github/buildScripts/createStandalonePom.groovy @@ -0,0 +1,15 @@ +/** + * Creates a new pom-standalone.xml based on pom.xml but with new artifact name (devstack-standalone) and + * additional build steps for shading based on shadingConf.xml + */ +String projectBasePath = project.basedir +File origPom = new File(projectBasePath + "/pom.xml") +File shadingConf = new File(projectBasePath + "/.github/buildScripts/shadingConf.xml") + +String newPomBody = origPom.text.replace("", "\n" + shadingConf.text) + +newPomBody = newPomBody.replaceFirst("devstack<\\/artifactId>", "devstack-standalone<\\/artifactId>") + +File standalonePom = new File(projectBasePath + "/pom-standalone.xml") +standalonePom.createNewFile() +standalonePom.text = newPomBody \ No newline at end of file diff --git a/.github/buildScripts/shadingConf.xml b/.github/buildScripts/shadingConf.xml new file mode 100644 index 0000000..c2fca50 --- /dev/null +++ b/.github/buildScripts/shadingConf.xml @@ -0,0 +1,67 @@ + + + org.apache.maven.plugins + maven-shade-plugin + 3.5.0 + + + package + + shade + + + + false + + + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + META-INF/*.MF + + + + + + + org.codehaus.groovy:* + + com.google.code.gson:gson + org.apache.httpcomponents + + com.kohlschutter.junixsocket:junixsocket-core + + + + + + com.eficode.atlassian + com.eficode.shaded.atlassian + + + okio + com.eficode.shaded.okio + + + okhttp3 + com.eficode.shaded.okhttp3 + + + + + true + + true + + + + \ No newline at end of file diff --git a/.github/workflows/publish-maven-package.yml b/.github/workflows/publish-maven-package.yml index e9c3674..2834818 100644 --- a/.github/workflows/publish-maven-package.yml +++ b/.github/workflows/publish-maven-package.yml @@ -40,15 +40,21 @@ jobs: run: | mkdir -p repository/com/eficode/devstack + mkdir -p repository/com/eficode/devstack-standalone - mvn help:effective-pom -P groovy-3 -Doutput=effective-pom.xml - mvn install -f effective-pom.xml -DcreateChecksum=true + echo Building and installing "normal" version + mvn install -f pom.xml -DcreateChecksum=true + + echo Creating pom for standalone version and installing + mvn gplus:execute@execute + mvn install -f pom-standalone.xml -DcreateChecksum=true - name: Copying JAR files run: | echo Copying the new JAR files to repository which will be added to git branch "packages" rsync -avh --checksum ~/.m2/repository/com/eficode/devstack/ repository/com/eficode/devstack/ + rsync -avh --checksum ~/.m2/repository/com/eficode/devstack-standalone/ repository/com/eficode/devstack-standalone/ - name: Committing and pushing JAR files run: | diff --git a/README.md b/README.md index a8ee385..6cf3b87 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,10 @@ SubDeployments are simply a collection of deployments used by a more complex dep ## Utils -These are classes mainly intended to be used by Container/Deployment-classes when massaging of the containers are needed for example. Currently [ImageBuilder.groovy](src%2Fmain%2Fgroovy%2Fcom%2Feficode%2Fdevstack%2Futil%2FImageBuilder.groovy) dynamically builds Atlassian images for non x86 architectures on the fly. +These are classes mainly intended to be used by Container/Deployment-classes when massaging of the containers are needed for example. +Currently, [ImageBuilder.groovy](src%2Fmain%2Fgroovy%2Fcom%2Feficode%2Fdevstack%2Futil%2FImageBuilder.groovy) dynamically builds Atlassian images for non x86 architectures on the fly. +[TimeMachine.groovy](src%2Fmain%2Fgroovy%2Fcom%2Feficode%2Fdevstack%2Futil%2FTimeMachine.groovy) changes the apparent time for all +containers sharing a Docker Engine, intended for testing date changes. # Setup Docker Engine in AWS @@ -90,15 +93,15 @@ JsmH2Deployment jsmDep = new JsmH2Deployment(jiraBaseUrl, dockerRemoteHost, dock ## Using DevStack in your project -A note on versions, DevStack is cross-compiled for both Groovy 3 and 2.5, these editions are also available in a standalone edition with shaded dependencies. +A note on versions, DevStack is available in two version a "normal" one and a standalone edition with shaded dependencies. The standalone edition should alleviate dependency issues but is also larger Examples: - * com.eficode:devstack:2.0.0-SNAPSHOT-groovy-2.5 - * DevStack version 2.0.0, compiled for groovy 2.5 - * devstack:2.0.0-SNAPSHOT-groovy-3.0:jar:standalone - * DevStack version 2.0.0, compiled for groovy 3, standalone edition. + * com.eficode:devstack:2.3.9-SNAPSHOT + * DevStack version 2.3.9-SNAPSHOT + * com.eficode:devstack-standalone:2.3.9-SNAPSHOT + * DevStack version 2.3.9-SNAPSHOT, standalone edition. To find the latest version, check the "packages" branch: https://github.com/eficode/devStack/tree/packages/repository/com/eficode/devstack @@ -107,10 +110,10 @@ To find the latest version, check the "packages" branch: https://github.com/efic ```bash -mvn dependency:get -Dartifact=com.eficode:devstack:2.0.0-SNAPSHOT-groovy-2.5 -DremoteRepositories=https://github.com/eficode/DevStack/raw/packages/repository/ +mvn dependency:get -Dartifact=com.eficode:devstack:2.3.9-SNAPSHOT -DremoteRepositories=https://github.com/eficode/DevStack/raw/packages/repository/ -mvn dependency:get -Dartifact=com.eficode:devstack:2.0.0-SNAPSHOT-groovy-2.5:jar:standalone -DremoteRepositories=https://github.com/eficode/DevStack/raw/packages/repository/ +mvn dependency:get -Dartifact=com.eficode:devstack-standalone:2.3.9-SNAPSHOT -DremoteRepositories=https://github.com/eficode/DevStack/raw/packages/repository/ ``` @@ -124,9 +127,9 @@ mvn dependency:get -Dartifact=com.eficode:devstack:2.0.0-SNAPSHOT-groovy-2.5:jar com.eficode devstack - 2.0.0-SNAPSHOT-groovy-3.0 - - + 2.3.9-SNAPSHOT + + @@ -140,4 +143,16 @@ mvn dependency:get -Dartifact=com.eficode:devstack:2.0.0-SNAPSHOT-groovy-2.5:jar .. .... -``` \ No newline at end of file +``` + +### Grape Dependency +```groovy +@GrabResolver(name = "devstack-github", root = "https://github.com/eficode/devstack/raw/packages/repository/") +@Grab(group = "com.eficode" , module = "devstack-standalone", version = "2.3.9-SNAPSHOT") +``` + + +# Breaking Changes + +* 2.3.9 + * From now on two artifacts will be generated, devstack and devstack-standalone and the classifier standalone is deprecated \ No newline at end of file diff --git a/pom.xml b/pom.xml index 3ed7b1a..d618385 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.eficode devstack - 2.3.8-SNAPSHOT + 2.3.9-SNAPSHOT jar DevStack @@ -161,73 +161,7 @@ - - - org.apache.maven.plugins - maven-shade-plugin - 3.5.0 - - - package - - shade - - - - true - - - standalone - - - - *:* - - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - META-INF/*.MF - - - - - - - org.codehaus.groovy:* - - com.google.code.gson:gson - org.apache.httpcomponents - - com.kohlschutter.junixsocket:junixsocket-core - - - - - - com.eficode.atlassian - com.eficode.shaded.atlassian - - - okio - com.eficode.shaded.okio - - - okhttp3 - com.eficode.shaded.okhttp3 - - - - false - - true - - - - org.apache.maven.plugins maven-source-plugin @@ -256,6 +190,12 @@ compileTests + + execute + + execute + + @@ -265,6 +205,11 @@ runtime + + + + + org.apache.maven.plugins