Link to home
Start Free TrialLog in
Avatar of midani222
midani222

asked on

Use a resource collection to copy directories.

Hello, I am working through a batch script to deploy EJBs because I was unsuccessful using the GlassFish Console to deploy EJB files.

This is what happens to me:


This file previously said this:

<target name="deploy.shared.lib.to.glassfish">
<copy file="${deployment.glassfish.shared.lib.file.path}" todir="${glassfish.home}/lib" overwrite="true" />
</target>

The problem is that where I work, we are not allowed to run anything on the c: drive, it has to be run on the d: drive. Well, the batch script has apparently been coded to work with the c: drive.

so I changed it to this:

<target name="deploy.shared.lib.to.glassfish">
<copy file="d:\NHINC" todir="d:\Sun\AppServer\domains\domain\lib" overwrite="true" />
</target>


Okay well, here's the problem. When I comment out and hard code in the location of these files just referenced directly above, I get this error:

Use a resource collection to copy directories.


I did some research that said this was a bug. It was like, well, great a bug, but I still need to get this deploy.bat to run!!!  

I am running GlassFish 2.1.1 bundled with NetBeans 6.7.1 on a 32bit Windows 2008 Server SP with 2 Gb. of RAM

Thanks,
Michele deploy.xml
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Try
<target name="deploy.shared.lib.to.glassfish">
	<copy todir="d:/Sun/AppServer/domains/domain/lib" overwrite="true">
		<fileset dir="d:/NHINC">
			<include name="**/*"/>
		</fileset>
	</copy>
</target>

Open in new window

Avatar of midani222
midani222

ASKER

Hello I implemented this, it is kind of interesting what happened. It was late last night when I told you the path to the library.

It should have been Sun\AppServer\domains\domain1\lib

anyway I used the other one the one with domain in it and what happened is that it keeps saying:

deploy.shared.lib.to.glassfish:
[copy] Copying 4060 files to:
d:\Sun\AppServer\domains\domain\lib

It has been doing this for about 40 minutes now.

I will try to kill the process and rethink this problem again.

Can you think of anything?
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
well it would appear this this worked.
thanks a whole bunch!
:)