|
|
|
It fails in the RC1.zip file on my Windows, ant 1.6.5 and java 1.4.2
C:\sletmig2\webapps>ant new Buildfile: build.xml new: [echo] [echo] +=============================================================+ [echo] | -- Create a new web application -- | [echo] +=============================================================+ [echo] [input] Enter the name of your new application [myapp]? santa [echo] Creating 'santa' web application... [copy] Copying 7 files to C:\sletmig2\webapps\santa BUILD FAILED C:\sletmig2\webapps\build.xml:129: Warning: Could not find file C:\sletmig2\webapps\blank\blank.iml to copy. i think idea's *.iml files are not copied over when we do an ant "dist",
in build.xml <macrodef name="webapp"> <attribute name="name"/> <sequential> <mkdir dir="${dist}/webapps/@{name}/src"/> <copy todir="${dist}/webapps/@{name}/src"> <fileset dir="webapps/@{name}/src" includes="**/**"/> </copy> </sequential> </macrodef> should instead be, i guess, ... <macrodef name="webapp"> <attribute name="name"/> <sequential> <mkdir dir="${dist}/webapps/@{name}/src"/> <copy todir="${dist}/webapps/@{name}"> <fileset dir="webapps/@{name}/" includes="*.iml" /> </copy> <copy todir="${dist}/webapps/@{name}/src"> <fileset dir="webapps/@{name}/src" includes="**/**"/> </copy> </sequential> </macrodef> Toby
+1 looks good to me. I would have done the same. Would be nice though if we provided Eclipse project files also ;) Works fine now but is this the direction that it should be going? Elsewhere the project files are not included for the distributable. I do like the idea of including the project file but I think that Claus is right, if idea projects files are included then an ant script and an eclipse project file should probably be included too.
Hmmm...
I think the task should be changed to only include the "template" project definition for the create new task (blank.iml). All other project definitions should be left out of the distribution. If anyone could provide Eclipse project files we can add them there as well to allow users getting started really fast. What do you think? I agree that it should be limited to the template projects. Now you'll just have to find an eclipse user to mock up a project file :) (I usually use IDEA)
I'm forced to use Eclipse at work, so I can create the Eclipse project files if we should ship that too in blank.
What about the Qucikstart app. Could it benefit from eclipse project files too? sounds good, so i guess we've come to a conclusion to only include the Intellij and eclipse's ide related configuration files to the template project. I'll wait for Claus to have the eclipse project files in and work on this issue. Or maybe Claus would like to take over, it would be fine for me as well. :-)
Done for IDEA.. so the task no longer fails...
Assigning this to Claus to add the Eclipse project files Okay Eclipse .classpath files added when user performs ant new target
The IDEA file is a idea module lib file, so you need to create your own project and then import this file.
The same situation for Eclipse. You create a new project and Eclipse will automatically read the .classpath file and have it setup. Should we also supply a .project file for Eclipse? I'll look into adding one tonight. Hmm the following echo info doesn't seem right
+=============================================================+ | -- Your Web Application was created successfully! -- | | | | Now you should be able to cd to your application and run: | | > ant build -Dwebapp=shark | +=============================================================+ I have WW in c:\projects\webwork I am in c:\project\webwork\webapps now where I did ant new and typed 'shark'. So If I cd to my application cd shark ant build -Dwebapp=shark C:\project\webwork\webapps\shark>ant build -Dwebapp=shark Buildfile: build.xml does not exist! Build failed I must ofcourse do it from the webapps folder: C:\project\webwork\webapps>ant build -Dwebapp=shark Buildfile: build.xml build: [mkdir] Created dir: C:\project\webwork\webapps [mkdir] Created dir: C:\project\webwork\webapps [copy] Copying 6 files to C:\project\webwork\w [javac] Compiling 1 source file to C:\project\w [war] Building war: C:\project\webwork\webapp [war] Warning: selected war files include a W BUILD SUCCESSFUL Okay added Eclipse .project file and fixed wrong echo info
| ||||||||||||||||||||||||||||||||||||||||||||||
What OS, java and ant version are you using?
This is what it created when I typed the name 'claus'
webapps\claus
26.727 claus.iml
src