vaadin / maven-plugin

Vaadin Maven Plug-in
4 stars 18 forks source link

mvn clean throws and NPE when declared GWT module doesn't exist #53

Closed vaadin-bot closed 9 years ago

vaadin-bot commented 9 years ago

Originally by @Wnt


Add a module declaration to the vaadin-maven-plugin, e.g.

<configuration>
    <modules>
        <module>com.example.ui.MyWidgetSet</module>
    </modules>
</configuration

if the file MyWidgetSet.gwt.xml doesn't exist in the classpath, 'mvn clean' fails with message [ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:7.4.0:clean (default) on project MyProject: Execution default of goal com.vaadin:vaadin-maven-plugin:7.4.0:clean failed. NullPointerException -> [Help 1]

This file is auto generated by the vaadin:update-widgetset, so ideally it should not be kept in version control when sharing a project with a team. This bug causes the initial 'mvn clean install' to fail on a freshly checkouted projects.


Imported from https://dev.vaadin.com/ issue #17125

vaadin-bot commented 9 years ago

Originally by proaccountapp


Updated prioritization date.

vaadin-bot commented 9 years ago

Originally by afansky


Can you please provide a sample project where this issue can be reproduced? I tried creating a new project from the vaadin-archetype-clean archetype, added a non existing module to vaadin-maven-plugin configuration and mvn clean worked fine. I ran it from the bash command line. According to the error message it looks like it was run from Eclipse, can you check if the issue also occurs when run from the command line?

vaadin-bot commented 9 years ago

Originally by @Wnt


As far as I know vaadin-archetype-clean is an archetype for Vaadin 6. The original message might have been copied from Eclipse's Maven console, but I get the exact same message also from the command line: [ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:7.4.8:clean (default) on project vaadin-ticket-test: Execution default of goal com.vaadin:vaadin-maven-plugin:7.4.8:clean failed. NullPointerException -> [Help 1]

I created a sample project where this issue can be reproduced: https://github.com/Wnt/vaadin-ticket-17125

I noticed that the problem only happens when you add the clean goal to the vaadin-maven-plugin executions. Sometimes having the clean execution there is useful eg. if you compile the widget set in to src/main/webapp.

vaadin-bot commented 9 years ago

Originally by method


Exact same thing happens to me with the resources goal. Unfortunately I don't know either Maven nor the Vaadin plugin well enough to contribute more than that. As soon as I removed the clean and resources goals MyWidgetSet.gwt.xml was created and the widgetset was successfully built.

vaadin-bot commented 9 years ago

Originally by @Artur-


https://dev.vaadin.com/review/#/c/11507