Getting error when sending application to codename one build server - codenameone

I have not done any build on the server before, but I have created numerous applications on my system. When trying to send this particular application to the build server, it was giving error on netbeans. This was the error I was getting:
init:
deps-clean:
Updating property file: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\built-clean.properties
Deleting directory C:\Users\Olubori\Documents\NetBeansProjects\Interview\build
refresh-libs:
Deleting directory C:\Users\Olubori\Documents\NetBeansProjects\Interview\lib\impl
clean:
copy-desktop-override:
Created dir: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\classes
copy-libs:
deps-jar:
Updating property file: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\built-jar.properties
Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller code size and wider device support
Created dir: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\tmp
Compiling 1 source file to C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\tmp
Created dir: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\empty
Compiling 1 source file to C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\classes
warning: [options] bootstrap class path not set in conjunction with -source 1.5
1 warning
Copying 1 file to C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\classes
compile:
Created dir: C:\Users\Olubori\Documents\NetBeansProjects\Interview\dist
Copying 1 file to C:\Users\Olubori\Documents\NetBeansProjects\Interview\build
C:\Users\Olubori\Documents\NetBeansProjects\Interview\nbproject\build-impl.xml:990: The following error occurred while executing this line:
C:\Users\Olubori\Documents\NetBeansProjects\Interview\nbproject\build-impl.xml:834: copylibs doesn't support the "excludeFromCopy" attribute.
BUILD FAILED (total time: 0 seconds)
What could be the cause and how will I solve it?

Just remove that attribute from the XML build file, its a NetBeans bug: https://groups.google.com/d/msg/codenameone-discussions/X_HMILMsw_Y/jE0xDsL7nfAJ

Related

hugo builds with read-only source-tree

We would like to integrate hugo for documentation generation in our automake project.
The problem i'm facing is, that I would like to support
out-of-tree builds
builds from read-only source trees (which is related to out-of-tree builds)
out-of-tree builds kind of work with:
hugo --source $(srcdir) --destination $(abs_builddir)
However, when my source-tree is read-only (e.g. as tested by make distcheck), this fails with:
$ make
hugo --source ../../../hugo --destination "<<SRCDIR>>/project-0.1/_build/sub/hugo"
Error: add site dependencies: create deps: failed to create file caches from configuration: mkdir <<SRCDIR>>/project-0.1/hugo/resources: permission denied
Total in 1 ms
make: *** [Makefile:555: all] Error 255
Obviously, hugo tries to create it's "file caches" as a resources/ directory in the (read-only) <<SRCDIR>>.
How can I tell hugo to creat this "file caches" directory in an alternative (writeable) place?
I tried setting --cacheDir (to $(abs_builddir), but this didn't change anything.
apparently there's a resourceDir config-file option, but afaict that is not available via the cmdline (and I don't know whether it would actually help).

Builds not appearing in build server

