You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "MauroBelardi (via GitHub)" <gi...@apache.org> on 2024/11/25 08:53:01 UTC
[I] Delete does not completely remove references to the deleted project. [netbeans]
MauroBelardi opened a new issue, #7987:
URL: https://github.com/apache/netbeans/issues/7987
### 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.j
ar:${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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Delete does not completely remove references to the deleted project. [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #7987:
URL: https://github.com/apache/netbeans/issues/7987#issuecomment-2498784521
deleting projects typically doesn't refactor other projects which depend on the removed project. Removing those dependency declarations would have to be done manually, e.g using the projects properties window.
I quickly checked and this did remove the dependency correctly, even after the project was already gone
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Delete does not completely remove references to the deleted project. [netbeans]
Posted by "MauroBelardi (via GitHub)" <gi...@apache.org>.
MauroBelardi commented on issue #7987:
URL: https://github.com/apache/netbeans/issues/7987#issuecomment-2500735530
Thanks for your feedback. However, I think that the application behavior should be consistent with the user's expectations. If I want to delete the project, I know what I'm doing. A "typical" behavior should be offered as an option. I therefore suggest completely deleting references to the deleted project by checking a dedicated checkbox, normally not checked.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Delete does not completely remove references to the deleted project. [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #7987:
URL: https://github.com/apache/netbeans/issues/7987#issuecomment-2501249962
my user expectation would be to not trigger a refactoring when a project is removed. The base project might not even be visible to the IDE. But I am going to add the contribution-welcome label in case someone would like to implement this feature for ant projects. Ant projects are from the era when dependencies were often just relative paths - so there is an argument to be made that removing project files actually removes the dependency if the base project is already open.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Delete does not completely remove references to the deleted project. [netbeans]
Posted by "MauroBelardi (via GitHub)" <gi...@apache.org>.
MauroBelardi closed issue #7987: Delete does not completely remove references to the deleted project.
URL: https://github.com/apache/netbeans/issues/7987
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists