Netbeans 11 does not copy libs into dist folder - ant

I want to have a lib folder with all dependent libraries in the dist folder when I create my Netbeans-Project (with Ant and java 11).
I have all my libs within the project at Libraries (you can see them at Project->Properties->Libraries under Classpath) and I also have the checkbox "Copy Dependent Libraries" at Project->Properties->Build->Packaging enabled
I thought the checkbox enables copylibs, but there is no lib folder.

It's a NetBeans 9.0-11.0 bug.
https://issues.apache.org/jira/browse/NETBEANS-1097
There is a work-around in there.
Basically in your build-impl.xml file, delete this after <condition property="do.mkdist">:
<not>
<istrue value="${modules.supported.internal}"/>
</not>

On one of my NetBeans 11 projects showed the same problem that in the dist folder no lib subfolder was created during build. The project was using JDK12. After i changed Project properties->Sources->Source/Binary Format to JDK8, the dist/lib folder was created and populated.

Related

Using agvtool with multiple .xcodeproject files in one directory

I have tried using agvtool for ios build versionining. It works great when there is a single .xcodeproj file in the directory. In my case, our project structure is such that it has 4 .xcodeproj files in a single directory. When firing agvtool command in this directory it throws error message, 'agvtool does not work with multiple projects in the same directory'. Anyone has any idea how can I make agvtool work with this folder structure?
For people finding this post and using Fastlane, I just wanted to tell about the plugin https://github.com/SiarheiFedartsou/fastlane-plugin-versioning which have a increment_version_number_in_plist command which does not use agvtool (and support multiple .xcodeproj files in a single folder.
You just need to install the plugin above and replace your increment_version_number action with increment_version_number_in_plist .. they have a very similar contract.
For me, there were actually 2 xcode project files. i.e. projectName.xcodeproj and projectNameModule.xcodeproj. That happened as I removed some commits where we updated the project name from projectName to projectNameModule. For some reason even after reverting those name changes, the project *Module.xcodeproj and *Module.xcworkspace files were still existing.
I just deleted those unused files and it fixed the issue for me.

How to change the name of the pub packages folder?

I have a little problem with developing. For my projects I use the IDE, which has some folder layout conventions. Now I started to work with dart, but the Pub Package Layout Conventions seems not to allow me to change the name of the "packages" folder to "applications".
Is there any way, how to change the Pub Package Layout Conventions in the settings file in sdk? My goal is, that running "pub get" downloads dependencies to another folder than packages folder.
You can't rename the packages folder.

Xcode dependencies build folders for different schemas

My project depends on several sub-projects (static libraries) which configured properly and put their .h file in place (using Copy public headers build phase). All of sub-projects have two configurations: Debug and Release.
In my main project I have several configurations. When I chose configuration that differs from Debug or Release, the project fails to build as it can't find my dependencies. And I know why - for all the dependencies, Release configuration was invoked and all the dependencies' products were places in the Release-iphoneos folder, whereas main project by default is seeking for dependencies in its' $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) folder which eventually resolves into <Target Name>-iphoneos. The question here - is how should I force Xcode to place dependencies' products into the correct build folder, dictated by the main project (i.e. <Target Name>-iphoneos)?

how to use external jar file in blackberry eclipse plugin

I have a jar file which contains .cod,.cso and .csl files.I need to use the jar file in my blackberry project.I added the jar file to build path of my main project.It was giving the error "Cannot start project has verification errors". I preverified the jar file and added to the build path and exported the jar file(Right click on project -> Libraries ->Order and Export).When I export the jar file the project is not compiling.Can anyone suggest me to add the external jar file to my project.
regards
Right click on project -> Build Path -> Configure Build Path -> Libraries -> Add external Jar file ->and check the jar file you have added in the Order and Export Tab. And press ok .
Or you can also use a library to add the jar to your project do it like this way.
First make a folder lib in your project.
Right-click your project > Properties
Java Build Path > Libraries > Add JARs… > Choose the JAR files in the “lib” folder
Java Build Path > Order and Export > Check the JAR files. and then ok. may be this will help you

Should I git ignore xcodeproject/project.pbxproj file?

in a XCode project, I offen got xcodeproject/project.pbxproj file changed, but useless info for me, it for compile.
Should I git ignore this file and xcodeproject/projectxworkspace/username.xcuserdata/UserInterfaceState.xcuserstate file?
Update in the light of Swift Package Manager: If you're building a project as a Swift package - you should definitely ignore this file as it can be generated using file system as source of truth. You can do that by using the following command:
$ cd ~/Projects/MyProjectFolder/
$ swift package generate-xcodeproj
For non-SwiftPM answer - see below.
This file holds the list of all the files in the project, settings of targets and which files belong to which targets. It's probably the meatiest file in project bundle. You should not ignore this file. There are few points for this:
You may not want to work on this project alone or;
You're planning on working on project from different machines;
You'll want to share your code base with others;
That is the only file that you want in your repos from the xcodeproj bundle. That file holds all of the info for targets files and build settings.
Unfortunately, if your Build Settings includes code signing, you have to re-enter your code-signing entity after every "git pull" if another team member has changed it. It seems to me this info should be in the user settings, not the global pbxproj file.
project.pbxproj is an important file in the Xcode configuration bundle. It is responsible for maintaining references to all of the linked files and their groupings, linked frameworks, and most importantly, the project’s build settings. Because of this, we cannot exclude project.pbxproj from version control.
Here is my general .gitignore for my Xcode Project.
# OS X Finder
.DS_Store
# Xcode per-user config
*.mode1
*.mode1v3
*.mode2v3
*.perspective
*.perspectivev3
*.pbxuser
*.xcworkspace
xcuserdata
# Build products
build/
*.o
*.LinkFileList
*.hmap
# Automatic backup files
*~.nib/
*.swp
*~
*.dat
*.dep
If you exclude project.pbxproj Jenkins builds will fail. So this is important if you use Jenkins.
You can use Xcodegen to generate a pbxproj out of a YAML project specification file then you can ignore pbxproj in git and generate them every time you need.
I have already used Xcodegen on a second project which has a modular architecture (many pbxprojs) and more then 8 developers is working on it.
https://github.com/yonaskolb/XcodeGen
Hope it helps.
I found that I also need to preserve the xcworkspace file(s). If didn't, project with a sub-project broke.

Resources