• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Use maven to create .JARS in a specific folder.

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I'm just installed maven and by installing maven I mean put the maven_home variable in my system variables path, and then check with maven --version in my CMD (I'm using windows). I currently working in am android project using Eclipse IDE, i wanted to install the maven for android plugin (m2e) in eclipse but it give me a error this one . So i came up with the idea since I already have maven installed in my computer I wanted to know if it is possible to create I don't know if this posible but to create a file.txt or whatever extension and in this file put this dependency

<dependency>
<groupId>com.nostra13.universalimageloader</groupId>
<artifactId>universal-image-loader</artifactId>
<version>1.9.4</version>
</dependency>

in that file and then in the windows cmd put some maven commands in the cmd pointing to the file that I created and then other commands that allow me to generate the jars from that dependency in a external folder in my pc and then i manually copy those jars in eclipse. Is this posible??
 
Ranch Hand
Posts: 417
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Search for pom.xml. It seems to be the file you are looking for.

https://maven.apache.org/guides/introduction/introduction-to-the-pom.html

Also, I remember one of my dev had trouble getting Maven to work in a Android project and ultimately gave up. I am not saying maven can't work in an Android project although, I am just sharing what I heard and I never had the time to try it myself.

In eclipse, you can just click on New->Project->Maven to create a new Maven project and this will take care of creating pom.xml for you. Also it will automagically download any needed jar files you mention in pom.xml and put them in your local maven repository so there is no need for you the download the jar files and put them into eclipse manually.
 
Jhon Parker
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

A.J. Côté wrote:Hello,

Search for pom.xml. It seems to be the file you are looking for.

https://maven.apache.org/guides/introduction/introduction-to-the-pom.html

Also, I remember one of my dev had trouble getting Maven to work in a Android project and ultimately gave up. I am not saying maven can't work in an Android project although, I am just sharing what I heard and I never had the time to try it myself.

In eclipse, you can just click on New->Project->Maven to create a new Maven project and this will take care of creating pom.xml for you. Also it will automagically download any needed jar files you mention in pom.xml and put them in your local maven repository so there is no need for you the download the jar files and put them into eclipse manually.



thnks for the info but I already had worked with Maven before in a Spring MVC application that had a POM.xml file I used to put my dependencies there click maven update and maven downloaded all the jars in a folder, the thing here is that I'm working in an Android project and to convert that project in a maven project i believe that you had to download m2e plugin with don't work for me, but in my project I can right click my libs folder and choose import JAR, so I was thinking in just download those JAR and put then in my project manually,

Is there a default POM.xml file that I could create and configure it to download the JARS in a external folder let's say a folder in "user/MyDocuments" or should I do this by throwing commands in cmd after creating the POM.xml file?

I'm thinking in using maven to download the JAR and not doing it myself it's because when I download some libraries they are not complete if I don't download them with maven.
 
A.J. Côté
Ranch Hand
Posts: 417
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

A.J. Côté wrote:Hello,
Also, I remember one of my dev had trouble getting Maven to work in a Android project and ultimately gave up. I am not saying maven can't work in an Android project although, I am just sharing what I heard and I never had the time to try it myself.



So basically, I can't help you if it is an Android eclipse project. The developer who works with me resorted to download and manage jars manually for our Android projects. It might be less cumbersome to do that with an Android project because we usually try to keep Android applications slim and rarely use more than 5 or 10 external jar files. Also, Android already includes their own slimmer version of a bunch of libraries not included in the standard jdk like apache http client and such.

As well, many third party libraries available specifically for Android do not require dependencies because they know the functionality is already included in Android. A good example I remember is xml-rpc for android that requires no dependencies while a typical xml-rpc install on the server requires some other jar files.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!