Showing posts with label JAR. Show all posts
Showing posts with label JAR. Show all posts

Friday, April 29, 2016

GRALDE - add custom external *.jar to module dependencies

1. An example is map-visualiser project from github
2. Clone that project and make gradlew build for it
3. It will build its *.jar inside of /build/libs
4. Create libs dir inside your module
5. Copy/past that *.jar into your module libs dir 
6. Add these LOCs below into module's build.gradle and build the project:

repositories {
    mavenCentral()
    flatDir {
        dirs 'libs'    
    }
}

dependencies {    
    compile name: 'map-visualiser-1.0'
    testCompile group: 'junit', name: 'junit', version: '4.11'
}

Friday, October 25, 2013

Why maven doesn't downloads source and javadoc files

When you can not see any source code in your IDE such as Eclipse this most probably happen because your Maven (if you do use Maven) does not downloaded source jar file (e.g. filename-source.jar).

Maven does not downloads a source and javadoc jar files by default.

This option should be added to its settings file in ~/.m2/settings.xml file like this:

<profiles>
<profile>
    <id>downloadSources</id>
    <properties>
        <downloadSources>true</downloadSources>
        <downloadJavadocs>true</downloadJavadocs>           
    </properties>
</profile>
</profiles>

<activeProfiles>
  <activeProfile>downloadSources</activeProfile>
</activeProfiles>

Here is the link about this topic:
http://stackoverflow.com/questions/5780758/maven-always-download-sources-and-javadocs

Sunday, July 17, 2011

How to add JARs file to Eclipse

To be brief on it: if you want to add JAR file to Eclipse project do it trough adding it into Properties/Build Path/Libraries/Add JARs:

 If you want to know the different ways to add JARs file to your project in Eclipse check this link.