Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <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">
- <modelVersion>4.0.0</modelVersion>
- <groupId>br.com.caelum.stella</groupId>
- <artifactId>caelum-stella</artifactId>
- <packaging>pom</packaging>
- <version>2.1.3</version>
- <name>Caelum Stella</name>
- <description>
- Caelum Stella is a set of validators, formatters and converters
- for Brazilian common ids like Zip codes, State codes, social ids
- and so on. Stella also provides adapters for JSF, Struts tag
- libs, JSP tag libs, Hibernate Validator and JS completion.
- </description>
- <url>http://stella.caelum.com.br</url>
- <organization>
- <name>Caelum</name>
- <url>http://www.caelum.com.br</url>
- </organization>
- <parent>
- <groupId>org.sonatype.oss</groupId>
- <artifactId>oss-parent</artifactId>
- <version>7</version>
- </parent>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
- <modules>
- <module>stella-core</module>
- <module>stella-bean-validation</module>
- <module>stella-hibernate-user-types</module>
- <module>stella-faces</module>
- <module>stella-boleto</module>
- <module>stella-frete</module>
- <!-- <module>stella-feriado</module> -->
- <!-- <module>stella-distribution</module> -->
- <module>examples/faces-example-1x</module>
- <module>examples/faces-example-2x</module>
- <module>examples/hibernate-persistence-example</module>
- <module>examples/vraptor-validator-example</module>
- <!--
- <module>examples/boleto-example</module>
- <module>examples/core-example</module>
- <module>examples/hibernate-seam-example</module>
- -->
- </modules>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.11</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jmock</groupId>
- <artifactId>jmock</artifactId>
- <version>2.4.0</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jmock</groupId>
- <artifactId>jmock-legacy</artifactId>
- <version>2.4.0</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>1.8.5</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jmock</groupId>
- <artifactId>jmock</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jmock</groupId>
- <artifactId>jmock-legacy</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>1.8.5</version>
- </dependency>
- </dependencies>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-javadoc</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <links>
- <link>
- http://java.sun.com/j2se/1.5/docs/api
- </link>
- </links>
- <encoding>utf-8</encoding>
- <charset>utf-8</charset>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-sources</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4.2</version>
- <configuration>
- <forkMode>once</forkMode>
- <printSummary>true</printSummary>
- <useFile>true</useFile>
- <skip>true</skip>
- <argLine>-Duser.language=pt -Duser.country=BR</argLine>
- <systemProperties>
- <property>
- <name>java.awt.headless</name>
- <value>true</value>
- </property>
- </systemProperties>
- </configuration>
- <executions>
- <execution>
- <id>run unit tests</id>
- <phase>test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <skip>false</skip>
- <excludes>
- <exclude>
- **/integration/**/*.java
- </exclude>
- </excludes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <!-- Setting eclipse code format options -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <version>2.8</version>
- <configuration>
- <additionalConfig>
- <file>
- <name>.settings/org.eclipse.core.resources.prefs</name>
- <content><![CDATA[eclipse.preferences.version=1${line.separator}encoding/<project>=UTF-8${line.separator}]]></content>
- </file>
- </additionalConfig>
- <workspace>${basedir}</workspace>
- <workspaceCodeStylesURL>
- http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-eclipse-plugin/src/optional/eclipse-config/maven-styles.xml
- </workspaceCodeStylesURL>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.8</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <version>2.1.2</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-2</version>
- <configuration>
- <descriptors>
- <descriptor>
- src/main/assembly/assembly-bin.xml
- </descriptor>
- <descriptor>
- src/main/assembly/assembly-src.xml
- </descriptor>
- </descriptors>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <developers>
- <developer>
- <id>fabiokung</id>
- <name>Fabio Kung</name>
- <email>fabio.kung@caelum.com.br</email>
- <organization>Caelum</organization>
- <organizationUrl>http://www.caelum.com.br</organizationUrl>
- <roles>
- <role>administrator</role>
- <role>developer</role>
- </roles>
- <timezone>-3</timezone>
- </developer>
- <developer>
- <id>peass</id>
- <name>Paulo Silveira</name>
- <email>paulo.silveira@caelum.com.br</email>
- <organization>Caelum</organization>
- <organizationUrl>http://www.caelum.com.br</organizationUrl>
- <roles>
- <role>project owner</role>
- <role>administrator</role>
- <role>developer</role>
- </roles>
- <timezone>-3</timezone>
- </developer>
- <developer>
- <id>Turini</id>
- <name>Rodrigo Turini</name>
- <email>rodrigo.turini@caelum.com.br</email>
- <organization>Caelum</organization>
- <organizationUrl>http://www.caelum.com.br</organizationUrl>
- <roles>
- <role>developer</role>
- </roles>
- <timezone>-3</timezone>
- </developer>
- <developer>
- <id>lucascs</id>
- <name>Lucas Cavalcanti</name>
- <email>lucas.cavalcanti@caelum.com.br</email>
- <organization>Caelum</organization>
- <organizationUrl>http://www.caelum.com.br</organizationUrl>
- <roles>
- <role>developer</role>
- </roles>
- <timezone>-3</timezone>
- </developer>
- <developer>
- <id>jonasabreu</id>
- <name>Jonas Abreu</name>
- <email>jonas.abreu@caelum.com.br</email>
- <organization>Caelum</organization>
- <organizationUrl>http://www.caelum.com.br</organizationUrl>
- <roles>
- <role>developer</role>
- </roles>
- <timezone>-3</timezone>
- </developer>
- <developer>
- <id>gui0rafa</id>
- <name>Guilherme Moreira</name>
- <email>guilherme.moreira@caelum.com.br</email>
- <organization>Caelum</organization>
- <organizationUrl>http://www.caelum.com.br</organizationUrl>
- <roles>
- <role>developer</role>
- </roles>
- <timezone>-3</timezone>
- </developer>
- <developer>
- <id>leobessa</id>
- <name>Leonardo Bessa</name>
- <email>leonardo.bessa@caelum.com.br</email>
- <organization>Caelum</organization>
- <organizationUrl>http://www.caelum.com.br</organizationUrl>
- <roles>
- <role>developer</role>
- </roles>
- <timezone>-3</timezone>
- </developer>
- <developer>
- <id>caires</id>
- <name>Caires Santos</name>
- <email>caires.santos@caelum.com.br</email>
- <organization>Caelum</organization>
- <organizationUrl>http://www.caelum.com.br</organizationUrl>
- <roles>
- <role>developer</role>
- </roles>
- <timezone>-3</timezone>
- </developer>
- <developer>
- <id>caueguerra</id>
- <name>Caue Haucke Porta Guerra</name>
- <email>caue.guerra@caelum.com.br</email>
- <organization>Caelum</organization>
- <organizationUrl>http://www.caelum.com.br</organizationUrl>
- <roles>
- <role>developer</role>
- </roles>
- <timezone>-3</timezone>
- </developer>
- <developer>
- <id>mariofts</id>
- <name>Mario do Amaral Gonçalves</name>
- <email>mario.amaral@caelum.com.br</email>
- <organization>Caelum</organization>
- <organizationUrl>http://www.caelum.com.br</organizationUrl>
- <roles>
- <role>developer</role>
- </roles>
- <timezone>-3</timezone>
- </developer>
- </developers>
- <contributors>
- <contributor>
- <name>Alberto Souza</name>
- <email>asouza@settech.com.br</email>
- <url>http://www.settech.com.br/blog</url>
- </contributor>
- <contributor>
- <name>Mateus Padro</name>
- <email>mateush.prado@gmail.com</email>
- </contributor>
- <contributor>
- <name>Rafael Carvalho</name>
- <email>rafael.c.carvalho@gmail.com</email>
- </contributor>
- </contributors>
- <licenses>
- <license>
- <name>Apache 2.0</name>
- <comments>Copyright Caelum</comments>
- <url>LICENSE.txt</url>
- </license>
- </licenses>
- <profiles>
- <profile>
- <id>integration</id>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <artifactId>
- maven-surefire-plugin
- </artifactId>
- <executions>
- <execution>
- <id>run integration tests</id>
- <phase>test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <skip>false</skip>
- <includes>
- <include>
- **/integration/**/*Test.java
- </include>
- </includes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- </profile>
- </profiles>
- <scm>
- <connection>scm:git:git://github.com/caelum/caelum-stella</connection>
- <developerConnection>scm:git:git@github.com:caelum/caelum-stella.git</developerConnection>
- <url>https://github.com/caelum/caelum-stella</url>
- </scm>
- <mailingLists>
- <mailingList>
- <name>Users list</name>
- <subscribe>
- http://lists.sourceforge.net/lists/listinfo/caelum-stella-users
- </subscribe>
- <unsubscribe>
- http://lists.sourceforge.net/lists/listinfo/caelum-stella-users
- </unsubscribe>
- <post>
- http://lists.sourceforge.net/lists/listinfo/caelum-stella-users
- </post>
- </mailingList>
- <mailingList>
- <name>Developers list</name>
- <subscribe>
- http://lists.sourceforge.net/lists/listinfo/caelum-stella-devel
- </subscribe>
- <unsubscribe>
- http://lists.sourceforge.net/lists/listinfo/caelum-stella-devel
- </unsubscribe>
- <post>
- http://lists.sourceforge.net/lists/listinfo/caelum-stella-devel
- </post>
- </mailingList>
- </mailingLists>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.8</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.8.1</version>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- <version>2.5</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- <version>2.2</version>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>changelog-maven-plugin</artifactId>
- <version>2.0-beta-1</version>
- </plugin>
- </plugins>
- </reporting>
- </project>
- package teste.teste2;
- import br.com.caelum.stella.boleto.Banco;
- import br.com.caelum.stella.boleto.Beneficiario;
- import br.com.caelum.stella.boleto.Boleto;
- import br.com.caelum.stella.boleto.Datas;
- import br.com.caelum.stella.boleto.Endereco;
- import br.com.caelum.stella.boleto.Pagador;
- import br.com.caelum.stella.boleto.bancos.BancoDoBrasil;
- import br.com.caelum.stella.boleto.bancos.Itau;
- import br.com.caelum.stella.boleto.transformer.GeradorDeBoleto;
- public class App
- {
- public static void main( String[] args )
- {
- Datas datas = Datas.novasDatas()
- .comDocumento(1, 5, 2008)
- .comProcessamento(1, 5, 2008)
- .comVencimento(2, 5, 2008);
- Endereco enderecoBeneficiario = Endereco.novoEndereco()
- .comLogradouro("Av das Empresas, 555")
- .comBairro("Bairro Grande")
- .comCep("01234-555")
- .comCidade("São Paulo")
- .comUf("SP");
- //Quem emite o boleto
- Beneficiario beneficiario = Beneficiario.novoBeneficiario()
- .comNomeBeneficiario("Fulano de Tal")
- .comAgencia("1824").comDigitoAgencia("4")
- .comCodigoBeneficiario("76000")
- .comDigitoCodigoBeneficiario("5")
- .comNumeroConvenio("1207113")
- .comCarteira("18")
- .comEndereco(enderecoBeneficiario)
- .comNossoNumero("9000206");
- Endereco enderecoPagador = Endereco.novoEndereco()
- .comLogradouro("Av dos testes, 111 apto 333")
- .comBairro("Bairro Teste")
- .comCep("01234-111")
- .comCidade("São Paulo")
- .comUf("SP");
- //Quem paga o boleto
- Pagador pagador = Pagador.novoPagador()
- .comNome("Fulano da Silva")
- .comDocumento("111.222.333-12")
- .comEndereco(enderecoPagador);
- // Banco banco = new Itau();
- Banco banco = new BancoDoBrasil();
- Boleto boleto = Boleto.novoBoleto()
- .comBanco(banco)
- .comDatas(datas)
- .comBeneficiario(beneficiario)
- .comPagador(pagador)
- .comValorBoleto("200.00")
- .comNumeroDoDocumento("1234")
- .comInstrucoes("instrucao 1", "instrucao 2", "instrucao 3", "instrucao 4", "instrucao 5")
- .comLocaisDePagamento("local 1", "local 2");
- GeradorDeBoleto gerador = new GeradorDeBoleto(boleto);
- // Para gerar um boleto em PDF
- gerador.geraPDF("BancoDoBrasil.pdf");
- // Para gerar um boleto em PNG
- gerador.geraPNG("BancoDoBrasil.png");
- // Para gerar um array de bytes a partir de um PDF
- byte[] bPDF = gerador.geraPDF();
- // Para gerar um array de bytes a partir de um PNG
- byte[] bPNG = gerador.geraPNG();
- }
- }
- Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JRException
- at teste.teste2.App.main(App.java:69)
- Caused by: java.lang.ClassNotFoundException: net.sf.jasperreports.engine.JRException
- at java.net.URLClassLoader.findClass(Unknown Source)
- at java.lang.ClassLoader.loadClass(Unknown Source)
- at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
- at java.lang.ClassLoader.loadClass(Unknown Source)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement