PDA

View Full Version : JSBuilder licenseText



lyallo
11 Nov 2009, 5:29 AM
Hi,

I suspect I may be misunderstanding something rather than there actually being a problem with JS Builder... anyway here goes:

When I run it against my js2b file everything goes fine, files are generated and they work great however all my source files are modified (the license text from the jsb2 file is inserted at the top):


/*!
* License Text
*/
It wouldn't be a problem but this keeps being added repeatedly to the top of my source files everytime i run JS Builder. I've tried leaving the licenseText value blank (licenseText:'') but that doesn't make a difference. Leaving the licenseText property out of the file just produces an error when running JS Bulder.

The top of my jsb2 file looks like this:


{
projectName: 'Test App',
deployDir: 'www',
licenseText: 'wibble',
pkgs: [{
...Any help would be appreciated.

Also, if anyone is interested I've written a basic VB.Net object for parsing jsb2 files and inserting <script> and <style> tags into pages.

Condor
11 Nov 2009, 6:14 AM
Correct, the current JSBuilder2 requires a licenseText in the .jsb2 file.

You would need to modify JSBuilder2.java and recompile if you don't want that (the source is included in the .jar file).

lyallo
11 Nov 2009, 8:36 AM
Thanks for the response, so am I right in thinking that it's supposed to behave like that (i.e. prepending the license text to each and every source file each time i run JS Builder)?

brookd
20 Nov 2009, 3:20 PM
I have the same problem, the licensetext gets added over and over again to the minified files. I end up with this in the header:




/*!
* logiforms 3.0.0 Copyright(c) 2009-2010 logiforms software inc.
*/
/*!
* logiforms 3.0.0 Copyright(c) 2009-2010 logiforms software inc.
*/
/*!
* logiforms 3.0.0 Copyright(c) 2009-2010 logiforms software inc.
*/
/*!
* logiforms 3.0.0 Copyright(c) 2009-2010 logiforms software inc.
*/
/*!
* logiforms 3.0.0 Copyright(c) 2009-2010 logiforms software inc.
*/
/*!
* logiforms 3.0.0 Copyright(c) 2009-2010 logiforms software inc.
*/
/*!
* logiforms 3.0.0 Copyright(c) 2009-2010 logiforms software inc.
*/
/*
* logiforms 3.0.0 Copyright(c) 2009-2010 logiforms software inc.
*/


This happens after running JSBuilder multiple times with the same build directory specified but only when you running a different build.

In my scenario, I've created an interface to run the builds,and you can select if you want to do a full build or select the individual packages to build. When you specify a smaller set of files to build in a subsequent execution of JSBuilder (to the same output dir), ALL existing minified files in the output directory and in *all* sub directories get the licensetext appended to them and it gets added over and over after every build.

I don't understand why it is doing this. It also, obviously, changes the modified date of all the other files in the output directory and sub directory.

I want to be able to run a build on one module, without all the other files getting this licensetext added to them and their modification dates getting changed.

This is very important for me because I am storing the last modified dates of all these files and using that value to control some caching. If each time I build a single module, all the last modified dates of all the other files change, thats not gonna work for me.

What are the chances of this getting fixed?

lyallo
20 Nov 2009, 5:53 PM
I see where I went wrong now... I was deploying my files back into the project's folder structure. As soon as i deploy to a separate folder the license text stops being added to the source files.

I'm assuming that once JSBuilder2 has joined and packed the scripts it then adds the license text header to everything it finds in the deployDir.

JEASIASINGUTT
17 Dec 2009, 11:01 AM
After trying to do a build of all of the yui-ext files with JSBuilder I get the following error from firefox:YAHOO.ext.util has no properties yui-ext-debug.js line 88,Line 88: YAHOO.ext.util.Browser = new functionHere is the build order I am using for yui-ext-debug.js:sourceElement.jssourceCompositeElement.jssourceDomHelper.jssourceEventManager.jssourceUpdateManager.jssourceCSS.jssourceJSON.jssourceDate.jssourceMixedCollection.jssourceState.jssourceBench.jssourceanimActor.jssourceanimAnimator.jssourcewidgetsSplitBar.jssourcewidgetsTabPanel.jssourcewidgetsToolbar.jssourcewidgetsResizable.jssourcewidgetsBasicDialog.jssourcewidgetsDatePicker.jssourcewidgetsTemplateView.jssourcegridGrid.jssourcegridGridView.jssourcegridAbstractColumnModel.jssourcegridDefaultColumnModel.jssourcedataAbstractDataModel.jssourcedataDefaultDataModel.jssourcegridSelectionModel.jssourcegridPagedGridView.jssourcegridGridDD.jssourcegridEditorGrid.jssourcegridEditorSelectionModel.js"sourcegrideditorCellEditor.js"sourcegrideditorCheckboxEditor.js"sourcegrideditorDateEditor.js"sourcegrideditorNumberEditor.js"sourcegrideditorSelectEditor.js"sourcegrideditorTextEditor.js"sourcedataLoadableDataModel.js"sourcedataJSONDataModel.js"sourcedataXMLDataModel.js"sourcelayoutLayoutManager.js"sourcelayoutBorderLayout.js"sourcelayoutLayoutRegion.js"sourcelayoutSplitLayoutRegion.js"sourcelayoutBorderLayoutRegions.js"sourcelayoutContentPanels.js"sourcelayoutLayoutStateManager.js"Does anyone have a clue why I am getting this error?

Condor
18 Dec 2009, 2:17 AM
yui-ext? That's what Ext was called before version 1.0!

What are you actually trying to build? And are you using JSBuilder or JSBuilder2?

(this thread is about JSBuilder2!)