forked from Coded/SIPRP
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							85 lines
						
					
					
						
							3.2 KiB
						
					
					
				
			
		
		
	
	
							85 lines
						
					
					
						
							3.2 KiB
						
					
					
				| <?xml version="1.0" encoding="UTF-8"?>
 | |
| <project name="evo-web-compile-common" basedir="../../"> 
 | |
|   
 | |
|   <import file="evo-web-load-properties.xml" />
 | |
|   
 | |
|   <!-- BUILD -->
 | |
|   
 | |
|   <target name="web-post-build" />
 | |
|   
 | |
|   <target name="web-pre-build" />
 | |
|   
 | |
|   <target name="web-build" />
 | |
|   
 | |
|   <target name="cifrar" depends="web-properties-exists" if="web.properties.exists" >
 | |
|     <echo message="Encrypting web.properties" />
 | |
|     <typedef classpathref="lib.tools.classpath" resource="net/jtools/classloadertask/antlib.xml">
 | |
|       <classpath>
 | |
|         <path refid="lib.tools.classpath"/>
 | |
|       </classpath>
 | |
|     </typedef>
 | |
|     <classloader loader="project">
 | |
|       <classpath>
 | |
|         <fileset dir="${lib.tools.dir}" includes="*.jar"/>
 | |
|       </classpath>
 | |
|     </classloader>
 | |
|     <taskdef name="cifrar-props" classpathref="lib.tools.classpath" classname="com.evolute.ant.PropsEncryptorTask" onerror="fail" />
 | |
|     <cifrar-props filepath="${properties.dir}${file.separator}app.properties" destpath="${web.build.dir}${file.separator}app.properties"/>
 | |
|   </target>
 | |
|   
 | |
|   <target name="web-properties-exists">
 | |
|       <available file="${properties.dir}${file.separator}app.properties" property="web.properties.exists"/>
 | |
|   </target>
 | |
|   
 | |
|   <target name="web-prepare" depends="load-properties">
 | |
|     <echo message="Dealing with package-info.java files (ant compilation problem workaround)" />
 | |
|     <delete failonerror="false">
 | |
|       <fileset dir="${web.build.dir}" includes="**/package-info.java"/>
 | |
|     </delete>
 | |
|     <echo message="Copying non-java files to build directory" />
 | |
|     <copy failonerror="false" overwrite="true" verbose="true" todir="${web.build.dir}" file="${web.version.file}"/>
 | |
|     <copy verbose="true" failonerror="true" overwrite="true" todir="${web.build.dir}">
 | |
| <!--      <fileset dir="${web.src.dir}">
 | |
|         <exclude name="**/*.java" />
 | |
|         <exclude name="*.java" />
 | |
|       </fileset>-->
 | |
|       <fileset dir="${properties.dir}">
 | |
|         <exclude name="app.properties" />
 | |
|         <include name="**/*" />
 | |
|       </fileset>
 | |
|     </copy>
 | |
|     <antcall target="cifrar"/>
 | |
|   </target>
 | |
| 
 | |
|   <target name="web-clean" description="Removes all generated files" depends="load-static-properties">
 | |
|     <delete verbose="true" failonerror="false">
 | |
|       <fileset dir="${web.build.dir}">
 | |
|         <include name="**/*" />
 | |
|       </fileset>
 | |
|     </delete>
 | |
|     <delete dir="${web.build.dir}" verbose="true" failonerror="true" />
 | |
|     <delete dir="${web.dist.dir}" verbose="true" failonerror="true" />
 | |
|     <delete dir="${web.deploy.dist.dir}" verbose="true" failonerror="true" />
 | |
|   </target>
 | |
|     
 | |
|   <!-- JAR -->
 | |
|   <target name="web-create-jar" description="Make application Jar" depends="web-clean, web-build"  >
 | |
|     <pathconvert property="jar.classpath.converted" refid="web.jar.classpath" pathsep=" ">
 | |
|       <map from="${web.dir}/" to="" />
 | |
|       <map from="${basedir}/" to="" />
 | |
|     </pathconvert>
 | |
|     <mkdir dir="${web.dist.dir}" />
 | |
|     <jar destfile="${web.dist.dir}${file.separator}AnalisesAcidentesTrabalho.jar">
 | |
|       <fileset dir="${web.build.dir}">
 | |
|         <include name="**/*" />
 | |
|       </fileset>
 | |
|     </jar>
 | |
|     <copy todir="${web.dist.lib.dir}">
 | |
|       <fileset dir="${web.lib.dir}">
 | |
|         <include name="**/*" />
 | |
|       </fileset>
 | |
|     </copy>
 | |
|   </target>
 | |
|   
 | |
| </project>
 |