Rev 2001 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2001 | es | 1 | |
2 | tomcat.home=C:/Users/jmachado/Documents/workspace/apache-tomcat-9.0.0.M6 |
||
3 | #tomcat.common.lib=${tomcat.home}/common/lib |
||
4 | #tomcat.server.lib=${tomcat.home}/server/lib |
||
5 | tomcat.common.lib=${tomcat.home}/lib |
||
6 | tomcat.server.lib=${tomcat.home}/lib |
||
7 | tomcat.manager=http://localhost:8080/manager |
||
8 | |||
9 | |||
10 | tomcat.user=admin |
||
11 | tomcat.pass=admin |
||
12 | tomcat.war.filename=${app.path}.war |
||
13 | |||
14 | |||
15 | #example for ROOT: |
||
16 | # tomcat.context.path.install=/ |
||
17 | # web.path= |
||
18 | # |
||
19 | #example for /mitra: |
||
20 | # tomcat.context.path.install=/baco |
||
21 | # web.path=/baco |
||
22 | # |
||
23 | web.path=/${app.path} |
||
24 | tomcat.context.path.install=/${app.path} |
||
25 | |||
26 | |||
27 | |||
28 | |||
29 | |||
30 | |||
31 | #0 - adicionar ao vosso build.propeties |
||
32 | # build.dir.classes=build/ant/classes |
||
33 | # |
||
34 | #1 - Colocar as novas confs e criar o ficheiro jdbc.properties na /conf |
||
35 | # conteudo do jdbc.properties |
||
36 | #hibernate.connection.url=@database.connection.url@ |
||
37 | #hibernate.connection.driver_class=com.mysql.jdbc.Driver |
||
38 | #hibernate.connection.username=@database.username@ |
||
39 | #hibernate.connection.password=@database.password@ |
||
40 | #hibernate.dialect=org.hibernate.dialect.MySQLDialect |
||
41 | # |
||
42 | #2 - Alterar o hibernate cfg.xml para usar o database.connection.url o database.username e o database.password |
||
43 | # <property name="hibernate.connection.url">@database.connection.url@</property> |
||
44 | # <property name="hibernate.connection.username">@database.username@</property> |
||
45 | # <property name="hibernate.connection.password">@database.password@</property> |
||
46 | # <property name="show_sql">@hibernate.show.sql@</property> |
||
47 | # |
||
48 | #3 - adicionar esta configura��o ao compile no final da tarefa |
||
2029 | jmachado | 49 | # <copy file="conf/jdbc.properties" todir="build/ant/classes/pt/estgp/es/exemplos/hibernate"/> |
2001 | es | 50 | # <replace file="build/ant/classes/pt/estgp/es/exemplos/hibernate/jdbc.properties"> |
51 | # <replacefilter token="@database.username@" value="${database.username}"/> |
||
52 | # <replacefilter token="@database.password@" value="${database.password}"/> |
||
53 | # <replacefilter token="@database.connection.url@" value="${database.connection.url}"/> |
||
54 | # </replace> |
||
55 | # <replace file="build/ant/classes/pt/estgp/es/exemplos/hibernate/hibernate.cfg.xml"> |
||
56 | # <replacefilter token="@database.username@" value="${database.username}"/> |
||
57 | # <replacefilter token="@database.password@" value="${database.password}"/> |
||
58 | # <replacefilter token="@database.connection.url@" value="${database.connection.url}"/> |
||
59 | # <replacefilter token="@hibernate.show.sql@" value="${hibernate.show.sql}"/> |
||
60 | # </replace> |
||
61 | # |
||
62 | #4 - Adicionar estas taskdefs ao libs.xml debaixo do path |
||
63 | # <taskdef name="hibernatetool" |
||
64 | # classname="org.hibernate.tool.ant.HibernateToolTask" |
||
65 | # classpathref="pathref" classpath="${build.dir.classes}"/> |
||
66 | # <taskdef name="schemaupdate" |
||
67 | # classname="org.hibernate.tool.hbm2ddl.SchemaUpdateTask" |
||
68 | # classpathref="pathref" classpath="${build.dir.classes}"/> |
||
69 | # |
||
70 | #5 - Adicionar estas tarefas ao build.xml |
||
71 | #<!-- |
||
72 | #========================================================================================== |
||
73 | #GENERATE SQL SCRIPTS |
||
74 | #========================================================================================== |
||
75 | #--> |
||
76 | # |
||
77 | # |
||
78 | # |
||
79 | #<target name="generateUpdateHibernateSql" depends="compile"> |
||
80 | # <schemaupdate |
||
81 | # properties="build/ant/classes/pt/estgp/es/exemplos/hibernate/jdbc.properties" |
||
82 | # quiet="no" |
||
83 | # text="no"> |
||
84 | # <fileset dir="src/java"> |
||
85 | # <include name="**/*.hbm.xml"/> |
||
86 | # </fileset> |
||
87 | # </schemaupdate> |
||
88 | #</target> |
||
89 | # |
||
90 | #<target name="generateHibernateDomainObjects"> |
||
91 | # <mkdir dir="src/gen"/> |
||
92 | # <replace dir="src/java" value=""> |
||
93 | # <include name="**/*.hbm.xml"/> |
||
94 | # <replacefilter token='<timestamp source="db"' value="<timestamp"/> |
||
95 | # </replace> |
||
96 | # <hibernatetool> |
||
97 | # <configuration> |
||
98 | # <fileset dir="src/java"> |
||
99 | # <include name="**/*.hbm.xml"/> |
||
100 | # </fileset> |
||
101 | # </configuration> |
||
102 | # <hbm2java |
||
103 | # jdk5="true" |
||
104 | # ejb3="false" |
||
105 | # destdir="src/gen"/> |
||
106 | # </hibernatetool> |
||
107 | # <delete> |
||
108 | # <fileset dir="src/gen"> |
||
109 | # <include name="**/*Impl.java"/> |
||
110 | # </fileset> |
||
111 | # </delete> |
||
112 | # <replace dir="src/java" value=""> |
||
113 | # <include name="**/*.hbm.xml"/> |
||
114 | # <replacefilter token='<timestamp' value='<timestamp source="db"'/> |
||
115 | # </replace> |
||
116 | #</target> |
||
117 | # |
||
118 | # 5 - Adicionar a pasta src/gen �s sources no IntelliJ |
||
2029 | jmachado | 119 | # |
2001 | es | 120 | # 6 - Adicionar a pasta src/gen � compila��o no build.xml alterando o iajc para isto: |
2029 | jmachado | 121 | #<iajc source="1.8" target="1.8" destdir="build/ant/classes" classpath="lib/aspectj/aspectjrt.jar" classpathref="pathref"> |
2001 | es | 122 | # <sourceroots> |
123 | # <pathelement location="src/java"/> |
||
124 | # <pathelement location="src/gen"/> |
||
125 | # </sourceroots> |
||
126 | #</iajc> |
||
127 | # |
||
128 | # Terminado |
||
129 | |||
130 | |||
131 | |||
132 | |||
133 | |||
134 | |||
135 | hibernate.show.sql=false |
||
136 | database.host=localhost |
||
137 | database.port=3306 |
||
138 | database.catalog=bacoalunos |
||
2029 | jmachado | 139 | database.username=root |
2001 | es | 140 | database.password=root |
141 | database.connection.url=jdbc:mysql://${database.host}:${database.port}/${database.catalog}?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true |
||
142 | |||
143 | |||
144 |