"Directory creation was not successful for an unknown reason" error with Ant on Mac - macos

I have a project that builds and works on Windows but when I've brought it over to MacOS (Sierra) and set up Resin, Ant, and the rest of my project in IntelliJ the build is failing with a fairly ambiguous error:
build.xml:24: Directory /java/ant-build/classes creation was not successful for an unknown reason
at org.apache.tools.ant.taskdefs.Mkdir.execute(Mkdir.java:70)
Image of the full error message
At first I thought it was a permissions issue but I ran chmod 755 on the two directories and still am getting this error. I also tried updating to a newer version of Ant to replace IntelliJ's built in one with brew install ant#1.9 but that didn't help either.
Does anyone know of any changes that need to be made to projects when migrating from Windows to Mac? I'm the first one at the company to migrate this project to Mac so unfortunately the others don't know much about this.
Both are using:
IntelliJ IDE 2017.1.2
Built in IntelliJ Ant (1.9.4)
Resin 4.0.51

As the comments on the main post point out, this was a permissions issue where the ant was trying to build in the root directory
I had to change my build.properties file so the paths were point towards my $HOME directory.

Related

VSCode - Maven.archetype.generate fails

I get the below error message when I try to run the command in VSCode.
Command "maven.archetype.generate" fails. Cannot read property 'length' of undefined
As far as I can see, I have all plugins/extensions but cannot work out why it won't work. I found this but still cannot get it to work, however I can run apps for files created before I updated VSCode to version 1.32.1. I just cannot create new ones.
It's look like a bug.
Are you running the commands without any workspace or folder open?
Open a folder first, see if the issue still exists. If it's gone, I
suppose it's because of a potential NPE which is fixed by PR #276 but
not released yet. Please let me know the result.
It worked for me!
See more: https://github.com/Microsoft/vscode-maven/issues/277#issuecomment-473166245
From command line, type in:
mvn --version
to see if Maven is installed properly.
You need maven and jdk installed for maven to work.
Check out the “Before you begin” here:
https://code.visualstudio.com/docs/java/java-tutorial#_create-the-program
What is probably happening is that you do not have Maven or JDK installed, or you have not set the system variables properly. These installations are not the same as the plugins/extensions found in Visual Studio Code. These are in addition to that.

TeamCity unmet requirement: MSBuildTools12.0_x86_Path exists (Mac only)

I've seen this question asked but never specifically for Mac. My company is using TeamCity on a Mac Mini to do our iOS and android builds. We would use windows but, iOS builds require a Mac with Xcode. I have not been able to satisfy this condition. I can see that there are multiple versions of MSBuild (and Xbuild) already on my machine. Here is what I tried:
set an environment variable for MSBuildTools12.0_x86_Path using launchctl setenv (tried the bin directory of every instance of MSBuild existing on my machine), rebooted before checking TC
setting env.MSBuildTools12.0_x86_Path entry in buildAgent.properties
setting system.MSBuildTools12.0_x86_Path entry in buildAgent.properties
logging into TeamCity, going to my build configuration, going to the "parameters" tab and adding a new parameter for env.MSBuildTools12.0_x86_Path
After all of the above failed to satisfy the condition, I tried grabbing version 12 of MSBuild from a Windows machine, copying it to my Mac and pointing to its "Bin" directory instead, and repeating all bullets above.
The path was /Users/myusername/MSBuild/12.0/Bin. This bin directory contains MSBuild.exe, an MSBuild folder, a bunch of DLLs and more.
Again, this failed to change the outcome of the unmet condition in TeamCity. The frustrating thing is that TeamCity isn't giving me details. I don't know if it's still complaining that the path isn't even set (and where it is even looking for that path definition), or if it SEES that the path is set but it's not pointing to a folder it recognizes as MSBuild. I'm completely in the dark.
Does anyone have any guidance for me on this? I feel I've exhausted all paths to a solution. Thank you so much, in advance.
I figured it out on my own. On the Mac, you have to do an "MSBuild" runner type and pick "Mono xbuild 4.5" for the version. I used "x86" for the run platform and set a parameter for Mono4.5_x86 to point to xbuild. But it was trying to run the 64 bit version of mono and I found no way to set a command line argument for mono to tell it I want --arch=32 so I ended up having to link the mono executable to mono-sgen32 to get the build to finally work.

How to install Java 3D on Mac

I am taking a computer graphics course at my university. I am unable to create 3D graphics using Java since I do not have it properly installed. I downloaded the Java 3D API from Oracle. There is no installer included. Just the raw files j3dcore.jar, j3dutils.jar, and vecmath.jar as well as a few read me files. One of the read me files does contain a link that has instructions for the install. It says I must "Unzip Java 3D 1.5.1 into the "jre" directory of your JDK." Where is my JDK? I found my Java folder System > Library> Java > Extension and moved the files there because I read some other things online. I still get this error message in Eclipse when coding: "Access restriction: the method [whatever] from the type [whatever] is not accessible due to restriction on required library /System/Library/Java/Extensions/j3dutils.jar." But I have this file exactly where it says it should be.
Java 3d version 1.3 is pre-installed in Mac OS X. You shouldn't need to install anything. Perhaps try put things back the way they were?
If you want to upgrade to version Java 3D 1.5, you can download this installer: http://create.ife.no/vr/tools/j3d/java3d_1_5_2-macosx.pkg.zip
Firstly i would make sure that all those files have the correct permissions on them... based on the "Access restriction" error, it seems like the problem might have to do with that. From the looks of it, you have them installed in the right place (thats where mine is installed anyway)
this is what mine looks like:
Open a terminal, navigate to the directory you moved the jars to, and use the command:
chmod +x *.jar
+x is a file permission that allows execution of files as programs; files without this permission set will throw errors if you attempt to execute them. Java is technically a bytecode interpreter and jar files are interpreted rather than run, but it's possible that java checks the file permissions manually before loading classes from jars, in which case it would logically fail with an error similar to that which you're reporting.
If you are using eclipse then you can just download the 3d zip file. Move the jars into your project and right click on them. Select add build path. There should be 3 new jars in the referenced libraries.

Eclipse crashed, files got corrupted, now I can't install or uninstall EGit plugin

I am trying to configure Eclipse for Windows to meet my workplace's requirements, and in doing so the program ran out of memory and crashed. I am trying again with a fresh install (deleted all files I could find related to Eclipse and recopied).
I have a Git perspective available, but it is completely blank. Git is not listed in my current plugins, and not present in my plugins folder that I can find. If I try to install it, however, I am told it already exists.
Eclipse Version: 3.6.2
EGit Version: 1.1.0.201109151100-r
You can usually fix a lot of problems like this by doing a
$ eclipse -clean
You may have to add this to your eclipse.ini file.
If this doesn't work, start from a clean install (the eclipse directory & the workspace).

How fix building workspace error in Zend Studio?

How to fix building workspace problem in Zend Studio?
I'm trying to rename project and rename folder of project, however nothing:
Errors occurred during the build.
Errors running builder 'JavaScript
Validator' on project 'PROJECT'.
java.lang.NullPointerException
you must go to Project->Properties->Builders then disable ‘Javascript Validator’.
The bug has been fixed, you can either wait for the new release or apply the patch :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=318004
I had similar problem and mine is that the saving workspace process try to write in one of the file and it can't even it is available under .metadata directory.
This is how I did:
Open the .metadata directory and look for that particular file, yours can be different, so
change it to read and write for this file then restart eclipse.
It fixed the problem!.
My OS: Ubuntu 10.04 , Eclipse SDK 3.5.2
Hope this help...

Resources