jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven Integration for Eclipse
  • MNGECLIPSE-565

add support for custom goals to run after project import

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

The sysdeo-tomcat-plugin (mojo project) - for example - is usefull to configure sysdeo tomcat eclispe-plugin as an alternative to WTP.

It must run during the project import into eclipse (or after dependency changes in POMs)

m2eclipse should propose a custom additional goal editor to setup such goals to run during project checkout.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    test.zip
    06/May/08 3:53 AM
    8 kB
    nicolas de loof
    1. File
      .classpath 0.3 kB
    2. File
      .project 0.5 kB
    3. File
      .settings/org.maven.ide.eclipse.prefs 0.2 kB
    4. File
      one/.classpath 0.5 kB
    5. File
      one/.project 0.5 kB
    6. File
      one/.../org.maven.ide.eclipse.prefs 0.2 kB
    7. XML File
      one/pom.xml 0.4 kB
    8. XML File
      pom.xml 0.5 kB
    9. File
      two/.classpath 0.5 kB
    10. File
      two/.project 0.5 kB
    11. File
      two/.../org.maven.ide.eclipse.prefs 0.2 kB
    12. File
      two/.tomcatplugin 0.7 kB
    13. XML File
      two/pom.xml 0.9 kB
    14. XML File
      two/src/main/webapp/META-INF/context.xml 0.0 kB
    15. File
      two/target/mvn-eclipse-cache.properties 0.1 kB
    Download Zip
    Show
    Zip Archive
    test.zip
    06/May/08 3:53 AM
    8 kB
    nicolas de loof

Issue Links

duplicates

Wish - General wishlist item MNGECLIPSE-354 Select goals to run after selecting poms of projects to import

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Open - The issue is open and ready for the assignee to start work on it.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Igor Fedorenko added a comment - 23/Apr/08 10:16 AM

Nicolas,

Have a look at http://docs.codehaus.org/display/M2ECLIPSE/Extensible+project+import+and+configuration+framework. I think it should address your needs. Let me know if you run into problems or have ideas on how to improve this framework.

Show
Igor Fedorenko added a comment - 23/Apr/08 10:16 AM Nicolas, Have a look at http://docs.codehaus.org/display/M2ECLIPSE/Extensible+project+import+and+configuration+framework. I think it should address your needs. Let me know if you run into problems or have ideas on how to improve this framework.
Hide
Permalink
nicolas de loof added a comment - 23/Apr/08 10:24 AM

Maybe I'm wrong, but this requires to create a dedicated extension to m2eclipse as an eclipse plugin.

This requires me much efforts to port my favorite tool to m2eclipse : maven, eclipse and the tool itself ...

Show
nicolas de loof added a comment - 23/Apr/08 10:24 AM Maybe I'm wrong, but this requires to create a dedicated extension to m2eclipse as an eclipse plugin. This requires me much efforts to port my favorite tool to m2eclipse : maven, eclipse and the tool itself ...
Hide
Permalink
Igor Fedorenko added a comment - 23/Apr/08 12:06 PM

Actually, you are right, this is indeed different feature from extensible project import/configuration.

Show
Igor Fedorenko added a comment - 23/Apr/08 12:06 PM Actually, you are right, this is indeed different feature from extensible project import/configuration.
Hide
Permalink
Eugene Kuleshov added a comment - 23/Apr/08 12:55 PM - edited

Nicolas, can you please attach a complete project with maven-eclipse-plugin and sysdeo-tomcat-maven-plugin configuration and some sample app that would allow us to test it?

http://www.eclipsetotale.com/tomcatPlugin.html
http://mojo.codehaus.org/sysdeo-tomcat-maven-plugin/

