nlloyd / SublimeMaven

Sublime Text 2 Plugin providing integration with the Apache Maven build and project management tool
42 stars 14 forks source link

Update to Sublime3 #19

Closed calope closed 10 years ago

calope commented 11 years ago

I've tested the plugin with Sublime 3 in Windows and it doesn't work.

The console showed these errors/problems:

reloading plugin Maven.config_generator reloading plugin Maven.import Traceback (most recent call last): File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 73, in reload_plugin m = importlib.import_module(modulename) File "X/importlib/init.py", line 88, in import_module File "", line 1577, in _gcd_import File "", line 1558, in _find_and_load File "", line 1525, in _find_and_load_unlocked File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 671, in load_module exec(compile(source, source_path, 'exec'), mod.dict) File "import in C:\Users\clp\AppData\Roaming\Sublime Text 3\Installed Packages\Maven.sublime-package", line 26, in ImportError: No module named 'utils' reloading plugin Maven.maven Traceback (most recent call last): File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 73, in reload_plugin m = importlib.import_module(modulename) File "X/importlib/init.py", line 88, in import_module File "", line 1577, in _gcd_import File "", line 1558, in _find_and_load File "", line 1525, in _find_and_load_unlocked File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 671, in load_module exec(compile(source, source_path, 'exec'), mod.dict) File "maven in C:\Users\clp\AppData\Roaming\Sublime Text 3\Installed Packages\Maven.sublime-package", line 281 print self.last_str ^ SyntaxError: invalid syntax

...

Package Control: Skipping automatic upgrade, last run at 2013-07-15 13:29:20, next run at 2013-07-15 14:29:20 or after Traceback (most recent call last): File "config_generator in C:\Users\clp\AppData\Roaming\Sublime Text 3\Installed Packages\Maven.sublime-package", line 43, in generate_config TypeError: 'NoneType' object is not iterable

maybenull commented 10 years ago

same here. linux mint 14

fyi - not sure this plugin is to support version 3 of sublime, but meh

Sebl29 commented 10 years ago

+1. Due to SublimeLinter I did change to the last beta of Sublime 3 (build 3059; 17 December 2013). But for every project I am working for I need Maven ;-) So now would be the right time to work on an update.

nlloyd commented 10 years ago

I guess it is about time I started paying attention to this project again :-) Plus it will give me some experience with migrating to Sublime Text 3 for my more complicated plugin project.

primeminister commented 10 years ago

how is it going with ST3 support?

nlloyd commented 10 years ago

Nearly there primeminister. This morning managed to get project generation working again, though it looks like for mvn process execution the output panel API has changed in more ways than just changing some function names.

mistermark commented 10 years ago

+1 here. Just installed on ST3, but no luck getting the Build option.

primeminister commented 10 years ago

@nlloyd no worries. Keep up the good work. If you need me to look into something or test it then let me know.

nlloyd commented 10 years ago

Folks: the sublime3 branch has a working, albeit not 100% tested (still working on that) compatible version of this plugin. Feel free to manually clone and test things out. I am going to test this a bit more today then make it available through Package Control.

Sebl29 commented 10 years ago

Hi Nick, I cloned it (~/.config/sublime-text-3/Packages/SublimeMaven), copied the configuration from my Sublime2 Settings into "Settings - User", but still no entry in the context menu. So, how do you execute it?

Btw: I would prefer to have a shortcut (at least for the last executed maven-build, or be able to define shortcuts for different maven_menu_commands).

nlloyd commented 10 years ago

@Sebl29 I have so far only tested on my personal computer (Mac), I will give this a try on a linux VM though if you could provide me more details on the OS it may help. Context menu should be added when the plugin is loaded (Side Bar.sublime-menu is the file in question). I will investigate more.

I will also put in some documentation on adding shortcuts, maybe even make up some defaults :-)

Sebl29 commented 10 years ago

Ah, good you mentioned a file, which is not part of the 'master' branch. Then I looked into branches :-); sorry my fault! So everybody, don't forget to do a "git checkout origin/sublime3" ;-)

Thanks Nick, I will test in the office, starting tomorrow! For the moment, I see a first "BUILD SUCCESS"!

calope commented 10 years ago

Hi,

I've tested the s3 branch and got this error in the console: Traceback (most recent call last): File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 73, in reload_plugin m = importlib.import_module(modulename) File "X/importlib/init.py", line 88, in import_module File "", line 1577, in _gcd_import File "", line 1558, in _find_and_load File "", line 1525, in _find_and_load_unlocked File "", line 586, in _check_name_wrapper File "", line 1023, in load_module File "", line 1004, in load_module File "", line 562, in module_for_loader_wrapper File "", line 869, in _load_module File "", line 313, in _call_with_frames_removed File "/Users/clp/Library/Application Support/Sublime Text 3/Packages/SublimeMaven-sublime3/import.py", line 37, in from Maven.utils import ui ImportError: No module named 'Maven' reloading plugin SublimeMaven-sublime3.maven Traceback (most recent call last): File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 73, in reload_plugin m = importlib.import_module(modulename) File "X/importlib/init.py", line 88, in import_module File "", line 1577, in _gcd_import File "", line 1558, in _find_and_load File "", line 1525, in _find_and_load_unlocked File "", line 586, in _check_name_wrapper File "", line 1023, in load_module File "", line 1004, in load_module File "", line 562, in module_for_loader_wrapper File "", line 869, in _load_module File "", line 313, in _call_with_frames_removed File "/Users/clp/Library/Application Support/Sublime Text 3/Packages/SublimeMaven-sublime3/maven.py", line 41, in from Maven.utils.mvn import pom ImportError: No module named 'Maven'

calope commented 10 years ago

Ok, It's fixed.

The problem was the folder name must to be "Maven", and it was "SublimeMaven-sublime3". When I rename the folder to "Maven", the plugin works fine again.

Thank's a lot, great job!!!

nlloyd commented 10 years ago

Oh right I should probably write that down :-) I expect most folks will install this through package control and in there the plugin is named "Maven" so you need to be sure that if you clone it directly to name the destination folder "Maven".