mercredi 4 mars 2015

newbie trying to use Ant/Maven to build external library jar files for glassfish web app



I'm trying to use Authorize.net's java SDK found here...


http://ift.tt/1M8lsKi


My problem is that my Java experience is limited to coding java in a text editor, and I've never used Ant or Maven.


I know I need to import the folder net.authorize.* in my project, but I'm not sure how exactly to do this. So far, I've placed the net folder and all its contents into GlassFish 3.1.2's ~/glassfish3/glassfish/domains/domain1/lib/ folder, and restarted GlassFish. When I access a jsp that has an <%@ page import="net.authorize.sim.*" %> line, I get this error:



org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP
PWC6199: Generated servlet error:
package net.authorize.sim does not exist


Is this because I need to build the jar files?


Could someone walk a newbie through this process. From the command line, I can do yum info ant and it shows Available Packages for ant (x86_64).


The SDK webpage instructs:



To compile the SDK and create a jar...
$ ant jar


but what directory should I execute that line in, etc.?


I'm using java 1.7 on CentOS.




Aucun commentaire:

Enregistrer un commentaire