This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 181897 - nbproject/ant-deploy.xml does not pass username and password in get
Summary: nbproject/ant-deploy.xml does not pass username and password in get
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-12 00:37 UTC by davidacampbell
Modified: 2010-03-17 18:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description davidacampbell 2010-03-12 00:37:26 UTC
I have an enterprise project of type org.netbeans.modules.j2ee.earproject which I am deploying to glassfish v3 via commandline ant, but the ant deployment step doesn't work and the problem is here in ant-deploy.xml:

<get src="${gfv3.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}?force=true?name=${ant.project.name}"

It is getting an authorisation exception, and no surprise there because it isn't passing the basic authentication username and password, which already exist in some java properties gfv3.username and gfv3.password.

So if I hand modify it to be as follows, it works because it then is authenticating properly:

<get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}?force=true?name=${ant.project.name}"

It seems wrong that netbeans would create an ant-deploy.xml without those.
Comment 1 davidacampbell 2010-03-12 02:25:41 UTC
It looks like I should be able hack around the problem by updating this jar from the netbeans install, changing the contents of ant-deploy.xml:

enterprise/modules/org-netbeans-modules-glassfish-javaee.jar

The file within the jar is:

org/netbeans/modules/glassfish/javaee/ant-deploy.xml
Comment 2 davidacampbell 2010-03-12 09:26:42 UTC
A slightly different url issue, but on the very same line:

<get username="${gfv3.username}" password="${gfv3.password}"
src="${gfv3.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}?force=true?name=${ant.project.name}"

Note that it has ?....?force=true?name=....

Surely that should be &amp;...&amp;force=true&amp;name=....
Comment 3 Vince Kraemer 2010-03-12 11:47:03 UTC
thanks.  i will look into it.
Comment 4 Vince Kraemer 2010-03-15 20:03:51 UTC
http://hg.netbeans.org/web-main/rev/f83a064c6efb
Comment 5 Vince Kraemer 2010-03-15 20:08:14 UTC
http://hg.netbeans.org/web-main/rev/f83a064c6efb