-
15 May 2012 1:14 PM #11
This is fairly trivial to do with maven. I am thinking that this is just an I do not know how to use Maven thread.
Whipped up something really quick to get you going on a Windows box, will post again when I implement a longer-term solution that include resource filtering.
I really do not see Sencha supporting a Maven build utility for Sencha Command. Perhaps the community could write an open source one if there is enough interest.
(Uses an environment variable called SENCHA_CMD pointing to the sencha.exe file)
Code:<profile> <id>CompileJavascript</id> <activation> <property> <name>env.SENCHA_CMD</name> </property> </activation> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2</version> <configuration> </configuration> <executions> <execution> <id>sencha-precompile</id> <phase>compile</phase> <goals> <goal>exec</goal> </goals> <configuration> <workingDirectory>${basedir}/src/main/webapp</workingDirectory> <executable>cmd.exe</executable> <arguments> <argument>/x</argument> <argument>/c</argument> <argument>${env.SENCHA_CMD}</argument> <argument>create</argument> <argument>jsb</argument> <argument>-a</argument> <argument>index-.html</argument> <argument>-p</argument> <argument>app.jsb3</argument> </arguments> </configuration> </execution> <execution> <id>sencha-compile</id> <phase>compile</phase> <goals> <goal>exec</goal> </goals> <configuration> <workingDirectory>${basedir}/src/main/webapp</workingDirectory> <executable>cmd.exe</executable> <arguments> <argument>/x</argument> <argument>/c</argument> <argument>${env.SENCHA_CMD}</argument> <argument>build</argument> <argument>-p</argument> <argument>app.jsb3</argument> <argument>-d</argument> <argument>.</argument> </arguments> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile>
-
16 May 2012 1:52 AM #12
Using the javascript toolbox there might be some more things to do. But I agree. The most important task is to invoke the sencha sdk.
Is there anyone that wants to join such a project? This project can use our repository, not even for extjs and the maven-plugin itself but for open sourced applications and classes.
I suggest to work on top of the codehaus javascript tools. This would help to automatically execute jsunit tests and other things.
-
7 Aug 2012 6:05 AM #13
Organizing development
Organizing development
Has anyone got a plan for how to cope with a smooth combination of development and production here?
In development, I can't imagine that anyone wants to be running the sencha build tool. I want to edit a javascript file, refresh my browser, and see what happens.
Then, later, I want to run the whole packaging process. So I seem to want a build structure in which there's a war project (in the maven sense) that just uses 'all' and no loader, and then later run an operation which runs the tooling.
-
7 Aug 2012 12:20 PM #14
I agree with bimargulies.
I also think while i am not an expert with maven that this is something that Sencha should be supporting "out of the box". Maven is practically the standard and full Maven support ( with examples) would help enhance ExtJS's "worthiness".
-
7 Aug 2012 12:37 PM #15
I have picked this back up this week, hopefully I will have more for you guys in a couple of days.
-
9 Aug 2012 1:29 PM #16
-
9 Aug 2012 4:07 PM #17
Frank,
until the tools themselves seem a bit less scary I'm not prepared to invest energy in mavenizing them. The word 'beta' in the version number seems all too accurate.
-
9 Aug 2012 4:29 PM #18
Hell, even if they just had a Maven plugin that could determine the order of the file dependencies, that would be something. Right now I have to create the final aggregated (and minified) application file with the yuicompressor-maven-plugin, which means I have to manually maintain a hardcoded, ordered list of files in my POMs.
-
9 Aug 2012 10:46 PM #19
Yeah I know.
I am building the app with an antfile, manually replacing the index.html with the prod version, deleting old files, and using an exclusion filter to include and exclude certian files in the WAR file.
Seems a bit.... "over the top" and complicated for something that should be fairly easy.
-
10 Aug 2012 5:04 AM #20
My requirements have grown quite large for the maven build, and it has been hell organizing all of this in a POM but I am making progress. The following list includes everything I want maven to be able to do:
- Be able to run jslint/jshint against development source
- Be able to filter an html template with the current extjs version and build
- Be able to run Sencha SDK tools to compile development source into a single JavaScript file
- Be able to run unit tests against development source in browser
- Be able to run unit tests headlessly against compiled source
- Be able to run integration screen tests against development source in browser
- Be able to run integration screen tests headlessly against compiled source
- Be able to configure Jasmine spec filter while testing
- Be able to execute Compass css build
- Be able to insert the maven project version into JavaScript source
I will try and share what I have but like others most of it seems hackish. The first step for everyone should be creating a maven project for ExtJS that they can then bring in as a dependency in builds.
frank - I have never written a maven plugin but could be interested in it, though I am not sure of my availability at the moment.
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote