Home Download Buy Blog Forum Support

Working with Tomcat and Maven

Working with Tomcat and Maven

Postby Ninerian on Fri Jun 01, 2012 8:21 am

Hello,

at work, we develop java applications and are using Eclipse. As Frontenddev I would like to switch completely to Sublime, but its missing a feature of Eclipse, I cant work without it.
When developing, I had to build the project with maven and publish it to a tomcat server. Eclipse does this all automatically and also republish changed files.
I came so far, building the app with maven and publish it to tomcat with the maven-tomcat plugin. But with Tomcat 7 republishing isn't possible and changed files aren't copied to the working directory. So I have to leave Eclipse open and refresh its workspace everytime I changed files in Sublime.

Would it be possible to integrate this functionality into Sublime?
Ninerian
 
Posts: 1
Joined: Fri Jun 01, 2012 8:16 am

Re: Working with Tomcat and Maven

Postby Francisc on Wed Nov 21, 2012 4:42 pm

I'd like to know as well.
Currently I have to alternate between IntelliJ and ST.
Francisc
 
Posts: 55
Joined: Thu Sep 22, 2011 7:14 pm

Re: Working with Tomcat and Maven

Postby anise on Tue Jul 16, 2013 5:22 pm

Did you ever find a solution? I'm struggling with this exact same problem.
anise
 
Posts: 1
Joined: Tue Jul 16, 2013 5:20 pm

Re: Working with Tomcat and Maven

Postby modipeluri on Thu Jan 09, 2014 10:25 am

I would also be interested in finding a solution.

The current workflow of swapping between Eclipse (or Spring tool suite) and Sublime text is pretty irritating.
modipeluri
 
Posts: 1
Joined: Thu Jan 09, 2014 10:22 am

Re: Working with Tomcat and Maven

Postby Mishima01 on Mon Jan 26, 2015 11:36 am

True, but some people are forced to use windows but would still like to be able to do normal things like setting up a batch process that involves the usage of SublimeText. I have no choice but to use windows at work and often create dos batch scripts to help with repetitive tasks. Having good command line access to applications has saved me a lot of time and seriously reduced the risk of human error creeping into some daily tasks that I need to perform.
Mishima01
 
Posts: 1
Joined: Mon Jan 26, 2015 11:30 am

Re: Working with Tomcat and Maven

Postby bsauls on Wed Feb 18, 2015 7:40 pm

I use a grunt watch task to handle a Spring Tools Maven project. Here is part of the code that updates the grunt run server (which is dependent on the STS tc server). Just Google "grunt watch" for guidelines on setting up something like this.
Code: Select all
        // Watches files for changes and runs tasks based on the changed files
        watch: {
            less: {
                files: ['<%= config.app %>/styles/{,*/}*.less', '<%= config.app %>/bower_components/{,*/}*.{less}'],
                tasks: ['less:server','buildBootstrap','autoprefixer']
            },
            bower: {
                files: ['bower.json'],
                tasks: ['bowerInstall']
            },
            js: {
                files: ['<%= config.app %>/js/**/*.js'],
                tasks: ['jshint'],
                options: {
                    livereload: true
                }
            },
            jstest: {
                files: ['test/spec/{,*/}*.js'],
                tasks: ['test:watch']
            },
            gruntfile: {
                files: ['Gruntfile.js']
            },
            styles: {
                files: ['<%= config.app %>/styles/**/*.css'],
                tasks: ['copy:styles', 'copy:vendorstyles', 'autoprefixer']
            },
            livereload: {
                options: {
                    livereload: '<%= connect.options.livereload %>'
                },
                files: [
                    '<%= config.app %>/templates/**/*.html',
                    '.tmp/styles/{,*/}*.css',
                    '<%= config.app %>/images/{,*/}*',
                    '{.tmp,<%= config.app %>}/scripts/**/*.js',
                ]
            }
        },

        // The actual grunt server settings
        connect: {
            options: {
                port: 9000,
                open: true,
                livereload: 35729,
                // Change this to '0.0.0.0' to access the server from outside
                hostname: 'localhost'
            },
            livereload: {
                options: {
                    middleware: function(connect) {
                        return [
                            connect.static('.tmp'),
                            connect().use('/<%= config.app %>/bower_components', connect.static('./<%= config.app %>/bower_components')),
                            connect.static(config.app)
                        ];
                    }
                }
            },
            test: {
                options: {
                    open: false,
                    port: 9001,
                    middleware: function(connect) {
                        return [
                            connect.static('.tmp'),
                            connect.static('test'),
                            connect().use('/<%= config.app %>/bower_components', connect.static('./<%= config.app %>/bower_components')),
                            connect().use('/<%= config.app %>/test/bower_components', connect.static('./<%= config.app %>/test/bower_components')),
                            connect.static(config.app)
                        ];
                    }
                }
            },
            dist: {
                options: {
                    base: '<%= config.dist %>',
                    livereload: false
                }
            }
        },
bsauls
 
Posts: 1
Joined: Wed Feb 18, 2015 7:26 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests