ant - jdtCompileLogPublisher javac -


I have an ant build script that compiles and generates my project's compilation log (file compileLog.xml). I use jdtCompileLogPublisher to publish these results to RTC

Now the situation occurs when I have the source of the project, its work is fine when I have no source in the project (it is a requirement that there will be an empty project with outside sources), The compile phase is skipped because there is no source, and jdtCompileLogPublisher is failing because file compileLog.xml which is not an input for this step as the compilation itself has been left.

I tried to create a new compileLog.xml, if it is not available. As a result, I am facing new issues because the file is empty.

  1. Why is Java code missing when compiling it?
  2. Is there any possibility that the compiler should execute javac in build.xml

    version ant: 1.7.1.

    Snippet of my respective code:

      & lt; Target name = "compilation" dependent = "ready" description = "compile source code" & gt; & Lt; Mkdir dir = "$ {nameBuild} / $ {dir.build} / bin" / & gt; & Lt ;! - Add targets to make target $ {label.jdkversion} with a fixed JDK version - & gt; & Lt; javac compiler = "org.eclipse.jdt.core.JDTCompilerAdapter" destdir = "$ {nameBuild} / $ {dir.build} / bin" debug = "true" deprecation = "at" encoding = "ISO-8859- 1" Source = "$ {buildInfo.jdkVersion}" target = "$ {buildInfo.jdkVersion}" debugleval = "line, source" failure error = "wrong" error property = "buildfell" & gt; & Lt; Compilerarg line = "- warning: + raw" /> & Lt; Compilerarg line = "- warning: -sialial" /> & Lt; Compilerarg line = "- enabled widget" /> & Lt; compilerarg line = "- log source / $ {name} /compileLog.xml" /> & Lt; Src path = "$ {name} / $ {dir.src}" /> & Lt; Classpath refid = "application.classpath" /> & Lt; / Javac & gt; & Lt; jdtCompileLogPublisher buildResultUUID = "$ {buildInfo.buildResultUUID}" repository holder = "$ {repositoryAddress}" userId = "$ {userId}" passwordfile = "$ {psFile}" filePath = "compilelog.xml" /> & Lt; Fail if = "buildFailed" message = "$ {name} failed to compile." / & Gt; & Lt; / Target & gt;    

    I modified the tag & lt; jdtCompileLogPublisher buildResultUUID = "$ {buildInfo.buildResultUUID}" repository address = "$ {repositoryAddress}" userId = "$ {userId}" passwordfile = "$ {psFile}" filepath = "compileLog.xml" / & gt;

    & lt; jdtCompileLogPublisher buildResultUUID = "$ {buildInfo.buildResultUUID}" repository address = "$ {repositoryAddress}" userId = "$ {userId}" passwordfile = "$ {psFile}" filePath = "compileLog.xml" failure = "false" /> gt ;
    That solves my problem

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -