Skip to content

Commit

Permalink
Fix issue after assemble-scripts.xml renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktarPatsiaichuk committed Jul 25, 2023
1 parent 8c4f141 commit 11d30dd
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 11 deletions.
4 changes: 2 additions & 2 deletions framework/impl/assemble-scripts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

<filelist id="scriptaculous"
dir="${basedir}/src/main/java/${richfaces.scripts.path}/scriptaculous"
files="builder.js,effects.js,dragdrop.js,controls.js,slider.js,sound.js">
files="builder.js, effects.js, dragdrop.js, controls.js, slider.js, sound.js">
</filelist>
<filelist id="jquery"
dir="${basedir}/src/main/java/${richfaces.scripts.path}/jquery"
files="jquery-3.7.0-patched.js,jquery.richfaces.js">
files="jquery-3.7.0-patched.js, jquery.richfaces.js">
</filelist>

<target name="assemble" depends="depends" description="Concat JavaScripts files">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file is assembled by generatescript.xml
// This file is assembled by ANT script: assemble-scripts.xml
// As files concatenation: jquery-3.7.0-patched.js, jquery.richfaces.js
throw new Error("jquery.js was not assembled")
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file is assembled by generatescript.xml
// As files concatenation: builder.js,effects.js,dragdrop.js,controls.js,slider.js,sound.js
// This file is assembled by ANT script: assemble-scripts.xml
// As files concatenation: builder.js, effects.js, dragdrop.js, controls.js, slider.js, sound.js
throw new Error("scriptaculous.js was not assembled")
29 changes: 23 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ mvn deploy
# Notes
- Java `1.5.0_12` is used to build the project
`framework/impl/pom.xml`
```
```xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
Expand All @@ -71,9 +71,9 @@ mvn deploy
</plugin>
```

- `scriptaculous.js` is assembled as concat of files: `builder.js,effects.js,dragdrop.js,controls.js,slider.js,sound.js`
- `scriptaculous.js` is assembled as concat of files: `builder.js, effects.js, dragdrop.js, controls.js, slider.js, sound.js`
using Apache Ant script: `generatescript.xml`
```
```xml
<concat append="false"
binary="false"
destfile="${target.dir}/${richfaces.scripts.path}/scriptaculous/scriptaculous.js"
Expand All @@ -83,8 +83,10 @@ mvn deploy
</concat>
```

- JavaScript files are copied to `target` directory using Apache Ant script `generatescript.xml`
```
- `jquery.js` is assembled as concat of fies: `jquery-3.7.0-patched.js, jquery.richfaces.js`

- JavaScript files are copied to `target` directory using Apache Ant script `assemble-scripts.xml`
```xml
<copy todir="${target.dir}/${ajax4jsf.scripts.path}">
<fileset dir="${source.dir}/${ajax4jsf.scripts.path}" includes="**/*.js"/>
</copy>
Expand All @@ -95,7 +97,7 @@ mvn deploy

- JavaScript files are compressed and concat into `framework.pack.js` file using `org.richfaces.cdk:maven-javascript-plugin` plugin
`framework/impl/pom.xml`
```
```xml
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-javascript-plugin</artifactId>
Expand All @@ -109,4 +111,19 @@ mvn deploy
</dependencies>
</plugin>
```
- To switch `on` or `off` javascript files minification in `framework.pack.js` use option `<nomunge>false</nomunge>` or `<nomunge>true</nomunge>`
`framework/impl/pom.xml`
```xml
<executions>
<execution>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<nosuffix>false</nosuffix>
<!-- Uncomment to disable minification -->
<!-- <nomunge>true</nomunge> -->
<outputDirectory>${project.build.directory}/compressed/</outputDirectory>

```

0 comments on commit 11d30dd

Please sign in to comment.