You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "mbien (via GitHub)" <gi...@apache.org> on 2023/04/15 00:43:50 UTC

[GitHub] [netbeans] mbien opened a new pull request, #5826: disable compile-on-save by default in maven projects.

mbien opened a new pull request, #5826:
URL: https://github.com/apache/netbeans/pull/5826

   good-defaults round two, see [dev list](https://lists.apache.org/thread/rdflfdbt2v0cxz9mk198tonm0hnff1bg) or #5260
   
   sets CoS default to `none`


-- 
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


[GitHub] [netbeans] morvael commented on pull request #5826: disable compile-on-save by default in maven projects.

Posted by "morvael (via GitHub)" <gi...@apache.org>.
morvael commented on PR #5826:
URL: https://github.com/apache/netbeans/pull/5826#issuecomment-1588688578

   With this change I have lost the ability to work with myBatis result maps in test classes. I had to turn compile on save manually on. org.apache.ibatis.io.ResolverUtil fails to detect classes properly if referenced projects go to classpath as their jars in repository vs target/classes directory (which is the result of compile on save option change). Please, never remove that option.


-- 
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


[GitHub] [netbeans] morvael commented on pull request #5826: disable compile-on-save by default in maven projects.

Posted by "morvael (via GitHub)" <gi...@apache.org>.
morvael commented on PR #5826:
URL: https://github.com/apache/netbeans/pull/5826#issuecomment-1588883003

   ```
   [org.apache.ibatis.io.VFS] [main] [DEBUG] [org.apache.ibatis.io.VFS$VFSHolder] [createVFS] [74] : Using VFS adapter org.apache.ibatis.io.JBoss6VFS
   [org.apache.ibatis.io.ResolverUtil] [main] [DEBUG] [org.apache.ibatis.io.ResolverUtil] [addIfMatching] [287] : Checking to see if class SomeClass matches criteria [is assignable to Object]
   ```
   In NB 18 due to the swtich from target/classes to maven repository jar the second line will not appear, SomeClass will not be found by scanning, and thus ClassNotFoundException will be thrown when loading result map xml.


-- 
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


[GitHub] [netbeans] neilcsmith-net commented on pull request #5826: disable compile-on-save by default in maven projects.

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on PR #5826:
URL: https://github.com/apache/netbeans/pull/5826#issuecomment-1588767884

   @morvael you have more of an issue if your tests rely on having compile on save enabled!  I would look at what's required to have them work correctly without it.


-- 
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


[GitHub] [netbeans] morvael commented on pull request #5826: disable compile-on-save by default in maven projects.

Posted by "morvael (via GitHub)" <gi...@apache.org>.
morvael commented on PR #5826:
URL: https://github.com/apache/netbeans/pull/5826#issuecomment-1588918330

   SomeClass is in project A. main is in a test class in project B.
   ```
       public static void main(String[] args) {
           boolean found = false;
           ResolverUtil<Object> resolver = new ResolverUtil<>();
           resolver.findAnnotated(Alias.class, "some.package");
           for (Class<?> c : resolver.getClasses()) {
               if (c.getSimpleName().equals("SomeClass")) {
                   found = true;
                   break;
               }
           }
           System.out.println(found ? "class found" : "class not found");
       }
       ```
   
   When project A is set to compile on save disabled in NB 18 the result will be "class not found". With compile on save enabled in NB 18 or in NB 17 (regardless of compile on save setting) the result will be "class found".


-- 
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


[GitHub] [netbeans] morvael commented on pull request #5826: disable compile-on-save by default in maven projects.

Posted by "morvael (via GitHub)" <gi...@apache.org>.
morvael commented on PR #5826:
URL: https://github.com/apache/netbeans/pull/5826#issuecomment-1588942770

   So forcing VFS class used by ResolverUtil to use DefaultVFS implementation for "run from IDE" classes (`VFS.addImplClass(DefaultVFS.class);`) helps to solve this problem. JBoss6VFS seems unable to handle repository jars pointed by class path in NB 18, and unfortunately is the first implementation VFS tries to load and use by default.


-- 
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


[GitHub] [netbeans] morvael commented on pull request #5826: disable compile-on-save by default in maven projects.

Posted by "morvael (via GitHub)" <gi...@apache.org>.
morvael commented on PR #5826:
URL: https://github.com/apache/netbeans/pull/5826#issuecomment-1588900032

   I actually worked with compile on save disabled for a long time, since it caused some bug (long forgotten what it was), but the IDE simply used last version of target/classes from regular build and was able to scan them properly. Now it somehow can't do it when pointed to actual jar.


-- 
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


[GitHub] [netbeans] mbien merged pull request #5826: disable compile-on-save by default in maven projects.

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien merged PR #5826:
URL: https://github.com/apache/netbeans/pull/5826


-- 
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


[GitHub] [netbeans] morvael commented on pull request #5826: disable compile-on-save by default in maven projects.

Posted by "morvael (via GitHub)" <gi...@apache.org>.
morvael commented on PR #5826:
URL: https://github.com/apache/netbeans/pull/5826#issuecomment-1588876975

   MyBatis loads result map files from xml file in project's resources when loading its configuration. That file tells it about some aliased classes. And then it gets ClassNotFoundException for such class, because the ResolverUtil has not found it somehow. I checked run class command difference and classpath difference for the same code run in NB 17 vs NB 18 and the differences are:
   1) process-test-classes is added to exec plugin command line
   2) projects that are referenced in class path that have compile on save disabled change from someproject/test/classes to ./m2/repository/.../someproject-someversion.jar
   And it is the second change that somehow prevents the MyBatis code from scanning them correctly and finding annotated classes. The same problem does not happen when the application is actually deployed on application server. It's only a problem inside IDE when trying to "Run" a class with main method.


-- 
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