-
Notifications
You must be signed in to change notification settings - Fork 917
Description
Apache NetBeans version
Apache NetBeans 23
What happened
I created a new "Musician" project "Java with Ant" -> "Java Enterprise" -> "Enterprise Application Client", adding it with "Add to Enterprise Application" to an Ant Enterprise Application "Orchestra". Deleting afterwards the project "Musician", with the option "Also delete sources" does not remove all references to "Musician" from the following files: project.xml and project.properties. The directory ot the "Musician" project was correctly deleted.
project.xml after deleting the "Musician" project:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.j2ee.earproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2ee-earproject/2">
<name>Orchestra</name>
<minimum-ant-version>1.6.5</minimum-ant-version>
<web-module-libraries/>
<web-module-additional-libraries>
<library>
<file>${reference.Orchestra-war.dist-ear}</file>
<path-in-war>/</path-in-war>
</library>
<library>
<file>${reference.Orchestra-ejb.dist-ear}</file>
<path-in-war>/</path-in-war>
</library>
**<library>
<file>${reference.Musician.j2ee-module-car}</file>
<path-in-war>/</path-in-war>
</library>**
</web-module-additional-libraries>
</data>
<references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
**<reference>
<foreign-project>Musician</foreign-project>
<artifact-type>j2ee_ear_archive</artifact-type>
<script>build.xml</script>
<target>dist-ear</target>
<clean-target>clean-ear</clean-target>
<id>j2ee-module-car</id>
</reference>**
<reference>
<foreign-project>Orchestra-ejb</foreign-project>
<artifact-type>j2ee_ear_archive</artifact-type>
<script>build.xml</script>
<target>dist-ear</target>
<clean-target>clean-ear</clean-target>
<id>dist-ear</id>
</reference>
<reference>
<foreign-project>Orchestra-war</foreign-project>
<artifact-type>j2ee_ear_archive</artifact-type>
<script>build.xml</script>
<target>dist-ear</target>
<clean-target>clean-ear</clean-target>
<id>dist-ear</id>
</reference>
</references>
</configuration>
</project>project.properties after deleting the "Musician" project:
build.classes.excludes=**/*.java,**/*.form,**/.nbattrs
build.dir=build
build.generated.dir=${build.dir}/generated
client.module.uri=Orchestra-war
client.urlPart=
debug.classpath=${javac.classpath}::${jar.content.additional}:${run.classpath}
display.browser=true
dist.dir=dist
dist.jar=${dist.dir}/${jar.name}
endorsed.classpath=
j2ee.appclient.mainclass.args=${j2ee.appclient.tool.args}
j2ee.compile.on.save=true
j2ee.deploy.on.save=false
j2ee.platform=10
j2ee.platform.classpath=${j2ee.server.home}/modules/jakarta.activation-api.jar:${j2ee.server.home}/modules/jakarta.annotation-api.jar:${j2ee.server.home}/modules/jakarta.authentication-api.jar:${j2ee.server.home}/modules/jakarta.authorization-api.jar:${j2ee.server.home}/modules/jakarta.batch-api.jar:${j2ee.server.home}/modules/jakarta.ejb-api.jar:${j2ee.server.home}/modules/jakarta.el-api.jar:${j2ee.server.home}/modules/jakarta.enterprise.cdi-api.jar:${j2ee.server.home}/modules/jakarta.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/jakarta.enterprise.concurrent.jar:${j2ee.server.home}/modules/jakarta.enterprise.lang-model.jar:${j2ee.server.home}/modules/jakarta.faces.jar:${j2ee.server.home}/modules/jakarta.inject-api.jar:${j2ee.server.home}/modules/jakarta.interceptor-api.jar:${j2ee.server.home}/modules/jakarta.jms-api.jar:${j2ee.server.home}/modules/jakarta.json-api.jar:${j2ee.server.home}/modules/jakarta.json.bind-api.jar:${j2ee.server.home}/modules/jakarta.mail-api.jar:${j2ee.server.home}/modules/jakarta.mvc-api.jar:${j2ee.server.home}/modules/jakarta.persistence-api.jar:${j2ee.server.home}/modules/jakarta.resource-api.jar:${j2ee.server.home}/modules/jakarta.security.enterprise-api.jar:${j2ee.server.home}/modules/jakarta.security.enterprise.jar:${j2ee.server.home}/modules/jakarta.servlet-api.jar:${j2ee.server.home}/modules/jakarta.servlet.jsp-api.jar:${j2ee.server.home}/modules/jakarta.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/jakarta.transaction-api.jar:${j2ee.server.home}/modules/jakarta.validation-api.jar:${j2ee.server.home}/modules/jakarta.websocket-api.jar:${j2ee.server.home}/modules/jakarta.websocket-client-api.jar:${j2ee.server.home}/modules/jakarta.ws.rs-api.jar:${j2ee.server.home}/modules/jakarta.xml.bind-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar
j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar
j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar
j2ee.platform.wsit.classpath=
j2ee.server.type=gfv700ee10
jar.compress=false
jar.content.additional=\
${reference.Orchestra-war.dist-ear}:\
${reference.Orchestra-ejb.dist-ear}:\
**${reference.Musician.j2ee-module-car}**
javac.debug=true
javac.deprecation=false
javac.source=17
javac.target=17
meta.inf=src/conf
no.dependencies=false
platform.active=default_platform
**project.Musician=../Musician**
project.Orchestra-ejb=Orchestra-ejb
project.Orchestra-war=Orchestra-war
**reference.Musician.j2ee-module-car=${project.Musician}/dist/Musician.jar**
reference.Orchestra-ejb.dist-ear=${project.Orchestra-ejb}/dist/Orchestra-ejb.jar
reference.Orchestra-war.dist-ear=${project.Orchestra-war}/dist/Orchestra-war.war
resource.dir=setup
run.classpath=
source.root=.Language / Project Type / NetBeans Component
Java / Ant Enterprise Application Client / Jakarta 10
How to reproduce
Create an Ant Java Enterprise Application. Add to it an Ant Java Enterprise Application Client. Then, delete the brand new Java Enterprise Application Client. You will find the old references to the deleted client project in some files like project.xml and project.properties.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.j2ee.earproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2ee-earproject/2">
<name>Orchestra</name>
<minimum-ant-version>1.6.5</minimum-ant-version>
<web-module-libraries/>
<web-module-additional-libraries>
<library>
<file>${reference.Orchestra-war.dist-ear}</file>
<path-in-war>/</path-in-war>
</library>
<library>
<file>${reference.Orchestra-ejb.dist-ear}</file>
<path-in-war>/</path-in-war>
</library>
<library>
<file>${reference.Musician.j2ee-module-car}</file>
<path-in-war>/</path-in-war>
</library>
</web-module-additional-libraries>
</data>
<references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
**<reference>
<foreign-project>Musician</foreign-project>
<artifact-type>j2ee_ear_archive</artifact-type>
<script>build.xml</script>
<target>dist-ear</target>
<clean-target>clean-ear</clean-target>
<id>j2ee-module-car</id>
</reference>**
<reference>
<foreign-project>Orchestra-ejb</foreign-project>
<artifact-type>j2ee_ear_archive</artifact-type>
<script>build.xml</script>
<target>dist-ear</target>
<clean-target>clean-ear</clean-target>
<id>dist-ear</id>
</reference>
<reference>
<foreign-project>Orchestra-war</foreign-project>
<artifact-type>j2ee_ear_archive</artifact-type>
<script>build.xml</script>
<target>dist-ear</target>
<clean-target>clean-ear</clean-target>
<id>dist-ear</id>
</reference>
</references>
</configuration>
</project>
/reference>
project.properties
build.classes.excludes=**/*.java,**/*.form,**/.nbattrs
build.dir=build
build.generated.dir=${build.dir}/generated
client.module.uri=Orchestra-war
client.urlPart=
debug.classpath=${javac.classpath}::${jar.content.additional}:${run.classpath}
display.browser=true
dist.dir=dist
dist.jar=${dist.dir}/${jar.name}
endorsed.classpath=
j2ee.appclient.mainclass.args=${j2ee.appclient.tool.args}
j2ee.compile.on.save=true
j2ee.deploy.on.save=false
j2ee.platform=10
j2ee.platform.classpath=
j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar
j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar
j2ee.platform.wsit.classpath=
j2ee.server.type=gfv700ee10
jar.compress=false
jar.content.additional=\
${reference.Orchestra-war.dist-ear}:\
${reference.Orchestra-ejb.dist-ear}:\
${reference.Musician.j2ee-module-car}
javac.debug=true
javac.deprecation=false
javac.source=17
javac.target=17
meta.inf=src/conf
no.dependencies=false
platform.active=default_platform
project.Musician=../Musician
project.Orchestra-ejb=Orchestra-ejb
project.Orchestra-war=Orchestra-war
reference.Musician.j2ee-module-car=${project.Musician}/dist/Musician.jar
reference.Orchestra-ejb.dist-ear=${project.Orchestra-ejb}/dist/Orchestra-ejb.jar
reference.Orchestra-war.dist-ear=${project.Orchestra-war}/dist/Orchestra-war.war
resource.dir=setup
run.classpath=
source.root=.Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows 10 Pro 22H2
JDK
JDK 17
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
The problem always occurs.
Are you willing to submit a pull request?
No