I am downloading fat jar as maven dependency. Fat jar has 2 jars inside say jar1.jar and jar2.jar. Now in my Project say P, is instantiating an object of class A which is present inside a jar1.jar which inside a fat jar, but i am getting compilation error. how can I resolve them during maven build
resolved this issue while creating fat jar. Added dependecies for jar1.jar and jar2.jar in pom.xml of fat.jar. Now in my project added dependency of .pom file instead of fat jar which added both jars instead of fat.jar. Also no need to create fat.jar
Related
I'm trying to compile a swift project with Bazel, version 4.2.1.
I have a main project with multiple CocoaPods submodules of my own installed. I have a WORKSPACE and a BUILD configuration file for the project and another WORKSPACE and BUILD for each submodule.
I add the secondary workspaces as local_repository in the main workspace. I create the submodule build with a swift_library and add it in the main build in deps.
If in a .swift file, located in the submodule, I create a variable "var dateIni: Date?" I get an error "error: cannot find type Date in scope". I can solve this with "import Foundation" but xcode doesn't need it, I would like to be able to compile in Bazel without having to do these SDK frameworks imports. Is there any way to solve this?
I can post code or explain it better if you need more information.
I am having a Xcode Project for which I am running SonarQube Analyzer. It is getting analyzed successfully for main Project but my problem is Sonar Qube is unable to analyzed dependency projects like Pods or Frameworks. So is there is anyway to include Pods or Frameworks too.
Here is the data of my sonar properties file for which I am using for running Sonar.
sonar.projectKey=PROJECT_IDENTIFIER
sonar.projectName=PROJECT_NAME
sonar.projectVersion=VERSION
sonar.sources=./PRODUCT_NAME
sonar.inclusions=**/*.m, **/*.h, **/*.swift
Thanks in advance...
You can simply use the sonar.sources=. which will analyze all the files and directory in project root directory
Use sonar.inclusions= & add paths of directories of your project.
Also see the pattern of paths handling in below link.
Example,
sonar.inclusions=<RootDirectoryName>/**/*
comment sonar.source line in property in case above line doesn't work at first.
https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/
I have an "aar" file that was generated using gradle with
apply plugin: 'com.android.library'
Now I want to use this aar library to create a cordova plugin. I unzip the aar file, get a "classes.jar" and put the jar into cordova's "libs" directory. My cordova project compiles without any problem, I can import and use classes in the jar file. But it crushed at run time with the following error
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/example/pkg/R$raw;
Package "com.example.pkg" is in my "classes.jar", but there is no class call "R$raw". What did I miss?
AAR files bundle not only source but also the libraries self contained Android resources. Take a look at the contents of an AAR bundle.
It appears the original AAR file you had contained some raw resources which are not included in the jar. You cannot package Android resources in a .jar file so your application is crashing when it needs to access the ID's generated for resources.
You can check this by opening up the original AAR file (it is simply a zip archive). Take a look under the res folder for any resources that are needed by the library.
Yes, extracting classes.jar is not going to work and it will throw runtimeexceptions...
What i did to solve the problem is:
After cordova project creation, adding platform, adding plugin is done.
Lets say the aar file are copied in libs folder. ( assume file name is cards.aar )
then in app build.gradle specify following and click sync project with Gradle files.
repositories { flatDir { dirs 'libs' } }
dependencies { compile(name:'cards', ext:'aar') }
It works for me!! but one drawback of this solution is .. you need to open the project from platform folder on Android Studio and add the above lines to your build.gradle
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)?
I am using Jasper Reports Plugin which is working fine, But when I try to export, i get Error.
URI
/cipg-backoffice/jasper/index
Class
net.sf.jasperreports.engine.util.JRFontNotFoundException
Message
Font 'Times New Roman' is not available to the JVM. See the Javadoc for more details.....
I then included the "DynamicJasper-core-fonts-1.0.jar" file into project's lib folder but the font is still not found.When I run 'grails list-plugins' I don't see the jar file listed.
Please tell how can I add fonts to the grails Project?
Try this
Run command : grails clean
Add you jar file in lib folder of your Grails App
Refresh dependencies
Run and test your application