Show
Eugene Kuleshov added a comment - 23/Apr/08 12:55 PM - edited Nicolas, can you please attach a complete project with maven-eclipse-plugin and sysdeo-tomcat-maven-plugin configuration and some sample app that would allow us to test it? http://www.eclipsetotale.com/tomcatPlugin.html http://mojo.codehaus.org/sysdeo-tomcat-maven-plugin/
Hide
Permalink
nicolas de loof added a comment - 23/Apr/08 1:13 PM

http://platina.svn.sf.net/svnroot/platina/trunk/platina-archetype/

This project is used to build a multi-module archetype 'from-project'

running mvn -P setup creates the required eclipse configuration, including the .tomcatPlugin in the war module.

Show
nicolas de loof added a comment - 23/Apr/08 1:13 PM http://platina.svn.sf.net/svnroot/platina/trunk/platina-archetype/ This project is used to build a multi-module archetype 'from-project' running mvn -P setup creates the required eclipse configuration, including the .tomcatPlugin in the war module.
Hide
Permalink
Eugene Kuleshov added a comment - 04/May/08 11:20 PM

Nicolas, project does not exist at that svn location and mvn build fail from the command line for the project I found in that svn tree. Can you please attach small project that woulld have this issue isolated and will allow us to reproduce this.

Also note that we added project import configurator for sysdeo Maven plugin, so your use case is probably already covered. we just need something to test that.

Show
Eugene Kuleshov added a comment - 04/May/08 11:20 PM Nicolas, project does not exist at that svn location and mvn build fail from the command line for the project I found in that svn tree. Can you please attach small project that woulld have this issue isolated and will allow us to reproduce this. Also note that we added project import configurator for sysdeo Maven plugin, so your use case is probably already covered. we just need something to test that.
Hide
Permalink
nicolas de loof added a comment - 05/May/08 12:33 AM

Sorry, I changed the SVN layout to http://platina.svn.sf.net/svnroot/platina/platina-archetype/trunk/.

build may fail as there is some non-public dependencies (oracle driver and others)

I'll test this configurator.

Show
nicolas de loof added a comment - 05/May/08 12:33 AM Sorry, I changed the SVN layout to http://platina.svn.sf.net/svnroot/platina/platina-archetype/trunk/. build may fail as there is some non-public dependencies (oracle driver and others) I'll test this configurator.
Hide
Permalink
nicolas de loof added a comment - 05/May/08 5:52 AM

I've tested the configurator but it doesn't work well :

When generated from command line, the .tomcatPlugin contains M2_REPO references to the war project compile/runtime dependencies, and to other project modules target/classes

When generated via m2celipse, the .tomcatPlugin only refers to 1rst level module dependencies : If my webapp has dependency to "business", and transitively to "persistence", I only can setup sysdeo tomcat to use business/target/classes, not persistence/target/classes, as latest is not declared as a project dependency in my .project

