Results 1 to 6 of 6

Thread: Sencha Cmd for 6.5 no longer builds using ANT

  1. #1
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    12

    Exclamation Sencha Cmd for 6.5 no longer builds using ANT

    Prior to the new release of 6.5 we have been able to build our Extjs applications without fail. We currently use a Continuous Integration server that allows us to check in our code and do an automated build. That server uses a farm of servers that will push our code as well as the ExtJS framework. It then uses a batch script that will execute the build using ANT scripts. None of our build servers require the installation of Sencha Cmd. We simply push the command folder and Extjs framework and it works flawlessly. We assumed we could do that with 6.5. We assumed that all that we would need to do would be to update the required build properties (e.g. cmd.dir, ext.dir, etc..) to point to the new framework. Unfortunately, that did not work. It appears that 6.5 revamped the build process and eliminated the ".sencha" files. This could be a part of the failure. I have a feeling that the sencha.jar file used in the process was not updated. When we build we now get the following:

    C:\Sencha\SenchaCmd\6.5.0.180\6.5.0.180\ant\build\app\init-impl.xml:63: java.lang.NullPointerException
    at com.sencha.command.environment.AppOrPackageEnvironment.loadFrameworkConfig(AppOrPackageEnvironment.java:115)
    at com.sencha.command.environment.AppEnvironment.<init>(AppEnvironment.java:51)
    at com.sencha.command.environment.BuildEnvironment.load(BuildEnvironment.java:107)
    at com.sencha.command.environment.BuildEnvironment.load(BuildEnvironment.java:131)
    at com.sencha.command.environment.BuildEnvironment.load(BuildEnvironment.java:77)
    at com.sencha.command.environment.BuildEnvironment.load(BuildEnvironment.java:83)
    at com.sencha.ant.InitTask.doExecute(InitTask.java:75)
    at com.sencha.ant.BaseAntTask.execute(BaseAntTask.java:34)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440)
    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.Main.runBuild(Main.java:851)
    at org.apache.tools.ant.Main.startAnt(Main.java:235)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

    Please note that our applications builds great when building via the Windows Command prompt on a machine with Sencha Cmd installed. It just does not build using ANT any longer.

    Any suggestions? I created a ticket over a week ago but have not received any tangible response. If you could tell me what I need to add to my ANT scripts (i.e. build.xml) to enable debugging, I'd probably be able to figure it out. Or if you could provide the sencha.jar source I could probably fix it for you

  2. #2
    Sencha - Engineering israelroldan's Avatar
    Join Date
    Nov 2011
    Location
    The Netherlands
    Posts
    395

    Default

    We assumed that all that we would need to do would be to update the required build properties (e.g. cmd.dir, ext.dir, etc..) to point to the new framework.
    This is where the problem may be coming from. Take a look at your workspace.json file. From the looks of it, the app is not able to find the framework files or the files are not the right ones (there may be a package.json file in that directory?).
    Israel Roldán | Senior Software Engineer (Framework tools)

  3. #3
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    12

    Default

    Quote Originally Posted by israelroldan View Post
    This is where the problem may be coming from. Take a look at your workspace.json file. From the looks of it, the app is not able to find the framework files or the files are not the right ones (there may be a package.json file in that directory?).
    That got me in the right direction. I had to add properties in my ANT build to point to the new cmd.dir, workspace.build.dir, and app.output.base. Once these were set I was able to build. I also had to up the memory in my batch script. It appears the new build uses a significant amount more than the old. For those interested, before executing the ANT line you'll need to set the memory. I used 1g via the following:

    • set ANT_OPTS=-Xmx1g

  4. #4
    Sencha Premium User wemerson.januario's Avatar
    Join Date
    Nov 2008
    Location
    Goiânia - GO, Brazil
    Posts
    898

    Default

    I also could see how build process in 6.5.x is consuming memory. How to set this ant_opts in windows?

    @Sencha about memory issues. Are you working on solution?
    Wemerson Januario @JanuarioCoder
    Novanti Tecnologia, Sencha MVP/ Ext JS Consultant
    ____________________________________________
    Hire me on UpWork:

    GitHub
    https://github.com/wemersonjanuario

    Treinamento e Consultoria Ext JS. QUALIFIQUE-SE JÁ!

  5. #5
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    12

    Default

    I kick off the build process via a batch script (build.bat). I added the line set ANT_OPTS=-Xmx1g before the line that executed ANT. Please note that 1g of memory may be overkill. I haven't profiled the process to see exactly how much is needed.

  6. #6
    Sencha Premium User jvandemerwe's Avatar
    Join Date
    Apr 2009
    Location
    Raalte, Netherlands
    Posts
    260

    Default

    Quote Originally Posted by jwciii View Post
    That got me in the right direction. I had to add properties in my ANT build to point to the new cmd.dir, workspace.build.dir, and app.output.base. Once these were set I was able to build. I also had to up the memory in my batch script. It appears the new build uses a significant amount more than the old. For those interested, before executing the ANT line you'll need to set the memory. I used 1g via the following:

    • set ANT_OPTS=-Xmx1g
    In what file exactly do I have to make those changes?

Similar Threads

  1. Replies: 4
    Last Post: 1 Feb 2017, 12:10 AM
  2. Gradle with Sencha CMD builds
    By kprmca in forum Sencha Cmd
    Replies: 1
    Last Post: 8 Aug 2014, 3:32 PM
  3. Sencha builds
    By jfrapper in forum Sencha Touch 2.x: Q&A
    Replies: 3
    Last Post: 9 Aug 2012, 6:46 AM
  4. sencha-touch-2.0.1 and Sencha Command v2.0.2 - creating builds
    By kgowdhaman in forum Sencha Touch 2.x: Q&A
    Replies: 7
    Last Post: 5 Jun 2012, 10:49 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •