maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aherit...@apache.org
Subject svn commit: r584685 - in /maven/plugins/trunk/maven-eclipse-plugin/src: main/java/org/apache/maven/plugin/eclipse/ main/java/org/apache/maven/plugin/eclipse/writers/ main/java/org/apache/maven/plugin/eclipse/writers/rad/ main/java/org/apache/maven/plug...
Date Mon, 15 Oct 2007 05:52:00 GMT
Author: aheritier
Date: Sun Oct 14 22:51:58 2007
New Revision: 584685

URL: http://svn.apache.org/viewvc?rev=584685&view=rev
Log:
MECLIPSE-331: Allow to use a packaging model to override the packaging defined in the pom

Modified:
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadEjbClasspathWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadJ2EEWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebsiteConfigWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/AbstractWtpResourceWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponentWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpFacetsWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpmodulesWriter.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/  
(props changed)
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/  
(props changed)
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/webapp/META-INF/
  (props changed)
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/webapp/WEB-INF/
  (props changed)
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/  
(props changed)
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/
  (props changed)
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/  
(props changed)
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/src/main/
  (props changed)

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java
Sun Oct 14 22:51:58 2007
@@ -77,8 +77,6 @@
     /**
      * Packaging for the current project.
      * @parameter expression="${project.packaging}"
-     * @required
-     * @readonly
      */
     private String packaging;
 
@@ -195,6 +193,20 @@
     public void setBasedir( File basedir )
     {
         this.basedir = basedir;
+    }
+
+    /**
+     * @return the packaging
+     */
+    public String getPackaging() {
+        return this.packaging;
+    }
+
+    /**
+     * @param packaging the packaging to set
+     */
+    public void setPackaging(String packaging) {
+        this.packaging = packaging;
     }
 
 }

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
Sun Oct 14 22:51:58 2007
@@ -597,8 +597,6 @@
 
         ready = validate();
 
-        String packaging = executedProject.getPackaging();
-
         // TODO: Why are we using project in some places, and executedProject in others??
         ArtifactHandler artifactHandler = this.project.getArtifact().getArtifactHandler();
 
@@ -715,8 +713,6 @@
                             wtpversion, StringUtils.join( WTP_SUPPORTED_VERSIONS, " " ) }
) ); //$NON-NLS-1$
         }
 
-        String packaging = executedProject.getPackaging();
-
         assertNotEmpty( executedProject.getGroupId(), POM_ELT_GROUP_ID ); //$NON-NLS-1$
         assertNotEmpty( executedProject.getArtifactId(), POM_ELT_ARTIFACT_ID ); //$NON-NLS-1$
 
@@ -926,6 +922,7 @@
         config.setSourceDirs( sourceDirs );
         config.setAddVersionToProjectName( isAddVersionToProjectName() );
         config.setContextName( this.wtpContextName );
+        config.setPackaging(this.packaging);
 
         return config;
     }

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.java
Sun Oct 14 22:51:58 2007
@@ -96,13 +96,12 @@
     private void handleLibs()
         throws MojoExecutionException
     {
-        String packaging = this.project.getPackaging();
 
-        if ( Constants.PROJECT_PACKAGING_EAR.equals( packaging ) )
+        if ( Constants.PROJECT_PACKAGING_EAR.equals( getPackaging() ) )
         {
             handleEarLibs();
         }
-        else if ( Constants.PROJECT_PACKAGING_WAR.equals( packaging ) )
+        else if ( Constants.PROJECT_PACKAGING_WAR.equals( getPackaging() ) )
         {
             handleWarLibs();
         }

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java
Sun Oct 14 22:51:58 2007
@@ -163,8 +163,6 @@
             // written by the superclass
             new RadManifestWriter().init( getLog(), config ).write();
         }
-
-        String packaging = getExecutedProject().getPackaging();
         
         if ( isJavaProject() && !Constants.PROJECT_PACKAGING_EAR.equals( packaging
)
             && !Constants.PROJECT_PACKAGING_WAR.equals( packaging )

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java
Sun Oct 14 22:51:58 2007
@@ -38,6 +38,11 @@
      * The maven project.
      */
     private MavenProject project;
+    
+    /**
+     * The maven project packaging.
+     */
+    private String packaging;
 
     /**
      * Eclipse project dir.
@@ -418,6 +423,20 @@
     public void setContextName( String deployName )
     {
         this.contextName = deployName;
+    }
+
+    /**
+     * @return the packaging
+     */
+    public String getPackaging() {
+        return this.packaging;
+    }
+
+    /**
+     * @param packaging the packaging to set
+     */
+    public void setPackaging(String packaging) {
+        this.packaging = packaging;
     }
     
     public boolean getWtpapplicationxml()

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java
Sun Oct 14 22:51:58 2007
@@ -129,7 +129,7 @@
      */
     public void write() throws MojoExecutionException
     {
-        String packaging = config.getProject().getPackaging();
+        String packaging = config.getPackaging();
         if ( Constants.PROJECT_PACKAGING_EAR.equalsIgnoreCase( packaging ) )
         {
             File applicationXmlFile =

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadEjbClasspathWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadEjbClasspathWriter.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadEjbClasspathWriter.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadEjbClasspathWriter.java
Sun Oct 14 22:51:58 2007
@@ -91,7 +91,7 @@
     public void write()
         throws MojoExecutionException
     {
-        String packaging = config.getProject().getPackaging();
+        String packaging = config.getPackaging();
         if ( Constants.PROJECT_PACKAGING_EJB.equalsIgnoreCase( packaging ) )
         {
             new File( config.getEclipseProjectDirectory(), TARGET_WEBSPHERE_CLASSES ).mkdirs();

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadJ2EEWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadJ2EEWriter.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadJ2EEWriter.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadJ2EEWriter.java
Sun Oct 14 22:51:58 2007
@@ -67,7 +67,7 @@
     public void write() throws MojoExecutionException
     {
         FileWriter w;
-        String packaging = config.getProject().getPackaging();
+        String packaging = config.getPackaging();
 
         if ( Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( packaging )
                         || Constants.PROJECT_PACKAGING_EJB.equalsIgnoreCase( packaging )

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadLibCopier.java
Sun Oct 14 22:51:58 2007
@@ -51,10 +51,9 @@
     public void write()
         throws MojoExecutionException
     {
-        MavenProject project = config.getProject();
         IdeDependency[] deps = config.getDeps();
 
-        String packaging = project.getPackaging();
+        String packaging = config.getPackaging();
         if ( Constants.PROJECT_PACKAGING_EAR.equals( packaging ) )
         {
             handleEarLibs( deps );

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java
Sun Oct 14 22:51:58 2007
@@ -72,7 +72,7 @@
     {
         String metaInfBaseDirectory = null;
 
-        if ( config.getProject().getPackaging().equals( Constants.PROJECT_PACKAGING_WAR )
)
+        if ( config.getProject().equals( Constants.PROJECT_PACKAGING_WAR ) )
         {
             metaInfBaseDirectory = config.getProject().getBasedir().getAbsolutePath() + File.separatorChar
                 + WEBAPP_RESOURCE_DIR;

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebSettingsWriter.java
Sun Oct 14 22:51:58 2007
@@ -99,7 +99,7 @@
         throws MojoExecutionException
     {
         FileWriter w;
-        if ( Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( config.getProject().getPackaging()
) )
+        if ( Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( config.getPackaging() ) )
         {
             try
             {

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebsiteConfigWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebsiteConfigWriter.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebsiteConfigWriter.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadWebsiteConfigWriter.java
Sun Oct 14 22:51:58 2007
@@ -65,10 +65,8 @@
      */
     public void write() throws MojoExecutionException
     {
-        MavenProject project = config.getProject();
-
         FileWriter w;
-        if ( Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( project.getPackaging() ) )
+        if ( Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( config.getPackaging() ) )
         {
             try
             {

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/AbstractWtpResourceWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/AbstractWtpResourceWriter.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/AbstractWtpResourceWriter.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/AbstractWtpResourceWriter.java
Sun Oct 14 22:51:58 2007
@@ -89,7 +89,7 @@
     protected void writeModuleTypeAccordingToPackaging( MavenProject project, XMLWriter writer,
                                                         File buildOutputDirectory ) throws
MojoExecutionException
     {
-        if ( "war".equals( project.getPackaging() ) ) //$NON-NLS-1$
+        if ( "war".equals( config.getPackaging() ) ) //$NON-NLS-1$
         {
             writer.addAttribute( ATTR_MODULE_TYPE_ID, "jst.web" ); //$NON-NLS-1$
 
@@ -105,7 +105,7 @@
             writer.addAttribute( ATTR_VALUE, contextRoot );
             writer.endElement();
         }
-        else if ( "ejb".equals( config.getProject().getPackaging() ) ) //$NON-NLS-1$
+        else if ( "ejb".equals( config.getPackaging() ) ) //$NON-NLS-1$
         {
             writer.addAttribute( ATTR_MODULE_TYPE_ID, "jst.ejb" ); //$NON-NLS-1$
 
@@ -122,7 +122,7 @@
             writer.endElement();
 
         }
-        else if ( "ear".equals( config.getProject().getPackaging() ) ) //$NON-NLS-1$
+        else if ( "ear".equals( config.getPackaging() ) ) //$NON-NLS-1$
         {
             writer.addAttribute( ATTR_MODULE_TYPE_ID, "jst.ear" ); //$NON-NLS-1$
 

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponentWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponentWriter.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponentWriter.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponentWriter.java
Sun Oct 14 22:51:58 2007
@@ -94,7 +94,7 @@
         // create a .component file and write out to it
         XMLWriter writer = new PrettyPrintXMLWriter( w );
 
-        writeModuleTypeComponent( writer, config.getProject().getPackaging(), config.getBuildOutputDirectory(),
config
+        writeModuleTypeComponent( writer, config.getPackaging(), config.getBuildOutputDirectory(),
config
             .getSourceDirs(), config.getLocalRepository() );
 
         IOUtil.close( w );

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpFacetsWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpFacetsWriter.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpFacetsWriter.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpFacetsWriter.java
Sun Oct 14 22:51:58 2007
@@ -86,7 +86,7 @@
 
         FileWriter w;
 
-        String packaging = config.getProject().getPackaging();
+        String packaging = config.getPackaging();
 
         // Write out facet core xml
         try

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpmodulesWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpmodulesWriter.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpmodulesWriter.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpmodulesWriter.java
Sun Oct 14 22:51:58 2007
@@ -75,7 +75,7 @@
         // deploy-path is "/" for utility and ejb projects, "/WEB-INF/classes" for webapps
 
         String target = "/"; //$NON-NLS-1$
-        if ( "war".equals( config.getProject().getPackaging() ) ) //$NON-NLS-1$
+        if ( "war".equals( config.getPackaging() ) ) //$NON-NLS-1$
         {
             String warSourceDirectory = IdeUtils.getPluginSetting( config.getProject(), ARTIFACT_MAVEN_WAR_PLUGIN,
                                                                    "warSourceDirectory",
//$NON-NLS-1$
@@ -91,7 +91,7 @@
 
             target = "/WEB-INF/classes"; //$NON-NLS-1$
         }
-        else if ( "ear".equals( config.getProject().getPackaging() ) ) //$NON-NLS-1$
+        else if ( "ear".equals( config.getPackaging() ) ) //$NON-NLS-1$
         {
             writer.startElement( ELT_WB_RESOURCE );
             writer.addAttribute( ATTR_DEPLOY_PATH, "/" ); //$NON-NLS-1$

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java?rev=584685&r1=584684&r2=584685&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java
(original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java
Sun Oct 14 22:51:58 2007
@@ -106,6 +106,13 @@
     protected MavenProject executedProject;
 
     /**
+     * The project packaging.
+     * 
+     * @parameter expression="${project.packaging}"
+     */
+    protected String packaging;
+    
+    /**
      * Artifact factory, needed to download source jars for inclusion in classpath.
      * 
      * @component role="org.apache.maven.artifact.factory.ArtifactFactory"

Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-1/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Oct 14 22:51:58 2007
@@ -0,0 +1,3 @@
+.j2ee
+.project
+log4j-1.2.8.jar

Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Oct 14 22:51:58 2007
@@ -0,0 +1,3 @@
+.j2ee
+.websettings
+.website-config

Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/webapp/META-INF/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Oct 14 22:51:58 2007
@@ -0,0 +1 @@
+MANIFEST.MF

Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-2/src/main/webapp/WEB-INF/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Oct 14 22:51:58 2007
@@ -0,0 +1 @@
+lib

Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Oct 14 22:51:58 2007
@@ -0,0 +1,3 @@
+.classpath
+.j2ee
+.project

Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-3/ejbModule/META-INF/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Oct 14 22:51:58 2007
@@ -0,0 +1 @@
+MANIFEST.MF

Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Oct 14 22:51:58 2007
@@ -0,0 +1,2 @@
+.classpath
+.project

Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-rad-4/src/main/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Oct 14 22:51:58 2007
@@ -0,0 +1 @@
+resources



Mime
View raw message