Ant4Eclipse - General http://www.ant4eclipse.org/taxonomy/term/3/0 en Can references from the base project be removed from the build projects classpaths? http://www.ant4eclipse.org/node/148 <p>I have a project with the following structure:</p> <p><div class="geshifilter"><pre class="text geshifilter-text" style="font-family:monospace;">_CSBuilder (this contains the build.xml) + lib + workspace + CommonUtils + ESBLibraries + ... (other projects)</pre></div></p> <p>The idea is to build the projects under the "workspace" folder, which are checked out from our CMDB.</p> <p>Im using the last release from the Hudson link.</p> <p>However when I run the build.xml, I receive the following:</p> <p>BUILD FAILED<br /> C:\_CSBuilder\_CSBuilder\build.xml:456: The following error occurred while executing this line:<br /> C:\_CSBuilder\_CSBuilder\build.xml:459: The following error occurred while executing this line:<br /> C:\_CSBuilder\_CSBuilder\build.xml:476: The following error occurred while executing this line:<br /> C:\_CSBuilder\_CSBuilder\build.xml:490: The following error occurred while executing this line:<br /> C:\_CSBuilder\_CSBuilder\build.xml:272: org.ant4eclipse.lib.core.exception.Ant4EclipseException: Could not create jar file from file 'C:\_CSBuilder\_CSBuilder\.project'.</p> <p>Not sure why the compile task is trying to include the references to the _CSBuilder project (which only contains the build.xml) in the compilation of the CommonUtils project. </p> <p>Is there a way to remove such reference from the executeJdtProject properties?</p> <p>Thanks in advance for your help!</p> <p>Note: After doing some tests yesterday, found an interesting thing. When I downloaded the code cleaning all projects the error is appearing. If I downloaded the code then imported the code to eclipse, If I run the script disabling the cleaning, the error does not appear, however I would expect to be able to compile from the clean state.</p> http://www.ant4eclipse.org/node/148#comments General Thu, 31 Mar 2011 01:35:40 +0000 danton30 148 at http://www.ant4eclipse.org Error on compile http://www.ant4eclipse.org/node/147 <p>When running a task to compile a project the following error appears:</p> <p>BUILD FAILED<br /> C:\CS_Build\CS_Builder\build.xml:356: The following error occurred while executing this line:<br /> C:\CS_Build\CS_Builder\build.xml:359: The following error occurred while executing this line:<br /> C:\CS_Build\CS_Builder\build.xml:377: The following error occurred while executing this line:<br /> C:\CS_Build\CS_Builder\build.xml:391: The following error occurred while executing this line:<br /> C:\CS_Build\CS_Builder\build.xml:180: Class not found: org.ant4eclipse.ant.jdt.ecj.EcjCompilerAdapter</p> <p>I didnt have any issue with the task until today when opened the project.</p> <p>I have set up in the class path the org.ant4eclipse_1.0.0.M4.jar, ecj-3.6.jar, org.eclipse.osgi_3.6.0.v20100517.jar and ant-contrib-1.0b3.jar</p> <p>Thanks in advance for any help!</p> <p>The task in question is the following:<br /> <div class="geshifilter"><pre class="text geshifilter-text" style="font-family:monospace;">&lt;target name=&quot;compile.project&quot; if=&quot;executeJdtProject.source.directories&quot;&gt; &nbsp; &lt;echo&gt;Compiling jdt project '${executeJdtProject.project.name}'&lt;/echo&gt; &lt;echo&gt; - source directories -&gt; ${executeJdtProject.source.directories}&lt;/echo&gt; &lt;echo&gt; - output directory -&gt; ${executeJdtProject.default.output.directory}&lt;/echo&gt; &lt;echo&gt; - bootclasspath -&gt; ${executeJdtProject.boot.classpath}&lt;/echo&gt; &lt;echo&gt; - classpath -&gt; ${executeJdtProject.classpath.absolute.compiletime}&lt;/echo&gt; &nbsp; &lt;mkdir dir=&quot;${executeJdtProject.default.output.directory}&quot; /&gt; &nbsp; &lt;javac destdir=&quot;${executeJdtProject.default.output.directory}&quot; debug=&quot;on&quot; bootclasspath=&quot;${sun.boot.class.path}&quot; compiler=&quot;org.ant4eclipse.ant.jdt.ecj.EcjCompilerAdapter&quot;&gt; &nbsp; &lt;src refid=&quot;executeJdtProject.source.directories.path&quot; /&gt; &lt;bootclasspath refid=&quot;executeJdtProject.boot.classpath.path&quot; /&gt; &lt;classpath refid=&quot;executeJdtProject.classpath.absolute.compiletime.path&quot; /&gt; &nbsp; &lt;compilerarg value=&quot;compiler.args.refid=executeJdtProject.compiler.args&quot; compiler=&quot;org.ant4eclipse.ant.jdt.ecj.EcjCompilerAdapter&quot; /&gt;</pre></div></p> <p><a href="http://www.ant4eclipse.org/node/147" target="_blank">read more</a></p> http://www.ant4eclipse.org/node/147#comments General Sun, 27 Mar 2011 16:29:21 +0000 danton30 147 at http://www.ant4eclipse.org plugin + product build http://www.ant4eclipse.org/node/146 <p>Hello.</p> <p>I've been using the old version of Ant4Eclipse for some time but I decided to update both my target env and Ant4Eclipse. I've used the build script located here: <a href="http://www.ant4eclipse.org/node/81" title="http://www.ant4eclipse.org/node/81">http://www.ant4eclipse.org/node/81</a> as an example so I can change my current script. Unfortunately I get the following error:</p> <p>build:<br /> [ant4eclipse:executePluginProject] The content of elements must consist of well-formed character data or markup.</p> <p>eclipse-ant\macros\a4e-pde-macros.xml:76: org.ant4eclipse.lib.core.exception.Ant4EclipseException: Could not parse document.</p> http://www.ant4eclipse.org/node/146#comments General Tue, 15 Mar 2011 16:47:06 +0000 svkap 146 at http://www.ant4eclipse.org svnGetProject with ssh and svn+ssh:\\ url http://www.ant4eclipse.org/node/137 <p>Does anybody know how to realize that?</p> http://www.ant4eclipse.org/node/137#comments General Fri, 05 Nov 2010 11:17:09 +0000 Fabian 137 at http://www.ant4eclipse.org Encoding problem http://www.ant4eclipse.org/node/135 <p>I'm building my plugins using Ant4Eclipse, but can't change the encoding of the compiler. I'm compiling in Windows, and Ant4Eclipse seems to be using the operating system encoding. I need source files to be compiled in UTF-8.</p> <p>How can I accomplish this?</p> <p>Thanks in advance,<br /> Lucas</p> http://www.ant4eclipse.org/node/135#comments General Thu, 14 Oct 2010 17:56:33 +0000 nazario 135 at http://www.ant4eclipse.org Referenced project without classpath entries http://www.ant4eclipse.org/node/114 <p>Hi,</p> <p>during build I get:</p> <p>org.ant4eclipse.lib.core.exception.Ant4EclipseException: A precondition has been violated:<br /> at org.ant4eclipse.lib.core.Assure.assertTrue(Assure.java:264)<br /> at org.ant4eclipse.lib.jdt.internal.tools.ClasspathEntryResolverExecutor.resolveReferencedProject(ClasspathEntryResolverExecutor.java:228)<br /> at org.ant4eclipse.lib.jdt.internal.tools.ClasspathEntryResolverExecutor.resolve(ClasspathEntryResolverExecutor.java:168)</p> <p>seems to the weird situation of a referenced project without classpath entries.<br /> Now I have lots of projects, but a4e does not give me any hint about which project it is complaining.</p> http://www.ant4eclipse.org/node/114#comments General Fri, 30 Apr 2010 07:15:17 +0000 joergviola 114 at http://www.ant4eclipse.org Build Seam web application http://www.ant4eclipse.org/node/109 <p>Hello,<br /> I have got a problem with build Seam web application. Application has theese moduls: Web, EJB, EAR, test. In Ecplipse I click on run button and Ecplise do build and copy application to JBoss AS.<br /> Now, I need do build using ant4ecplise. Could you write me any example, how can I do it?</p> <p>I try use:<br /> [1]: &lt;buildFeature workspaceDirectory="${workspaceDirectory}"<br /> projectName="SeamApp5"<br /> targetplatformid="eclipse"<br /> destination="${destination}" /&gt;</p> <p>In console, there is an error: A precondition has been violated: hasRole(projectRoleClass) on project...</p> <p>[2]: &lt;buildPlugin ... /&gt; ... same problem as point [1].</p> <p>[3]: &lt;copy todir="${destination}" overwrite="true"&gt;<br /> &lt;ant4eclipse:pdeProjectFileSet workspaceDirectory="${workspaceDirectory}" projectname="SeamApp5"/&gt;<br /> &lt;/copy&gt;</p> <p>In console, there is an error: Project 'SeamApp5' must have role 'PluginProjectRole' or 'FeatureProjectRole'</p> <p>I don't know, which task can I use. In Eclipse is project type of the project "SeamApp5": Project (right click on project -> properties -> resource).</p> <p>Any idea? Thank you!</p> http://www.ant4eclipse.org/node/109#comments General Fri, 16 Apr 2010 06:25:40 +0000 Franta 109 at http://www.ant4eclipse.org creating dependency tree http://www.ant4eclipse.org/node/99 <p>I would like to use the code of ant4eclipse to create a dependency tree of the Eclipse projects in a workspace or a specific list of projects inside a workspace. </p> <p>Does this exist already ?</p> <p>Otherwise, I could start coding. I have seen that there is a getBuildOrder task. Is the source code of this task a good starting point ? </p> <p>We could add an ant task to generate the dependency tree, with the option to generate an XML or DOT file to be processed further by a graphing tool. The possibilities offered by the report task of ivy could be offered here too.</p> <p>[1] <a href="http://ant.apache.org/ivy/history/latest-milestone/use/report.html" title="http://ant.apache.org/ivy/history/latest-milestone/use/report.html">http://ant.apache.org/ivy/history/latest-milestone/use/report.html</a></p> http://www.ant4eclipse.org/node/99#comments General Thu, 18 Mar 2010 14:45:19 +0000 antoinell 99 at http://www.ant4eclipse.org ant4eclipse:getUsedProjects crashes in org.ant4eclipse.ant.jdt.type.JdtClassPathContainerType.doValidate http://www.ant4eclipse.org/node/93 <p>My ant script works fine with ant4eclipse 0.5.0.rc1.<br /> Now I'm moving forward to use ant4eclipse 1.0.0.M1.<br /> I updated my script for 1.0.0.M1:<br /> ant taskdef<br /> ant4eclipse:installedJREs &amp; ant4eclipse:jdtClassPathLibrary instead of &lt;path id="..." /&gt;<br /> ant4eclipse:getUsedProjects instead of getReferencedProjects (workspaceDirectory instead workspace)</p> <p>Now in 1.0.0.M1 ant4eclipse:getUsedProjects fails in class: org.ant4eclipse.ant.jdt.type.JdtClassPathContainerType.doValidate(JdtClassPathContainerType.java:101)</p> <p>I also tried to use org.ant4eclipse_1745.zip for Hudson build 26.<br /> Stack trace from org.ant4eclipse_1745.zip:<br /> java.lang.NullPointerException<br /> at org.ant4eclipse.ant.jdt.type.JdtClassPathContainerType.doValidate(JdtClassPathContainerType.java:102)<br /> at org.ant4eclipse.ant.core.AbstractAnt4EclipseDataType.validate(AbstractAnt4EclipseDataType.java:76)<br /> at org.ant4eclipse.ant.core.AbstractAnt4EclipseDataType.validateAll(AbstractAnt4EclipseDataType.java:101)<br /> at org.ant4eclipse.ant.core.AbstractAnt4EclipseTask.execute(AbstractAnt4EclipseTask.java:63)<br /> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)<br /> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)<br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br /> at java.lang.reflect.Method.invoke(Method.java:597)<br /> at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)<br /> at org.apache.tools.ant.Task.perform(Task.java:348)<br /> at org.apache.tools.ant.Target.execute(Target.java:357)<br /> at org.apache.tools.ant.Target.performTasks(Target.java:385)<br /> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)<br /> at org.apache.tools.ant.Project.executeTarget(Project.java:1306)<br /> at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)</p> <p><a href="http://www.ant4eclipse.org/node/93" target="_blank">read more</a></p> http://www.ant4eclipse.org/node/93#comments General Tue, 16 Feb 2010 17:27:32 +0000 Space008 93 at http://www.ant4eclipse.org java.util.UnknownFormatConversionException: Conversion = 'R' http://www.ant4eclipse.org/node/90 <p>Anyone seen this error occur when having class path references</p> <p><span style="text-decoration: underline;"><span><span>java.util.UnknownFormatConversionException</span></span></span><span><span>: Conversion = 'R</span></span><span style="font-size: x-small;">'</span></p> <p><span style="font-size: x-small;">Here are the relevant build.xml snippets:</span></p> <p><span style="font-size: x-small;">&lt;!-- Really just an empty container --&gt;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;ant4eclipse:jdtClassPathLibrary name="org.eclipse.jst.j2ee.internal.module.container"&gt;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;fileset dir="../ShareLibraries/testing/" includes="**/*.jar" /&gt;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/ant4eclipse:jdtClassPathLibrary&gt;</span></p> <p>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;!-- read the eclipse classpath --&gt;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;ant4eclipse:getJdtClassPath pathId="build.classpath" workspaceDirectory="${workspace}" projectName="${ant.project.name}" /&gt;<br /></p> http://www.ant4eclipse.org/node/90#comments General Tue, 02 Feb 2010 21:15:52 +0000 rdifrango 90 at http://www.ant4eclipse.org