I am building an android apk via 'Send Android build' and it shows that the build is successful. When I go to check the build server, it shows that it's empty.. Apparently with no build.
This is output in my console:
ant -f /home/falcon/NetBeansProjects/bizapp_mobile build-for-android-device
Generating GUI sources
No GUI Entries available
init:
deps-clean:
Updating property file: /home/falcon/NetBeansProjects/bizapp_mobile/build/built-clean.properties
Deleting directory /home/falcon/NetBeansProjects/bizapp_mobile/build
refresh-libs-impl:
Deleting directory /home/falcon/NetBeansProjects/bizapp_mobile/lib/impl
Deleting directory /home/falcon/NetBeansProjects/bizapp_mobile/native/internal_tmp
clean:
copy-android-override:
Created dir: /home/falcon/NetBeansProjects/bizapp_mobile/build/classes
copy-libs:
Copying 12 files to /home/falcon/NetBeansProjects/bizapp_mobile/build/classes
deps-jar:
Updating property file: /home/falcon/NetBeansProjects/bizapp_mobile/build/built-jar.properties
JavaFX Not loaded. Classpath=/home/falcon/.codenameone/designer_1.jar . Adding to classpath
Adding JavaFX to your project properties file at nbproject/project.properties
JavaFX should be correctly loaded the next time you run this project.
Restarting JVM with JavaFX in the classpath.
NOTE: If you are trying to debug the project, you'll need to cancel this run and try running debug on the project again. JavaFX should now be in your classpath.
JavaFX is loaded
Retina Scale: 1.0
Updating merge file /home/falcon/NetBeansProjects/bizapp_mobile/css/theme.css.merged
Input: /home/falcon/NetBeansProjects/bizapp_mobile/css/theme.css
Output: /home/falcon/NetBeansProjects/bizapp_mobile/src/theme.res
Acquiring lock on CSS checksums file /home/falcon/NetBeansProjects/bizapp_mobile/.cn1_css_checksums...
Lock obtained
File has not changed since last compile.
Releasing lock
CSS file successfully compiled. /home/falcon/NetBeansProjects/bizapp_mobile/src/theme.res
Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
code size and wider device support
Created dir: /home/falcon/NetBeansProjects/bizapp_mobile/build/tmp
Compiling 42 source files to /home/falcon/NetBeansProjects/bizapp_mobile/build/tmp
Created dir: /home/falcon/NetBeansProjects/bizapp_mobile/build/empty
Created dir: /home/falcon/NetBeansProjects/bizapp_mobile/build/generated-sources/ap-source-output
Compiling 42 source files to /home/falcon/NetBeansProjects/bizapp_mobile/build/classes
warning: [options] bootstrap class path not set in conjunction with -source 8
1 warning
Copying 2 files to /home/falcon/NetBeansProjects/bizapp_mobile/build/classes
compile:
Created dir: /home/falcon/NetBeansProjects/bizapp_mobile/dist
Copying 1 file to /home/falcon/NetBeansProjects/bizapp_mobile/build
Not copying library /home/falcon/NetBeansProjects/bizapp_mobile/override , it's a directory.
Not copying library /home/falcon/NetBeansProjects/bizapp_mobile/lib/impl/cls , it's a directory.
Not copying library /home/falcon/NetBeansProjects/bizapp_mobile/lib/impl/stubs , it's a directory.
Not copying library /home/falcon/NetBeansProjects/bizapp_mobile/${cn1.javafx.path} , it can't be read.
Not copying library /home/falcon/NetBeansProjects/bizapp_mobile/native/internal_tmp , it can't be read.
Copy libraries to /home/falcon/NetBeansProjects/bizapp_mobile/dist/lib.
Building jar: /home/falcon/NetBeansProjects/bizapp_mobile/dist/BizApp.jar
To run this application from the command line without Ant, try:
java -jar "/home/falcon/NetBeansProjects/bizapp_mobile/dist/BizApp.jar"
Created dir: /home/falcon/NetBeansProjects/bizapp_mobile/native/internal_tmp
jar:
clean-override:
build-for-android-device:
BUILD SUCCESSFUL (total time: 11 seconds)
Where could I be going wrong?
EDIT
Now this is confusing...
When I ran 'Send Android build' when my PC is connected to internet, it gives that message I posted before.
So accidentally, I ran 'Send Android build' while my PC was offline and it passed that point and it showed me this pop up:
Now.. once I this pop-up shows, that's when I connect to internet and everything will flow as supposed to.
So its like, if I have internet connected right from the start, it isn't successful but if I connect to internet after showing me the popup of an invalid Android certificate, everything will work fine and the build will be in the build server.
But is causing this now?

How to attach CodenameOne sources to my project?

I wanted to dive into CN1 soures. I've followed this and this tutorial with git. However in NetBeans when I ctrl-click on a CN1 object it shows "Showing generated source file. No sources are attached to class' JAR file.". If I attach the sources I've just downloaded ie "CodenameOne/CodenameOne/src" the sources are still unfound!
I tried to clean and build the project but errors appeared :
Building jar: /home/pathTo/CodenameOneSRC/CodenameOne/CodenameOne/dist/CodenameOne.jar
CodenameOne.jar:
JavaSE.init:
JavaSE.deps-jar:
Created dir: /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build
Updating property file: /home/pathTo/myProject/build/built-jar.properties
Created dir: /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build/classes
Created dir: /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build/empty
Created dir: /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build/generated-sources/ap-source-output
Compiling 21 source files to /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build/classes
warning: [options] bootstrap class path not set in conjunction with -source 1.7
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java:115: error: package com.jhlabs.image does not exist
import com.jhlabs.image.GaussianFilter;
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java:8757: error: cannot find symbol
GaussianFilter gf = new GaussianFilter(radius);
symbol: class GaussianFilter
location: class JavaSEPort
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java:8757: error: cannot find symbol
GaussianFilter gf = new GaussianFilter(radius);
symbol: class GaussianFilter location: class JavaSEPort
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
1 warning
/home/pathTo/myProject/nbproject/build-impl.xml:914: The following error occurred while executing this line:
/home/pathTo/myProject/nbproject/build-impl.xml:1445: The following error occurred while executing this line:
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/nbproject/build-impl.xml:937: The following error occurred while executing this line:
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/nbproject/build-impl.xml:269: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 14 seconds)
Furthermore the project cannot be run anymore because the main class is not found (although I added the ports/JavaSE.jar in the run section).
What can I do to correctly attach sources and make change to CN1 source code ?
Any help appreciated,
Regards
You need the cn1-binaries project and need to make sure the paths within the JavaSE project lead to valid locations within that project.
E.g. GaussianFilter is defined within Filters.jar that resides in that project.

How to fix CodenameOne build upload error

