diff --git a/README b/README index 73d9749..3529aaf 100644 --- a/README +++ b/README @@ -1,2 +1,5 @@ Put your add-on component directories in this directory to load them when Moqui runs. -#hotwax-Asignment level 1 \ No newline at end of file +<<<<<<< HEAD +======= +#hotwax-Asignment level 1 +>>>>>>> 4d4c91a4c86b4864e6a58bba7567d200bf0f7306 diff --git a/Screenshot from 2023-12-06 15-24-14.png b/Screenshot from 2023-12-06 15-24-14.png new file mode 100644 index 0000000..964cf59 Binary files /dev/null and b/Screenshot from 2023-12-06 15-24-14.png differ diff --git a/Screenshot from 2023-12-06 15-24-33.png b/Screenshot from 2023-12-06 15-24-33.png new file mode 100644 index 0000000..99d2c8f Binary files /dev/null and b/Screenshot from 2023-12-06 15-24-33.png differ diff --git a/Screenshot from 2023-12-06 15-24-52.png b/Screenshot from 2023-12-06 15-24-52.png new file mode 100644 index 0000000..d4b90d7 Binary files /dev/null and b/Screenshot from 2023-12-06 15-24-52.png differ diff --git a/Screenshot from 2023-12-06 15-30-08.png b/Screenshot from 2023-12-06 15-30-08.png new file mode 100644 index 0000000..5be8309 Binary files /dev/null and b/Screenshot from 2023-12-06 15-30-08.png differ diff --git a/helloworld-component/build.gradle b/helloworld-component/build.gradle new file mode 100644 index 0000000..dcf8aea --- /dev/null +++ b/helloworld-component/build.gradle @@ -0,0 +1,46 @@ +apply plugin: 'groovy' + +//sourceCompatibility = '1.8' +//targetCompatibility = '1.8' + +def moquiDir = projectDir.parentFile.parentFile.parentFile +def frameworkDir = file(moquiDir.absolutePath + '/framework') + +// to run use "gradle dependencyUpdates" +apply plugin: 'com.github.ben-manes.versions' +buildscript { + repositories { jcenter() } + dependencies { classpath 'com.github.ben-manes:gradle-versions-plugin:0.21.0' } +} +dependencyUpdates.resolutionStrategy = { componentSelection { rules -> rules.all { ComponentSelection selection -> + boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier -> selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/ } + if (rejected) selection.reject('Release candidate') +} } } + +repositories { + flatDir name: 'localLib', dirs: frameworkDir.absolutePath + '/lib' + mavenCentral() +} + +// Log4J has annotation processors, disable to avoid warning +tasks.withType(JavaCompile) { options.compilerArgs << "-proc:none" } +tasks.withType(GroovyCompile) { options.compilerArgs << "-proc:none" } + +dependencies { + implementation project(':framework') + runtimeOnly 'mysql:mysql-connector-java:5.1.47' +} + +// by default the Java plugin runs test on build, change to not do that (only run test if explicit task) +// no longer workds as of gradle 4.8 or possibly earlier, use clear() instead: check.dependsOn.remove(test) +check.dependsOn.clear() + +task cleanLib(type: Delete) { delete fileTree(dir: projectDir.absolutePath+'/lib', include: '*') } +clean.dependsOn cleanLib + +task copyDependencies { doLast { + copy { from (configurations.runtimeClasspath - project(':framework').configurations.runtimeClasspath - project(':framework').jar.archivePath) + into file(projectDir.absolutePath + '/lib') } +} } +copyDependencies.dependsOn cleanLib +jar.dependsOn copyDependencies diff --git a/helloworld-component/build/libs/helloworld-component.jar b/helloworld-component/build/libs/helloworld-component.jar new file mode 100644 index 0000000..177aa90 Binary files /dev/null and b/helloworld-component/build/libs/helloworld-component.jar differ diff --git a/helloworld-component/build/tmp/jar/MANIFEST.MF b/helloworld-component/build/tmp/jar/MANIFEST.MF new file mode 100644 index 0000000..58630c0 --- /dev/null +++ b/helloworld-component/build/tmp/jar/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/helloworld-component/entity/entities.xml b/helloworld-component/entity/entities.xml new file mode 100644 index 0000000..7259adc --- /dev/null +++ b/helloworld-component/entity/entities.xml @@ -0,0 +1,11 @@ + + + + + + + + + + \ No newline at end of file diff --git a/helloworld-component/lib/mysql-connector-java-5.1.47.jar b/helloworld-component/lib/mysql-connector-java-5.1.47.jar new file mode 100644 index 0000000..8816c7e Binary files /dev/null and b/helloworld-component/lib/mysql-connector-java-5.1.47.jar differ diff --git a/helloworld-component/service/helloworld.rest.xml b/helloworld-component/service/helloworld.rest.xml new file mode 100644 index 0000000..b56426b --- /dev/null +++ b/helloworld-component/service/helloworld.rest.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + diff --git a/helloworld-component/service/moqui/example/ExampleServices.xml b/helloworld-component/service/moqui/example/ExampleServices.xml new file mode 100644 index 0000000..480fcb2 --- /dev/null +++ b/helloworld-component/service/moqui/example/ExampleServices.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mantle-udm b/mantle-udm new file mode 160000 index 0000000..8e494b5 --- /dev/null +++ b/mantle-udm @@ -0,0 +1 @@ +Subproject commit 8e494b5e44d1144fc5da0567ce5cff102a3096f1 diff --git a/mantle-usl b/mantle-usl new file mode 160000 index 0000000..98a6fba --- /dev/null +++ b/mantle-usl @@ -0,0 +1 @@ +Subproject commit 98a6fbaaae4881c368efdc45a87daf1b52e12b28