I think this is a problem related to keeping Jars by Idea.

The issue is with an Ant build.  We are creating a Jar file and then
updating the contents.

Win2k, SP2 machine.

This works with the 2.0.3 release, but fails with build 518 of the EAP.

The Jar in question is part of the classpath (needed to run programs), and
is built by the ant script.  It cannot be cleaned as well (message is
"unable to delete").

For the clean, here's the fragment:

  <target name="clean">
    <delete dir="build" />
    <delete file="${LIB_DIR}/${SEALSERVER}.jar" />
  </target>

For the build, here's the fragment:

  <target name="server" depends="init">
    <jar jarfile="${LIB_DIR}/${SEALSERVER}.jar" basedir="${CLASSES_DIR}"
            manifest="MANIFEST.MF" excludes="com/secretseal/loader/**"/>
    <jar jarfile="${LIB_DIR}/${SEALSERVER}.jar" basedir="keys" update="yes"
            manifest="MANIFEST.MF"/>
  </target>

It fails on the update with the message in the subject line.

When I try to delete the sealserver.jar from the classpath, Idea says
"Cannot delete read only file".  When I look at the file using file manager,
the read only attribute is not set.

So, I bring up project properties, and remove it from the classpath, Idea
allows me to remove this jar.

However, I still have the same errors during the ant build (both build and
clean)

Now if I get out of Idea and then back in (after the above), I can now do
clean, and now successfully build the jar file.

However, since it isn't in the classpath, I can't run it.

I can work around this by running from the raw compiled classes, however
there are resources in the jar that are needed for the running of the
program, which aren't in the classes output.  I can, I think, manage this
through class path chicanery, but since there are those in the group which
don't use Idea, I basically have to keep the same environment constraints or
else things get messy.

Anyways, thanks for the help.

Cheers,

-Hal
______
All your data-base are belong to us
www.hellblazer.com


_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list

Reply via email to