Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maven plugin can not refresh Plugin Goals #340

Closed
SilenceUrStep opened this issue Jun 10, 2019 · 15 comments
Closed

maven plugin can not refresh Plugin Goals #340

SilenceUrStep opened this issue Jun 10, 2019 · 15 comments
Assignees
Labels
bug Something isn't working completed
Milestone

Comments

@SilenceUrStep
Copy link

SilenceUrStep commented Jun 10, 2019

Describe the bug
import a project,wait for maven end compile project and like this pic->
image

there is no Goals; this happends when i update my vscode,please help! :[

image

@Eskibear
Copy link
Member

I myself cannot reproduce it.

Based on your output, it looks that help:describe goal is succesfully executed to fetch detailed info of the plugin. Can you check the content of the temp file (in you log, after "Wrote description to"), see if the help:describe gets the correct output.

@Eskibear Eskibear added the needs more info Further information is requested label Jun 11, 2019
@SilenceUrStep
Copy link
Author

SilenceUrStep commented Jun 11, 2019

I myself cannot reproduce it.

Based on your output, it looks that help:describe goal is succesfully executed to fetch detailed info of the plugin. Can you check the content of the temp file (in you log, after "Wrote description to"), see if the help:describe gets the correct output.

is empty,
image
image

@no-response no-response bot removed the needs more info Further information is requested label Jun 11, 2019
@SilenceUrStep SilenceUrStep reopened this Jun 11, 2019
@Eskibear
Copy link
Member

Oh the temp file will be cleaned automatically, sorry about the confusion.

You may mannually execute the help:describe command to see if it gets the correct result.
The corresponding arguments can be also found in your output channel.
e.g.
Screen Shot 2019-06-11 at 1 49 03 PM

Then I shall execute following command. (replace the plugin id with your own)

mvn help:describe -Dplugin=org.springframework.boot:spring-boot-maven-plugin:2.1.3.RELEASE

I get below output

Name: Spring Boot Maven Plugin
Description: Spring Boot Maven Plugin
Group Id: org.springframework.boot
Artifact Id: spring-boot-maven-plugin
Version: 2.1.3.RELEASE
Goal Prefix: spring-boot

This plugin has 6 goals:

spring-boot:build-info
  Description: Generate a build-info.properties file based the content of the
    current MavenProject.

spring-boot:help
  Description: Display help information on spring-boot-maven-plugin.
    Call mvn spring-boot:help -Ddetail=true -Dgoal=<goal-name> to display
    parameter details.

......

@SilenceUrStep
Copy link
Author

SilenceUrStep commented Jun 11, 2019

Oh the temp file will be cleaned automatically, sorry about the confusion.

You may mannually execute the help:describe command to see if it gets the correct result.
The corresponding arguments can be also found in your output channel.
e.g.
Screen Shot 2019-06-11 at 1 49 03 PM

Then I shall execute following command. (replace the plugin id with your own)

mvn help:describe -Dplugin=org.springframework.boot:spring-boot-maven-plugin:2.1.3.RELEASE

I get below output

Name: Spring Boot Maven Plugin
Description: Spring Boot Maven Plugin
Group Id: org.springframework.boot
Artifact Id: spring-boot-maven-plugin
Version: 2.1.3.RELEASE
Goal Prefix: spring-boot

This plugin has 6 goals:

spring-boot:build-info
  Description: Generate a build-info.properties file based the content of the
    current MavenProject.

spring-boot:help
  Description: Display help information on spring-boot-maven-plugin.
    Call mvn spring-boot:help -Ddetail=true -Dgoal=<goal-name> to display
    parameter details.

......

here is my command and result

mvn help:describe -Dplugin="org.mortbay.jetty:jetty-maven-plugin:8.1.14.v20131031"
Name: Jetty :: Jetty Maven Plugin
Description: Jetty integrations and distributions
Group Id: org.mortbay.jetty
Artifact Id: jetty-maven-plugin
Version: 8.1.14.v20131031
Goal Prefix: jetty

This plugin has 8 goals:

jetty:deploy-war
  Description: This goal is used to run Jetty with a pre-assembled war.

    It accepts exactly the same options as the run-war goal. However, it
    doesn't assume that the current artifact is a webapp and doesn't try to
    assemble it into a war before its execution. So using it makes sense only
    when used in conjunction with the webApp configuration parameter pointing
    to a pre-built WAR.

    This goal is useful e.g. for launching a web app in Jetty as a target for
    unit-tested HTTP client components.

jetty:help
  Description: Display help information on jetty-maven-plugin.
    Call
     mvn jetty:help -Ddetail=true -Dgoal=<goal-name>
    to display parameter details.

jetty:run
  Description: This goal is used in-situ on a Maven project without first
    requiring that the project is assembled into a war, saving time during the
    development cycle. The plugin forks a parallel lifecycle to ensure that the
    'compile' phase has been completed before invoking Jetty. This means that
    you do not need to explicity execute a 'mvn compile' first. It also means
    that a 'mvn clean jetty:run' will ensure that a full fresh compile is done
    before invoking Jetty.

    Once invoked, the plugin can be configured to run continuously, scanning
    for changes in the project and automatically performing a hot redeploy when
    necessary. This allows the developer to concentrate on coding changes to
    the project using their IDE of choice and have those changes immediately
    and transparently reflected in the running web container, eliminating
    development time that is wasted on rebuilding, reassembling and
    redeploying.

    You may also specify the location of a jetty.xml file whose contents will
    be applied before any plugin configuration. This can be used, for example,
    to deploy a static webapp that is not part of your maven build.

    There is a reference guide to the configuration parameters for this plugin,
    and more detailed information with examples in the Configuration Guide.

jetty:run-exploded
  Description: This goal is used to assemble your webapp into an exploded war
    and automatically deploy it to Jetty.

    Once invoked, the plugin can be configured to run continuously, scanning
    for changes in the pom.xml and to WEB-INF/web.xml, WEB-INF/classes or
    WEB-INF/lib and hot redeploy when a change is detected.

    You may also specify the location of a jetty.xml file whose contents will
    be applied before any plugin configuration. This can be used, for example,
    to deploy a static webapp that is not part of your maven build.

    There is a reference guide to the configuration parameters for this plugin,
    and more detailed information with examples in the Configuration Guide.

jetty:run-forked
  Description: This goal is used to assemble your webapp into a war and
    automatically deploy it to Jetty in a forked JVM.

    You need to define a jetty.xml file to configure connectors etc and a
    context xml file that sets up anything special about your webapp. This
    plugin will fill in the:

    - context path
    - classes
    - web.xml
    - root of the webapp
    Based on a combination of information that you supply and the location of
    files in your unassembled webapp.


    There is a reference guide to the configuration parameters for this plugin,
    and more detailed information with examples in the Configuration Guide.

jetty:run-war
  Description: This goal is used to assemble your webapp into a war and
    automatically deploy it to Jetty.

    Once invoked, the plugin can be configured to run continuously, scanning
    for changes in the project and to the war file and automatically performing
    a hot redeploy when necessary.

    You may also specify the location of a jetty.xml file whose contents will
    be applied before any plugin configuration. This can be used, for example,
    to deploy a static webapp that is not part of your maven build.

    There is a reference guide to the configuration parameters for this plugin,
    and more detailed information with examples in the Configuration Guide.

jetty:start
  Description: This goal is similar to the jetty:run goal, EXCEPT that it is
    designed to be bound to an execution inside your pom, rather than being run
    from the command line.

    When using it, be careful to ensure that you bind it to a phase in which
    all necessary generated files and classes for the webapp will have been
    created. If you run it from the command line, then also ensure that all
    necessary generated files and classes for the webapp already exist.

jetty:stop
  Description: JettyStopMojo - stops a running instance of jetty. The ff are
    required: -DstopKey=someKey -DstopPort=somePort

For more information, run 'mvn help:describe [...] -Ddetail'

@Eskibear
Copy link
Member

The result looks good... meaning the culprit should be in this extension's code...

  • Help-> Toggle Developer Tools, see if there's any suspicious error log.
  • Try this simple SpringBoot project, see if the issue still occurs :test-maven-project.zip If the issue still occurs, then it's probably related to specific settings of your machine, you might need to clone the repo and debug it by yourself.

@SilenceUrStep
Copy link
Author

SilenceUrStep commented Jun 11, 2019

i try ur project , but there's no problem at all, show u the picture
image

and i use Developer Tools,got some error log , show u the picture
image

here is the log

(node:1268) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ /C:/code_env/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:238

and i saw this plugin's goal of ur project flush across and disappear immediately
image

i remember this plugin is to start the project with tomcat core

@Eskibear
Copy link
Member

So it only occurs for your project. You may try the following:
Right Click on the plugin(e.g. the jetty plugin) -> Click "Refresh", see if it gets back to work.
If not, can you share your project with us?

BTW, the DeprecationWarning in the log is known to have nothing to do with this issue.

@Eskibear Eskibear added the needs more info Further information is requested label Jun 14, 2019
@no-response
Copy link

no-response bot commented Jun 28, 2019

This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.

@no-response no-response bot closed this as completed Jun 28, 2019
@andreashouben
Copy link

I have the same issue with our project. Because I cannot share it, I created a small demo project which shows the same issue.

grafik

I attached it as .zip. [demo.zip](https://github.com/microsoft/vscode-maven/files/3386826/demo.zip)

@andreashouben
Copy link

Running mvn help generates output though:

mvn help:describe -Dplugin=org.apache.maven.plugins:maven-compiler-plugin:3.8.0                                                                                                          10211  16:42:58
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-help-plugin:3.2.0:describe (default-cli) @ standalone-pom ---
[INFO] org.apache.maven.plugins:maven-compiler-plugin:3.8.0

Name: Apache Maven Compiler Plugin
Description: The Compiler Plugin is used to compile the sources of your
  project.
Group Id: org.apache.maven.plugins
Artifact Id: maven-compiler-plugin
Version: 3.8.0
Goal Prefix: compiler

This plugin has 3 goals:

compiler:compile
  Description: Compiles application sources

compiler:help
  Description: Display help information on maven-compiler-plugin.
    Call mvn compiler:help -Ddetail=true -Dgoal=<goal-name> to display
    parameter details.

compiler:testCompile
  Description: Compiles application test sources.

For more information, run 'mvn help:describe [...] -Ddetail'

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.360 s
[INFO] Finished at: 2019-07-12T16:43:31+02:00
[INFO] ------------------------------------------------------------------------

@Eskibear
Copy link
Member

Eskibear commented Jul 13, 2019

@andreashouben Thank you for providing the project, and I can reproduce it.
After the very initial investigation, I find it's probably because of unexpected ANSI escape code in the output. E.g. ESC[m

image

@Eskibear Eskibear reopened this Jul 13, 2019
@Eskibear Eskibear added bug Something isn't working and removed needs more info Further information is requested labels Jul 13, 2019
@Eskibear Eskibear added this to the 0.19.0 milestone Jul 13, 2019
@Eskibear Eskibear self-assigned this Jul 15, 2019
@Eskibear
Copy link
Member

@andreashouben @SilenceUrStep Can you have a try with the latest build below?
vscode-maven.zip

@SilenceUrStep
Copy link
Author

image
i've try ur new plugin,it works,many thanks!

@andreashouben
Copy link

grafik

Yes! Now it works :-) I do have the issue though that the extended entries tend to collapse after loading. But that's just a minor issue. Thank you!

@Eskibear
Copy link
Member

Thank you for verification, I'm closing it now. And the fix should be released soon, in v0.18.1

I do have the issue though that the extended entries tend to collapse after loading. But that's just a minor issue.

I've created a new issue to track that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working completed
Projects
None yet
Development

No branches or pull requests

3 participants