None of the maven dependencies are checked in the sysdeo tomcat plugin pannel. The generated .tomcatPlugin contains the expected M2_REPO/* references, but I supposed they are ignored as not beeing in the project classpath. The m2eclipse classpath container does not distinct runtime and test scopes, so cannot be used here.

The sysdeo-tomcat plugin uses target/classes as binary folder. The m2eclipse uses target-eclipse/classes, so the folder is not included in the tomcat configuration (This may be a mojo bug). The option to set "use maven output folder" should be a global m2eclipse preference setting.

The resource folders are configured by m2eclipse to output in same source folder, not in target (is this a bug ?). Based on this no resource will be accessible in the tomcat configuration.

I can help fixing some issues on the Mojo side, but the m2eclipse classpath container is a blocking one.

Show
nicolas de loof added a comment - 05/May/08 5:52 AM I've tested the configurator but it doesn't work well : When generated from command line, the .tomcatPlugin contains M2_REPO references to the war project compile/runtime dependencies, and to other project modules target/classes When generated via m2celipse, the .tomcatPlugin only refers to 1rst level module dependencies : If my webapp has dependency to "business", and transitively to "persistence", I only can setup sysdeo tomcat to use business/target/classes, not persistence/target/classes, as latest is not declared as a project dependency in my .project None of the maven dependencies are checked in the sysdeo tomcat plugin pannel. The generated .tomcatPlugin contains the expected M2_REPO/* references, but I supposed they are ignored as not beeing in the project classpath. The m2eclipse classpath container does not distinct runtime and test scopes, so cannot be used here. The sysdeo-tomcat plugin uses target/classes as binary folder. The m2eclipse uses target-eclipse/classes, so the folder is not included in the tomcat configuration (This may be a mojo bug). The option to set "use maven output folder" should be a global m2eclipse preference setting. The resource folders are configured by m2eclipse to output in same source folder, not in target (is this a bug ?). Based on this no resource will be accessible in the tomcat configuration. I can help fixing some issues on the Mojo side, but the m2eclipse classpath container is a blocking one.
Hide
Permalink
nicolas de loof added a comment - 05/May/08 10:31 AM

I made some changes to the sysdeo mojo to support execution from m2eclipse. I'll create a dedicated goal sysdeo-tomcat:m2eclipse for this.

First, it generates dependency path in .tomcatPlugin with absolute path (in replacement for M2_REPO) that is accepted by the eclipse sysdeo plugin. This is not very clean but solves the classpath container issue.

I also copy/pasted code from the eclipse plugin to discover other projects available in the workspace. The plugin is expected to run in reactor to retrieve other modules. This configuration is more flexible, and works when ran in single module mode.

I use the .classpath to detect the output folder, when set by m2eclipse to "target-eclipse/classes.

I now still have an issue with the resource folder that is mapped to itself by m2eclipse, and not to the output folder.

Show
nicolas de loof added a comment - 05/May/08 10:31 AM I made some changes to the sysdeo mojo to support execution from m2eclipse. I'll create a dedicated goal sysdeo-tomcat:m2eclipse for this. First, it generates dependency path in .tomcatPlugin with absolute path (in replacement for M2_REPO) that is accepted by the eclipse sysdeo plugin. This is not very clean but solves the classpath container issue. I also copy/pasted code from the eclipse plugin to discover other projects available in the workspace. The plugin is expected to run in reactor to retrieve other modules. This configuration is more flexible, and works when ran in single module mode. I use the .classpath to detect the output folder, when set by m2eclipse to "target-eclipse/classes. I now still have an issue with the resource folder that is mapped to itself by m2eclipse, and not to the output folder.
Hide
Permalink
Eugene Kuleshov added a comment - 05/May/08 11:00 AM

Nicolas, you can set m2eclipse to use target folder by enabling "use maven output folder" flag in project import wizards and/or in Maven properties for given project. Anyways, there is very little we can do without test project.

About "issue with the resource folder that is mapped to itself". Generally this is by design. If this approach breaks some particular functionality, please open separate jira issue and provide test project and step by step instructions how to reproduce particular erroneous behavior.

Show
Eugene Kuleshov added a comment - 05/May/08 11:00 AM Nicolas, you can set m2eclipse to use target folder by enabling "use maven output folder" flag in project import wizards and/or in Maven properties for given project. Anyways, there is very little we can do without test project. About "issue with the resource folder that is mapped to itself". Generally this is by design. If this approach breaks some particular functionality, please open separate jira issue and provide test project and step by step instructions how to reproduce particular erroneous behavior.
Hide
Permalink
nicolas de loof added a comment - 05/May/08 12:51 PM

Is there any system propery set by m2eclipse to expose the output directory to be used in the current project during configuration ?

I'll prepare a simplified test project to demonstrate the sysdeo-tomcat integration.

Show
nicolas de loof added a comment - 05/May/08 12:51 PM Is there any system propery set by m2eclipse to expose the output directory to be used in the current project during configuration ? I'll prepare a simplified test project to demonstrate the sysdeo-tomcat integration.
Hide
Permalink
nicolas de loof added a comment - 06/May/08 3:53 AM

I've applied the required changes to the sysdeo-tomcat mojo and deployed a snapshot.

This requires to change the m2eclipse plugin.xml to use the sysdeo-tomcat:m2eclipse goal

<configurator id="org.maven.ide.eclipse.configurator.mavenSysdeoTomcatPlugin"
class="org.maven.ide.eclipse.project.configurator.MavenProjectConfigurator:org.codehaus.mojo:sysdeo-tomcat-maven-plugin| sysdeo-tomcat:m2eclipse"
name="sysdeo-tomcat-maven-plugin" priority="50"/>

The attached project can be used to test the integration. The sysdeo-tomcat eclipse plugin is expected to get configured : "is a tomcat project" checked, and "devloader" tab enabled with project dependencies and module "one" output directory.

Show
nicolas de loof added a comment - 06/May/08 3:53 AM I've applied the required changes to the sysdeo-tomcat mojo and deployed a snapshot. This requires to change the m2eclipse plugin.xml to use the sysdeo-tomcat:m2eclipse goal
<configurator id="org.maven.ide.eclipse.configurator.mavenSysdeoTomcatPlugin" class="org.maven.ide.eclipse.project.configurator.MavenProjectConfigurator:org.codehaus.mojo:sysdeo-tomcat-maven-plugin| sysdeo-tomcat:m2eclipse" name="sysdeo-tomcat-maven-plugin" priority="50"/>
The attached project can be used to test the integration. The sysdeo-tomcat eclipse plugin is expected to get configured : "is a tomcat project" checked, and "devloader" tab enabled with project dependencies and module "one" output directory.
Hide
Permalink
Eugene Kuleshov added a comment - 09/May/08 1:58 AM

Nicolas, you lost me. Why did you have to change maven plugin and why there is something specific to m2eclipse is required?

Show
Eugene Kuleshov added a comment - 09/May/08 1:58 AM Nicolas, you lost me. Why did you have to change maven plugin and why there is something specific to m2eclipse is required?
Hide
Permalink
Eugene Kuleshov added a comment - 22/May/08 12:07 PM

Any update on this? Do we need to do anything in m2eclipse or this issue can be closed now? Thanks

Show
Eugene Kuleshov added a comment - 22/May/08 12:07 PM Any update on this? Do we need to do anything in m2eclipse or this issue can be closed now? Thanks
Hide
Permalink
Eugene Kuleshov added a comment - 22/May/08 1:46 PM

Consolidating similar issues into one. Please comment on MNGECLIPSE-354

Show
Eugene Kuleshov added a comment - 22/May/08 1:46 PM Consolidating similar issues into one. Please comment on MNGECLIPSE-354
Hide
Permalink
nicolas de loof added a comment - 23/May/08 12:59 AM

right,

I have to investigate more on mojo side to use m2eclipse layout.

regarding the orinigial issue, it would be nice to be able to plug any custom goal invocation without having to patch the m2eclipse code. Let's consider the new springide-maven-plugin at mojo. This could be packaged as a configuration contributor, but to use it now I need to patch m2eclipse. I'd like to have an option to specify a set of custom goals to run during project setup.

Show
nicolas de loof added a comment - 23/May/08 12:59 AM right, I have to investigate more on mojo side to use m2eclipse layout. regarding the orinigial issue, it would be nice to be able to plug any custom goal invocation without having to patch the m2eclipse code. Let's consider the new springide-maven-plugin at mojo. This could be packaged as a configuration contributor, but to use it now I need to patch m2eclipse. I'd like to have an option to specify a set of custom goals to run during project setup.

People

  • Assignee:
    Unassigned
    Reporter:
    nicolas de loof
Vote (0)
Watch (0)

Dates

  • Created:
    23/Apr/08 10:06 AM
    Updated:
    23/May/08 12:59 AM
    Resolved:
    22/May/08 1:46 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.