I am new to Maven. Recently I have downloaded and installed Maven successfully on my Windows 8 machine. I am trying to use an API created by Twilio for sending text messages.
To use the Twilio API, Twilio requires that you have Maven installed on your machine. On the Twilio website there are setup instructions for the API.
I am using NetBeans. After installing Maven I do not know if there is any special integration that I must do to use Maven in NetBeans. Please give me some step by step instructions on what I need to do, that would be very helpful. Or, if anyone knows of a link that gives clear instructions to a new Maven user for API integration with NetBeans, that would be appreciated.
Thanks!
The easiest way to achieve this is to follow the steps described on the webpage http://www.twilio.com/docs/java/install#installation
Create a pom.xml file in the root of your project. Add the following dependency in the dependecies section.
<dependency>
<groupId>com.twilio.sdk</groupId>
<artifactId>twilio-java-sdk</artifactId>
<version>3.4.5</version>
</dependency>
This maven tutorial gives you a brief introduction to how to setup your maven project.
Put your own src-code in src/main/java, run mvn compile and you should be set to use the classes from Twilio.
git clone [email protected]:twilio/twilio-java cd twilio-java mvn install # Requires maven, download from http://maven.apache.org/download.html
is 'mvn' command available on the command prompt. You can check this by opening a new command prompt and type mvn
If you get a command not found, then you need to add mvn to the PATH
once you are able to find maven, then you can do "mvn install" in the twilio-java directory and twilio-java artifacts would get installed to the local maven repository- which would be /.m2/repository/
And then we could think of adding that artifact as a dependency to the maven project that you would be creating in NETBEANS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With