I have been running into some issues when trying to submit a build to the server. Every time I try to submit it, it fails. Here's the output of the process :
ant -f /home/darklord/NetBeansProjects/DashboardFAES build-for-android-device
No GUI Entries available
init:
deps-clean:
Updating property file: /home/darklord/NetBeansProjects/DashboardFAES/build/built-clean.properties
Deleting directory /home/darklord/NetBeansProjects/DashboardFAES/build
refresh-libs:
Deleting directory /home/darklord/NetBeansProjects/DashboardFAES/lib/impl
clean:
copy-android-override:
Created dir: /home/darklord/NetBeansProjects/DashboardFAES/build/classes
copy-libs:
deps-jar:
Updating property file: /home/darklord/NetBeansProjects/DashboardFAES/build/built-jar.properties
Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
code size and wider device support
Created dir: /home/darklord/NetBeansProjects/DashboardFAES/build/tmp
Compiling 13 source files to /home/darklord/NetBeansProjects/DashboardFAES/build/tmp
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Created dir: /home/darklord/NetBeansProjects/DashboardFAES/build/empty
Created dir: /home/darklord/NetBeansProjects/DashboardFAES/build/generated-sources/ap-source-output
Compiling 13 source files to /home/darklord/NetBeansProjects/DashboardFAES/build/classes
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Copying 1 file to /home/darklord/NetBeansProjects/DashboardFAES/build/classes
Copied 2 empty directories to 2 empty directories under /home/darklord/NetBeansProjects/DashboardFAES/build/classes
compile:
Created dir: /home/darklord/NetBeansProjects/DashboardFAES/dist
Copying 1 file to /home/darklord/NetBeansProjects/DashboardFAES/build
Not copying library /home/darklord/NetBeansProjects/DashboardFAES/override , it's a directory.
Not copying library /home/darklord/NetBeansProjects/DashboardFAES/lib/impl/cls , it's a directory.
Not copying library /home/darklord/NetBeansProjects/DashboardFAES/lib/impl/stubs , it's a directory.
Not copying library /home/darklord/NetBeansProjects/DashboardFAES/native/internal_tmp , it's a directory.
Copy libraries to /home/darklord/NetBeansProjects/DashboardFAES/dist/lib.
Building jar: /home/darklord/NetBeansProjects/DashboardFAES/dist/DashboardFAES.jar
To run this application from the command line without Ant, try:
java -jar "/home/darklord/NetBeansProjects/DashboardFAES/dist/DashboardFAES.jar"
jar:
clean-override:
build-for-android-device:
You sent an android build without submitting a keystore. Notice that you will receive a build that is inappropriate for distribution (although it could be used for debugging purposes). For further details read http://www.codenameone.com/signing.html
Sending build request to the server, notice that the build might take a while to complete!
Sending build to account: mysuperaddress#gmail.com
Response message from server is: OK
Server provided no further details
java.io.IOException: An upload error occured - check that you have enough build credits on the server
at com.codename1.build.client.BuildProcess.sendS3Build(BuildProcess.java:410)
at com.codename1.build.client.BuildProcess.sendRequestToServer(BuildProcess.java:432)
at com.codename1.build.client.CodeNameOneBuildTask.execute(CodeNameOneBuildTask.java:436)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
/home/darklord/NetBeansProjects/DashboardFAES/build.xml:300: Error in server build process
BUILD FAILED (total time: 1 minute 55 seconds)
Please help me out !
In 9 times out of 10 it means you ran out of build credits for this month which are reset every month. Notice that you can see those in the subscription tab.
In 9 times out of the remainder this is due to a bad connection/proxy configuration. You need to configure the Java proxy as well as the main process.
In the last 1 percent of the cases something might have went wrong in which case I suggest contacting us via one of our support channels.

Codename one build error with new Netbeans installation

I recently starting using a new Mac for development, and I have a cn1 app I've been working on on a Windows machine for a while. I installed Netbeans and the cn1 plugin, but I can't run the project or send a build. The error I get is this:
ant -f /Users/yaakov/Development/workspace/medonline_cn1 build-for-android-device
No GUI Entries available
init:
deps-clean:
Updating property file: /Users/yaakov/Development/workspace/medonline_cn1/build/built-clean.properties
Deleting directory /Users/yaakov/Development/workspace/medonline_cn1/build
refresh-libs:
Deleting directory /Users/yaakov/Development/workspace/medonline_cn1/lib/impl
clean:
copy-android-override:
Created dir: /Users/yaakov/Development/workspace/medonline_cn1/build/classes
Copying 8 files to /Users/yaakov/Development/workspace/medonline_cn1/build/classes
copy-libs:
Copying 96 files to /Users/yaakov/Development/workspace/medonline_cn1/build/classes
deps-jar:
Updating property file: /Users/yaakov/Development/workspace/medonline_cn1/build/built-jar.properties
compile-css:
/Users/yaakov/Development/workspace/medonline_cn1/build.xml:37: Could not find designer_1.jar file at path /Users/yaakov/.codenameone/designer_1.jar
BUILD FAILED (total time: 1 second)
The directory /Users/yaakov/.codenameone doesn't even exist. There is /Users/yaakov/.cn1 directory, however, but it's empty. The project is a GUI builder project. I'm running Java 8.
Assuming you installed the Codename One plugin on NetBeans just double click the res file. This will launch the designer and create that directory. Everything should work as expected after that.

Resources