Advertisement
Guest User

Untitled

a guest
Jan 28th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.94 KB | None | 0 0
  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  2. <modelVersion>4.0.0</modelVersion>
  3. <groupId>br.com.caelum.stella</groupId>
  4. <artifactId>caelum-stella</artifactId>
  5. <packaging>pom</packaging>
  6. <version>2.1.3</version>
  7. <name>Caelum Stella</name>
  8. <description>
  9. Caelum Stella is a set of validators, formatters and converters
  10. for Brazilian common ids like Zip codes, State codes, social ids
  11. and so on. Stella also provides adapters for JSF, Struts tag
  12. libs, JSP tag libs, Hibernate Validator and JS completion.
  13. </description>
  14. <url>http://stella.caelum.com.br</url>
  15. <organization>
  16. <name>Caelum</name>
  17. <url>http://www.caelum.com.br</url>
  18. </organization>
  19.  
  20. <parent>
  21. <groupId>org.sonatype.oss</groupId>
  22. <artifactId>oss-parent</artifactId>
  23. <version>7</version>
  24. </parent>
  25.  
  26. <properties>
  27. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  28. </properties>
  29.  
  30. <modules>
  31. <module>stella-core</module>
  32. <module>stella-bean-validation</module>
  33. <module>stella-hibernate-user-types</module>
  34. <module>stella-faces</module>
  35. <module>stella-boleto</module>
  36. <module>stella-frete</module>
  37. <!-- <module>stella-feriado</module> -->
  38. <!-- <module>stella-distribution</module> -->
  39. <module>examples/faces-example-1x</module>
  40. <module>examples/faces-example-2x</module>
  41. <module>examples/hibernate-persistence-example</module>
  42. <module>examples/vraptor-validator-example</module>
  43. <!--
  44. <module>examples/boleto-example</module>
  45. <module>examples/core-example</module>
  46. <module>examples/hibernate-seam-example</module>
  47. -->
  48. </modules>
  49.  
  50. <dependencyManagement>
  51. <dependencies>
  52. <dependency>
  53. <groupId>junit</groupId>
  54. <artifactId>junit</artifactId>
  55. <version>4.11</version>
  56. <scope>test</scope>
  57. </dependency>
  58. <dependency>
  59. <groupId>org.jmock</groupId>
  60. <artifactId>jmock</artifactId>
  61. <version>2.4.0</version>
  62. <scope>test</scope>
  63. </dependency>
  64. <dependency>
  65. <groupId>org.jmock</groupId>
  66. <artifactId>jmock-legacy</artifactId>
  67. <version>2.4.0</version>
  68. <scope>test</scope>
  69. </dependency>
  70. <dependency>
  71. <groupId>org.mockito</groupId>
  72. <artifactId>mockito-all</artifactId>
  73. <version>1.8.5</version>
  74. <scope>test</scope>
  75. </dependency>
  76. </dependencies>
  77. </dependencyManagement>
  78.  
  79. <dependencies>
  80. <dependency>
  81. <groupId>junit</groupId>
  82. <artifactId>junit</artifactId>
  83. </dependency>
  84. <dependency>
  85. <groupId>org.jmock</groupId>
  86. <artifactId>jmock</artifactId>
  87. </dependency>
  88. <dependency>
  89. <groupId>org.jmock</groupId>
  90. <artifactId>jmock-legacy</artifactId>
  91. </dependency>
  92. <dependency>
  93. <groupId>org.mockito</groupId>
  94. <artifactId>mockito-all</artifactId>
  95. <version>1.8.5</version>
  96. </dependency>
  97. </dependencies>
  98.  
  99. <build>
  100. <pluginManagement>
  101. <plugins>
  102. <plugin>
  103. <groupId>org.codehaus.mojo</groupId>
  104. <artifactId>cobertura-maven-plugin</artifactId>
  105. </plugin>
  106. <plugin>
  107. <groupId>org.apache.maven.plugins</groupId>
  108. <artifactId>maven-compiler-plugin</artifactId>
  109. <configuration>
  110. <source>1.6</source>
  111. <target>1.6</target>
  112. <encoding>UTF-8</encoding>
  113. </configuration>
  114. </plugin>
  115. <plugin>
  116. <groupId>org.apache.maven.plugins</groupId>
  117. <artifactId>maven-javadoc-plugin</artifactId>
  118. <executions>
  119. <execution>
  120. <id>attach-javadoc</id>
  121. <phase>package</phase>
  122. <goals>
  123. <goal>jar</goal>
  124. </goals>
  125. <configuration>
  126. <links>
  127. <link>
  128. http://java.sun.com/j2se/1.5/docs/api
  129. </link>
  130. </links>
  131. <encoding>utf-8</encoding>
  132. <charset>utf-8</charset>
  133. </configuration>
  134. </execution>
  135. </executions>
  136. </plugin>
  137. <plugin>
  138. <groupId>org.apache.maven.plugins</groupId>
  139. <artifactId>maven-source-plugin</artifactId>
  140. <executions>
  141. <execution>
  142. <id>attach-sources</id>
  143. <phase>package</phase>
  144. <goals>
  145. <goal>jar</goal>
  146. </goals>
  147. </execution>
  148. </executions>
  149. </plugin>
  150. <plugin>
  151. <artifactId>maven-surefire-plugin</artifactId>
  152. <version>2.4.2</version>
  153. <configuration>
  154. <forkMode>once</forkMode>
  155. <printSummary>true</printSummary>
  156. <useFile>true</useFile>
  157. <skip>true</skip>
  158. <argLine>-Duser.language=pt -Duser.country=BR</argLine>
  159. <systemProperties>
  160. <property>
  161. <name>java.awt.headless</name>
  162. <value>true</value>
  163. </property>
  164. </systemProperties>
  165. </configuration>
  166. <executions>
  167. <execution>
  168. <id>run unit tests</id>
  169. <phase>test</phase>
  170. <goals>
  171. <goal>test</goal>
  172. </goals>
  173. <configuration>
  174. <skip>false</skip>
  175. <excludes>
  176. <exclude>
  177. **/integration/**/*.java
  178. </exclude>
  179. </excludes>
  180. </configuration>
  181. </execution>
  182. </executions>
  183. </plugin>
  184. </plugins>
  185. </pluginManagement>
  186.  
  187. <plugins>
  188. <!-- Setting eclipse code format options -->
  189. <plugin>
  190. <groupId>org.apache.maven.plugins</groupId>
  191. <artifactId>maven-eclipse-plugin</artifactId>
  192. <version>2.8</version>
  193. <configuration>
  194. <additionalConfig>
  195. <file>
  196. <name>.settings/org.eclipse.core.resources.prefs</name>
  197. <content><![CDATA[eclipse.preferences.version=1${line.separator}encoding/<project>=UTF-8${line.separator}]]></content>
  198. </file>
  199. </additionalConfig>
  200. <workspace>${basedir}</workspace>
  201. <workspaceCodeStylesURL>
  202. http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-eclipse-plugin/src/optional/eclipse-config/maven-styles.xml
  203. </workspaceCodeStylesURL>
  204. </configuration>
  205. </plugin>
  206.  
  207. <plugin>
  208. <groupId>org.apache.maven.plugins</groupId>
  209. <artifactId>maven-compiler-plugin</artifactId>
  210. <version>2.3.2</version>
  211. </plugin>
  212. <plugin>
  213. <groupId>org.apache.maven.plugins</groupId>
  214. <artifactId>maven-surefire-plugin</artifactId>
  215. </plugin>
  216. <plugin>
  217. <groupId>org.apache.maven.plugins</groupId>
  218. <artifactId>maven-javadoc-plugin</artifactId>
  219. <version>2.8</version>
  220. </plugin>
  221. <plugin>
  222. <groupId>org.apache.maven.plugins</groupId>
  223. <artifactId>maven-source-plugin</artifactId>
  224. <version>2.1.2</version>
  225. </plugin>
  226.  
  227. <plugin>
  228. <groupId>org.apache.maven.plugins</groupId>
  229. <artifactId>maven-assembly-plugin</artifactId>
  230. <version>2.2-beta-2</version>
  231. <configuration>
  232. <descriptors>
  233. <descriptor>
  234. src/main/assembly/assembly-bin.xml
  235. </descriptor>
  236. <descriptor>
  237. src/main/assembly/assembly-src.xml
  238. </descriptor>
  239. </descriptors>
  240. </configuration>
  241. </plugin>
  242. </plugins>
  243. </build>
  244.  
  245. <developers>
  246. <developer>
  247. <id>fabiokung</id>
  248. <name>Fabio Kung</name>
  249. <email>fabio.kung@caelum.com.br</email>
  250. <organization>Caelum</organization>
  251. <organizationUrl>http://www.caelum.com.br</organizationUrl>
  252. <roles>
  253. <role>administrator</role>
  254. <role>developer</role>
  255. </roles>
  256. <timezone>-3</timezone>
  257. </developer>
  258. <developer>
  259. <id>peass</id>
  260. <name>Paulo Silveira</name>
  261. <email>paulo.silveira@caelum.com.br</email>
  262. <organization>Caelum</organization>
  263. <organizationUrl>http://www.caelum.com.br</organizationUrl>
  264. <roles>
  265. <role>project owner</role>
  266. <role>administrator</role>
  267. <role>developer</role>
  268. </roles>
  269. <timezone>-3</timezone>
  270. </developer>
  271. <developer>
  272. <id>Turini</id>
  273. <name>Rodrigo Turini</name>
  274. <email>rodrigo.turini@caelum.com.br</email>
  275. <organization>Caelum</organization>
  276. <organizationUrl>http://www.caelum.com.br</organizationUrl>
  277. <roles>
  278. <role>developer</role>
  279. </roles>
  280. <timezone>-3</timezone>
  281. </developer>
  282. <developer>
  283. <id>lucascs</id>
  284. <name>Lucas Cavalcanti</name>
  285. <email>lucas.cavalcanti@caelum.com.br</email>
  286. <organization>Caelum</organization>
  287. <organizationUrl>http://www.caelum.com.br</organizationUrl>
  288. <roles>
  289. <role>developer</role>
  290. </roles>
  291. <timezone>-3</timezone>
  292. </developer>
  293. <developer>
  294. <id>jonasabreu</id>
  295. <name>Jonas Abreu</name>
  296. <email>jonas.abreu@caelum.com.br</email>
  297. <organization>Caelum</organization>
  298. <organizationUrl>http://www.caelum.com.br</organizationUrl>
  299. <roles>
  300. <role>developer</role>
  301. </roles>
  302. <timezone>-3</timezone>
  303. </developer>
  304. <developer>
  305. <id>gui0rafa</id>
  306. <name>Guilherme Moreira</name>
  307. <email>guilherme.moreira@caelum.com.br</email>
  308. <organization>Caelum</organization>
  309. <organizationUrl>http://www.caelum.com.br</organizationUrl>
  310. <roles>
  311. <role>developer</role>
  312. </roles>
  313. <timezone>-3</timezone>
  314. </developer>
  315. <developer>
  316. <id>leobessa</id>
  317. <name>Leonardo Bessa</name>
  318. <email>leonardo.bessa@caelum.com.br</email>
  319. <organization>Caelum</organization>
  320. <organizationUrl>http://www.caelum.com.br</organizationUrl>
  321. <roles>
  322. <role>developer</role>
  323. </roles>
  324. <timezone>-3</timezone>
  325. </developer>
  326. <developer>
  327. <id>caires</id>
  328. <name>Caires Santos</name>
  329. <email>caires.santos@caelum.com.br</email>
  330. <organization>Caelum</organization>
  331. <organizationUrl>http://www.caelum.com.br</organizationUrl>
  332. <roles>
  333. <role>developer</role>
  334. </roles>
  335. <timezone>-3</timezone>
  336. </developer>
  337. <developer>
  338. <id>caueguerra</id>
  339. <name>Caue Haucke Porta Guerra</name>
  340. <email>caue.guerra@caelum.com.br</email>
  341. <organization>Caelum</organization>
  342. <organizationUrl>http://www.caelum.com.br</organizationUrl>
  343. <roles>
  344. <role>developer</role>
  345. </roles>
  346. <timezone>-3</timezone>
  347. </developer>
  348. <developer>
  349. <id>mariofts</id>
  350. <name>Mario do Amaral Gonçalves</name>
  351. <email>mario.amaral@caelum.com.br</email>
  352. <organization>Caelum</organization>
  353. <organizationUrl>http://www.caelum.com.br</organizationUrl>
  354. <roles>
  355. <role>developer</role>
  356. </roles>
  357. <timezone>-3</timezone>
  358. </developer>
  359. </developers>
  360.  
  361. <contributors>
  362. <contributor>
  363. <name>Alberto Souza</name>
  364. <email>asouza@settech.com.br</email>
  365. <url>http://www.settech.com.br/blog</url>
  366. </contributor>
  367. <contributor>
  368. <name>Mateus Padro</name>
  369. <email>mateush.prado@gmail.com</email>
  370. </contributor>
  371. <contributor>
  372. <name>Rafael Carvalho</name>
  373. <email>rafael.c.carvalho@gmail.com</email>
  374. </contributor>
  375. </contributors>
  376.  
  377. <licenses>
  378. <license>
  379. <name>Apache 2.0</name>
  380. <comments>Copyright Caelum</comments>
  381. <url>LICENSE.txt</url>
  382. </license>
  383. </licenses>
  384.  
  385. <profiles>
  386. <profile>
  387. <id>integration</id>
  388. <build>
  389. <pluginManagement>
  390. <plugins>
  391. <plugin>
  392. <artifactId>
  393. maven-surefire-plugin
  394. </artifactId>
  395. <executions>
  396. <execution>
  397. <id>run integration tests</id>
  398. <phase>test</phase>
  399. <goals>
  400. <goal>test</goal>
  401. </goals>
  402. <configuration>
  403. <skip>false</skip>
  404. <includes>
  405. <include>
  406. **/integration/**/*Test.java
  407. </include>
  408. </includes>
  409. </configuration>
  410. </execution>
  411. </executions>
  412. </plugin>
  413. </plugins>
  414. </pluginManagement>
  415. </build>
  416. </profile>
  417. </profiles>
  418.  
  419. <scm>
  420. <connection>scm:git:git://github.com/caelum/caelum-stella</connection>
  421. <developerConnection>scm:git:git@github.com:caelum/caelum-stella.git</developerConnection>
  422. <url>https://github.com/caelum/caelum-stella</url>
  423. </scm>
  424.  
  425. <mailingLists>
  426. <mailingList>
  427. <name>Users list</name>
  428. <subscribe>
  429. http://lists.sourceforge.net/lists/listinfo/caelum-stella-users
  430. </subscribe>
  431. <unsubscribe>
  432. http://lists.sourceforge.net/lists/listinfo/caelum-stella-users
  433. </unsubscribe>
  434. <post>
  435. http://lists.sourceforge.net/lists/listinfo/caelum-stella-users
  436. </post>
  437. </mailingList>
  438. <mailingList>
  439. <name>Developers list</name>
  440. <subscribe>
  441. http://lists.sourceforge.net/lists/listinfo/caelum-stella-devel
  442. </subscribe>
  443. <unsubscribe>
  444. http://lists.sourceforge.net/lists/listinfo/caelum-stella-devel
  445. </unsubscribe>
  446. <post>
  447. http://lists.sourceforge.net/lists/listinfo/caelum-stella-devel
  448. </post>
  449. </mailingList>
  450. </mailingLists>
  451.  
  452. <reporting>
  453. <plugins>
  454. <plugin>
  455. <groupId>org.apache.maven.plugins</groupId>
  456. <artifactId>maven-javadoc-plugin</artifactId>
  457. <version>2.8</version>
  458. </plugin>
  459. <plugin>
  460. <groupId>org.apache.maven.plugins</groupId>
  461. <artifactId>maven-surefire-plugin</artifactId>
  462. <version>2.8.1</version>
  463. </plugin>
  464. <plugin>
  465. <groupId>org.codehaus.mojo</groupId>
  466. <artifactId>cobertura-maven-plugin</artifactId>
  467. <version>2.5</version>
  468. </plugin>
  469. <plugin>
  470. <groupId>org.apache.maven.plugins</groupId>
  471. <artifactId>maven-jxr-plugin</artifactId>
  472. <version>2.2</version>
  473. </plugin>
  474. <plugin>
  475. <groupId>org.codehaus.mojo</groupId>
  476. <artifactId>changelog-maven-plugin</artifactId>
  477. <version>2.0-beta-1</version>
  478. </plugin>
  479. </plugins>
  480. </reporting>
  481.  
  482. </project>
  483.  
  484. package teste.teste2;
  485.  
  486. import br.com.caelum.stella.boleto.Banco;
  487. import br.com.caelum.stella.boleto.Beneficiario;
  488. import br.com.caelum.stella.boleto.Boleto;
  489. import br.com.caelum.stella.boleto.Datas;
  490. import br.com.caelum.stella.boleto.Endereco;
  491. import br.com.caelum.stella.boleto.Pagador;
  492. import br.com.caelum.stella.boleto.bancos.BancoDoBrasil;
  493. import br.com.caelum.stella.boleto.bancos.Itau;
  494. import br.com.caelum.stella.boleto.transformer.GeradorDeBoleto;
  495.  
  496. public class App
  497. {
  498. public static void main( String[] args )
  499. {
  500. Datas datas = Datas.novasDatas()
  501. .comDocumento(1, 5, 2008)
  502. .comProcessamento(1, 5, 2008)
  503. .comVencimento(2, 5, 2008);
  504.  
  505. Endereco enderecoBeneficiario = Endereco.novoEndereco()
  506. .comLogradouro("Av das Empresas, 555")
  507. .comBairro("Bairro Grande")
  508. .comCep("01234-555")
  509. .comCidade("São Paulo")
  510. .comUf("SP");
  511. //Quem emite o boleto
  512. Beneficiario beneficiario = Beneficiario.novoBeneficiario()
  513. .comNomeBeneficiario("Fulano de Tal")
  514. .comAgencia("1824").comDigitoAgencia("4")
  515. .comCodigoBeneficiario("76000")
  516. .comDigitoCodigoBeneficiario("5")
  517. .comNumeroConvenio("1207113")
  518. .comCarteira("18")
  519. .comEndereco(enderecoBeneficiario)
  520. .comNossoNumero("9000206");
  521.  
  522. Endereco enderecoPagador = Endereco.novoEndereco()
  523. .comLogradouro("Av dos testes, 111 apto 333")
  524. .comBairro("Bairro Teste")
  525. .comCep("01234-111")
  526. .comCidade("São Paulo")
  527. .comUf("SP");
  528.  
  529. //Quem paga o boleto
  530. Pagador pagador = Pagador.novoPagador()
  531. .comNome("Fulano da Silva")
  532. .comDocumento("111.222.333-12")
  533. .comEndereco(enderecoPagador);
  534.  
  535. // Banco banco = new Itau();
  536. Banco banco = new BancoDoBrasil();
  537.  
  538. Boleto boleto = Boleto.novoBoleto()
  539. .comBanco(banco)
  540. .comDatas(datas)
  541. .comBeneficiario(beneficiario)
  542. .comPagador(pagador)
  543. .comValorBoleto("200.00")
  544. .comNumeroDoDocumento("1234")
  545. .comInstrucoes("instrucao 1", "instrucao 2", "instrucao 3", "instrucao 4", "instrucao 5")
  546. .comLocaisDePagamento("local 1", "local 2");
  547.  
  548. GeradorDeBoleto gerador = new GeradorDeBoleto(boleto);
  549.  
  550. // Para gerar um boleto em PDF
  551. gerador.geraPDF("BancoDoBrasil.pdf");
  552.  
  553. // Para gerar um boleto em PNG
  554. gerador.geraPNG("BancoDoBrasil.png");
  555.  
  556. // Para gerar um array de bytes a partir de um PDF
  557. byte[] bPDF = gerador.geraPDF();
  558.  
  559. // Para gerar um array de bytes a partir de um PNG
  560. byte[] bPNG = gerador.geraPNG();
  561. }
  562.  
  563. }
  564.  
  565. Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JRException
  566. at teste.teste2.App.main(App.java:69)
  567. Caused by: java.lang.ClassNotFoundException: net.sf.jasperreports.engine.JRException
  568. at java.net.URLClassLoader.findClass(Unknown Source)
  569. at java.lang.ClassLoader.loadClass(Unknown Source)
  570. at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  571. at java.lang.ClassLoader.loadClass(Unknown Source)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement