Problem with resources copying with m2eclipse 0.9.4

View: New views
14 Messages — Rating Filter:   Alert me  

Problem with resources copying with m2eclipse 0.9.4

by hgomez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi to all,

I got a strange problem with m2eclipse 0.9.4

When I'm using maven 2.0.9 from command line, I got the resources
copied from src/main/resources to target-classes

When I'm using the embedded maven (ie project clean), the resources
are not copied to to target-classes.

If I do a Run Maven package, they are.

Any idea of way to track it in the console ?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Problem with resources copying with m2eclipse 0.9.4

by hgomez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

No news about these one ?

I've got no problem with a simple pom (resources are copied).

But If I use in the parent pom some filtering like this, no resources
are copied :

  <build>

    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-resources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <mkdir dir="${project.build.directory}" />

                <tstamp>
                  <format property="last.updated" pattern="yyyy-MM-dd
hh:mm:ss" />
                </tstamp>
                <echo file="${basedir}/target/filter.properties">

build.time=${last.updated}${line.separator}os.infos=${os.name}
${os.version}${line.separator}user.infos=${user.name}${line.separator}java.infos=JDK
${java.vendor} ${java.runtime.version}
                </echo>
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
      </plugin>

    </plugins>

    <filters>
      <filter>${basedir}/target/filter.properties</filter>
    </filters>

    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>

  </build>

Did m2eclipse support ant-tasks here ?

2008/6/27 Henri Gomez <henri.gomez@...>:

> Hi to all,
>
> I got a strange problem with m2eclipse 0.9.4
>
> When I'm using maven 2.0.9 from command line, I got the resources
> copied from src/main/resources to target-classes
>
> When I'm using the embedded maven (ie project clean), the resources
> are not copied to to target-classes.
>
> If I do a Run Maven package, they are.
>
> Any idea of way to track it in the console ?
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Re: Problem with resources copying with m2eclipse 0.9.4

by Eugene Kuleshov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


  That ain't resource filtering nor copying, that is freaking Ant. :-)

  Anyways, m2eclipse does not run any Maven plugins, including ones
bound to the code generation phase by default during incremental build.
However it does run process-test-resource during "Project... / Clean"
and you can change the settings for that and for incremental build in
the Maven properties for your project.

  See some more details on this at
http://docs.codehaus.org/display/M2ECLIPSE/Dependency+Management

  regards,
  Eugene


Henri Gomez wrote:

> No news about these one ?
>
> I've got no problem with a simple pom (resources are copied).
>
> But If I use in the parent pom some filtering like this, no resources
> are copied :
>
>   <build>
>
>     <plugins>
>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-antrun-plugin</artifactId>
>         <executions>
>           <execution>
>             <phase>generate-resources</phase>
>             <goals>
>               <goal>run</goal>
>             </goals>
>             <configuration>
>               <tasks>
>                 <mkdir dir="${project.build.directory}" />
>
>                 <tstamp>
>                   <format property="last.updated" pattern="yyyy-MM-dd
> hh:mm:ss" />
>                 </tstamp>
>                 <echo file="${basedir}/target/filter.properties">
>
> build.time=${last.updated}${line.separator}os.infos=${os.name}
> ${os.version}${line.separator}user.infos=${user.name}${line.separator}java.infos=JDK
> ${java.vendor} ${java.runtime.version}
>                 </echo>
>               </tasks>
>             </configuration>
>           </execution>
>         </executions>
>       </plugin>
>
>       <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>findbugs-maven-plugin</artifactId>
>       </plugin>
>
>     </plugins>
>
>     <filters>
>       <filter>${basedir}/target/filter.properties</filter>
>     </filters>
>
>     <resources>
>       <resource>
>         <directory>src/main/resources</directory>
>         <filtering>true</filtering>
>       </resource>
>     </resources>
>
>   </build>
>
> Did m2eclipse support ant-tasks here ?
>
> 2008/6/27 Henri Gomez <henri.gomez@...>:
>  
>> Hi to all,
>>
>> I got a strange problem with m2eclipse 0.9.4
>>
>> When I'm using maven 2.0.9 from command line, I got the resources
>> copied from src/main/resources to target-classes
>>
>> When I'm using the embedded maven (ie project clean), the resources
>> are not copied to to target-classes.
>>
>> If I do a Run Maven package, they are.
>>
>> Any idea of way to track it in the console ?
>>
>>    
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>  


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Re: Problem with resources copying with m2eclipse 0.9.4

by Igor Fedorenko-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Correction, m2e detects changes to files inside main/resources and
test/resources folders and runs maven goals during incremental build. By
default it runs "process-resources resources:testResources" but this is
configurable via project properties (Maven->Goals to invoke on resource
changes).

Eugene Kuleshov wrote:

>
>  That ain't resource filtering nor copying, that is freaking Ant. :-)
>
>  Anyways, m2eclipse does not run any Maven plugins, including ones bound
> to the code generation phase by default during incremental build.
> However it does run process-test-resource during "Project... / Clean"
> and you can change the settings for that and for incremental build in
> the Maven properties for your project.
>
>  See some more details on this at
> http://docs.codehaus.org/display/M2ECLIPSE/Dependency+Management
>
>  regards,
>  Eugene
>
>
> Henri Gomez wrote:
>> No news about these one ?
>>
>> I've got no problem with a simple pom (resources are copied).
>>
>> But If I use in the parent pom some filtering like this, no resources
>> are copied :
>>
>>   <build>
>>
>>     <plugins>
>>
>>       <plugin>
>>         <groupId>org.apache.maven.plugins</groupId>
>>         <artifactId>maven-antrun-plugin</artifactId>
>>         <executions>
>>           <execution>
>>             <phase>generate-resources</phase>
>>             <goals>
>>               <goal>run</goal>
>>             </goals>
>>             <configuration>
>>               <tasks>
>>                 <mkdir dir="${project.build.directory}" />
>>
>>                 <tstamp>
>>                   <format property="last.updated" pattern="yyyy-MM-dd
>> hh:mm:ss" />
>>                 </tstamp>
>>                 <echo file="${basedir}/target/filter.properties">
>>
>> build.time=${last.updated}${line.separator}os.infos=${os.name}
>> ${os.version}${line.separator}user.infos=${user.name}${line.separator}java.infos=JDK
>>
>> ${java.vendor} ${java.runtime.version}
>>                 </echo>
>>               </tasks>
>>             </configuration>
>>           </execution>
>>         </executions>
>>       </plugin>
>>
>>       <plugin>
>>         <groupId>org.codehaus.mojo</groupId>
>>         <artifactId>findbugs-maven-plugin</artifactId>
>>       </plugin>
>>
>>     </plugins>
>>
>>     <filters>
>>       <filter>${basedir}/target/filter.properties</filter>
>>     </filters>
>>
>>     <resources>
>>       <resource>
>>         <directory>src/main/resources</directory>
>>         <filtering>true</filtering>
>>       </resource>
>>     </resources>
>>
>>   </build>
>>
>> Did m2eclipse support ant-tasks here ?
>>
>> 2008/6/27 Henri Gomez <henri.gomez@...>:
>>  
>>> Hi to all,
>>>
>>> I got a strange problem with m2eclipse 0.9.4
>>>
>>> When I'm using maven 2.0.9 from command line, I got the resources
>>> copied from src/main/resources to target-classes
>>>
>>> When I'm using the embedded maven (ie project clean), the resources
>>> are not copied to to target-classes.
>>>
>>> If I do a Run Maven package, they are.
>>>
>>> Any idea of way to track it in the console ?
>>>
>>>    
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>  
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Re: Problem with resources copying with m2eclipse 0.9.4

by hgomez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

When I do a project clean, the java files are compiled and found in
target/classes but not the resources.

Even when I do an update of any resources.

How can I locate what could be wrong in the process inside Eclipse ?

2008/7/10 Igor Fedorenko <igor@...>:

> Correction, m2e detects changes to files inside main/resources and
> test/resources folders and runs maven goals during incremental build. By
> default it runs "process-resources resources:testResources" but this is
> configurable via project properties (Maven->Goals to invoke on resource
> changes).
>
> Eugene Kuleshov wrote:
>>
>>  That ain't resource filtering nor copying, that is freaking Ant. :-)
>>
>>  Anyways, m2eclipse does not run any Maven plugins, including ones bound
>> to the code generation phase by default during incremental build. However it
>> does run process-test-resource during "Project... / Clean" and you can
>> change the settings for that and for incremental build in the Maven
>> properties for your project.
>>
>>  See some more details on this at
>> http://docs.codehaus.org/display/M2ECLIPSE/Dependency+Management
>>
>>  regards,
>>  Eugene
>>
>>
>> Henri Gomez wrote:
>>>
>>> No news about these one ?
>>>
>>> I've got no problem with a simple pom (resources are copied).
>>>
>>> But If I use in the parent pom some filtering like this, no resources
>>> are copied :
>>>
>>>  <build>
>>>
>>>    <plugins>
>>>
>>>      <plugin>
>>>        <groupId>org.apache.maven.plugins</groupId>
>>>        <artifactId>maven-antrun-plugin</artifactId>
>>>        <executions>
>>>          <execution>
>>>            <phase>generate-resources</phase>
>>>            <goals>
>>>              <goal>run</goal>
>>>            </goals>
>>>            <configuration>
>>>              <tasks>
>>>                <mkdir dir="${project.build.directory}" />
>>>
>>>                <tstamp>
>>>                  <format property="last.updated" pattern="yyyy-MM-dd
>>> hh:mm:ss" />
>>>                </tstamp>
>>>                <echo file="${basedir}/target/filter.properties">
>>>
>>> build.time=${last.updated}${line.separator}os.infos=${os.name}
>>>
>>> ${os.version}${line.separator}user.infos=${user.name}${line.separator}java.infos=JDK
>>> ${java.vendor} ${java.runtime.version}
>>>                </echo>
>>>              </tasks>
>>>            </configuration>
>>>          </execution>
>>>        </executions>
>>>      </plugin>
>>>
>>>      <plugin>
>>>        <groupId>org.codehaus.mojo</groupId>
>>>        <artifactId>findbugs-maven-plugin</artifactId>
>>>      </plugin>
>>>
>>>    </plugins>
>>>
>>>    <filters>
>>>      <filter>${basedir}/target/filter.properties</filter>
>>>    </filters>
>>>
>>>    <resources>
>>>      <resource>
>>>        <directory>src/main/resources</directory>
>>>        <filtering>true</filtering>
>>>      </resource>
>>>    </resources>
>>>
>>>  </build>
>>>
>>> Did m2eclipse support ant-tasks here ?
>>>
>>> 2008/6/27 Henri Gomez <henri.gomez@...>:
>>>
>>>>
>>>> Hi to all,
>>>>
>>>> I got a strange problem with m2eclipse 0.9.4
>>>>
>>>> When I'm using maven 2.0.9 from command line, I got the resources
>>>> copied from src/main/resources to target-classes
>>>>
>>>> When I'm using the embedded maven (ie project clean), the resources
>>>> are not copied to to target-classes.
>>>>
>>>> If I do a Run Maven package, they are.
>>>>
>>>> Any idea of way to track it in the console ?
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Re: Problem with resources copying with m2eclipse 0.9.4

by hgomez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here is what I see in the maven console after a clean project :

7/11/08 9:40:34 AM CEST: [INFO] Searching repository for plugin with
prefix: 'resources'.
7/11/08 9:40:34 AM CEST: [INFO] Attempting to resolve a version for
plugin: org.apache.maven.plugins:maven-resources-plugin using
meta-version: LATEST
7/11/08 9:40:34 AM CEST: [INFO] Using version: 2.2 of plugin:
org.apache.maven.plugins:maven-resources-plugin
7/11/08 9:40:34 AM CEST: [INFO] Scanning for projects...
7/11/08 9:40:34 AM CEST: [INFO]
------------------------------------------------------------------------
7/11/08 9:40:34 AM CEST: [INFO] Building slib-er-alerts
7/11/08 9:40:34 AM CEST: [INFO]
7/11/08 9:40:34 AM CEST: [INFO] Id: fr.slib.er:slib-er-alerts:jar:2.1.0-SNAPSHOT
7/11/08 9:40:34 AM CEST: [INFO] task-segment: [process-resources,
resources:testResources]
7/11/08 9:40:34 AM CEST: [INFO]
------------------------------------------------------------------------
7/11/08 9:40:34 AM CEST: [INFO] [antrun:run]
7/11/08 9:40:34 AM CEST: [INFO] Executing tasks
7/11/08 9:40:34 AM CEST: [INFO] Executed tasks
7/11/08 9:40:34 AM CEST: [INFO] [resources:resources]
7/11/08 9:40:34 AM CEST: [INFO] Using default encoding to copy
filtered resources.
7/11/08 9:40:34 AM CEST: [INFO] [resources:testResources]
7/11/08 9:40:34 AM CEST: [INFO] Using default encoding to copy
filtered resources.

Here is what I see with  mvn process-resources :

[INFO] Scanning for projects...
WAGON_VERSION: 1.0-beta-2
[INFO] ------------------------------------------------------------------------
[INFO] Building slib-er-alerts
[INFO]    task-segment: [process-resources]
[INFO] ------------------------------------------------------------------------
[INFO] snapshot fr.slib:slib-canopee:1.1-SNAPSHOT: checking for
updates from snapshots
[INFO] snapshot fr.slib.er:slib-er-mkt:2.1.0-SNAPSHOT: checking for
updates from snapshots
[INFO] snapshot fr.slib.er:slib-er-core:2.1.0-SNAPSHOT: checking for
updates from snapshots
[INFO] [antrun:run {execution: grab-system-infos}]
[INFO] Executing tasks
    [mkdir] Created dir: C:\workspace\slib-er-alerts\target
     [echo] help me
[INFO] Executed tasks
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Fri Jul 11 09:43:49 CEST 2008
[INFO] Final Memory: 7M/127M
[INFO] ------------------------------------------------------------------------

As you could see the 'grab-system-infos' filtering task is not handled
in m2eclipse.

2008/7/11 Henri Gomez <henri.gomez@...>:

> When I do a project clean, the java files are compiled and found in
> target/classes but not the resources.
>
> Even when I do an update of any resources.
>
> How can I locate what could be wrong in the process inside Eclipse ?
>
> 2008/7/10 Igor Fedorenko <igor@...>:
>> Correction, m2e detects changes to files inside main/resources and
>> test/resources folders and runs maven goals during incremental build. By
>> default it runs "process-resources resources:testResources" but this is
>> configurable via project properties (Maven->Goals to invoke on resource
>> changes).
>>
>> Eugene Kuleshov wrote:
>>>
>>>  That ain't resource filtering nor copying, that is freaking Ant. :-)
>>>
>>>  Anyways, m2eclipse does not run any Maven plugins, including ones bound
>>> to the code generation phase by default during incremental build. However it
>>> does run process-test-resource during "Project... / Clean" and you can
>>> change the settings for that and for incremental build in the Maven
>>> properties for your project.
>>>
>>>  See some more details on this at
>>> http://docs.codehaus.org/display/M2ECLIPSE/Dependency+Management
>>>
>>>  regards,
>>>  Eugene
>>>
>>>
>>> Henri Gomez wrote:
>>>>
>>>> No news about these one ?
>>>>
>>>> I've got no problem with a simple pom (resources are copied).
>>>>
>>>> But If I use in the parent pom some filtering like this, no resources
>>>> are copied :
>>>>
>>>>  <build>
>>>>
>>>>    <plugins>
>>>>
>>>>      <plugin>
>>>>        <groupId>org.apache.maven.plugins</groupId>
>>>>        <artifactId>maven-antrun-plugin</artifactId>
>>>>        <executions>
>>>>          <execution>
>>>>            <phase>generate-resources</phase>
>>>>            <goals>
>>>>              <goal>run</goal>
>>>>            </goals>
>>>>            <configuration>
>>>>              <tasks>
>>>>                <mkdir dir="${project.build.directory}" />
>>>>
>>>>                <tstamp>
>>>>                  <format property="last.updated" pattern="yyyy-MM-dd
>>>> hh:mm:ss" />
>>>>                </tstamp>
>>>>                <echo file="${basedir}/target/filter.properties">
>>>>
>>>> build.time=${last.updated}${line.separator}os.infos=${os.name}
>>>>
>>>> ${os.version}${line.separator}user.infos=${user.name}${line.separator}java.infos=JDK
>>>> ${java.vendor} ${java.runtime.version}
>>>>                </echo>
>>>>              </tasks>
>>>>            </configuration>
>>>>          </execution>
>>>>        </executions>
>>>>      </plugin>
>>>>
>>>>      <plugin>
>>>>        <groupId>org.codehaus.mojo</groupId>
>>>>        <artifactId>findbugs-maven-plugin</artifactId>
>>>>      </plugin>
>>>>
>>>>    </plugins>
>>>>
>>>>    <filters>
>>>>      <filter>${basedir}/target/filter.properties</filter>
>>>>    </filters>
>>>>
>>>>    <resources>
>>>>      <resource>
>>>>        <directory>src/main/resources</directory>
>>>>        <filtering>true</filtering>
>>>>      </resource>
>>>>    </resources>
>>>>
>>>>  </build>
>>>>
>>>> Did m2eclipse support ant-tasks here ?
>>>>
>>>> 2008/6/27 Henri Gomez <henri.gomez@...>:
>>>>
>>>>>
>>>>> Hi to all,
>>>>>
>>>>> I got a strange problem with m2eclipse 0.9.4
>>>>>
>>>>> When I'm using maven 2.0.9 from command line, I got the resources
>>>>> copied from src/main/resources to target-classes
>>>>>
>>>>> When I'm using the embedded maven (ie project clean), the resources
>>>>> are not copied to to target-classes.
>>>>>
>>>>> If I do a Run Maven package, they are.
>>>>>
>>>>> Any idea of way to track it in the console ?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Re: Problem with resources copying with m2eclipse 0.9.4

by hgomez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

More on this problem.

Filtering work with .project like this :

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
        <name>simplemavenproject</name>
        <comment></comment>
        <projects>
        </projects>
        <buildSpec>
                <buildCommand>
                        <name>org.eclipse.jdt.core.javabuilder</name>
                        <arguments>
                        </arguments>
                </buildCommand>
                <buildCommand>
                        <name>org.maven.ide.eclipse.maven2Builder</name>
                        <arguments>
                        </arguments>
                </buildCommand>
        </buildSpec>
        <natures>
                <nature>org.eclipse.jdt.core.javanature</nature>
                <nature>org.maven.ide.eclipse.maven2Nature</nature>
        </natures>
</projectDescription>


But not if :

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
        <name>simplemavenproject</name>
        <comment></comment>
        <projects>
        </projects>
        <buildSpec>
                <buildCommand>
                        <name>org.eclipse.wst.common.project.facet.core.builder</name>
                        <arguments>
                        </arguments>
                </buildCommand>
                <buildCommand>
                        <name>org.maven.ide.eclipse.maven2Builder</name>
                        <arguments>
                        </arguments>
                </buildCommand>
                <buildCommand>
                        <name>org.eclipse.jdt.core.javabuilder</name>
                        <arguments>
                        </arguments>
                </buildCommand>
                <buildCommand>
                        <name>org.eclipse.wst.validation.validationbuilder</name>
                        <arguments>
                        </arguments>
                </buildCommand>
        </buildSpec>
        <natures>
                <nature>org.eclipse.jdt.core.javanature</nature>
                <nature>org.maven.ide.eclipse.maven2Nature</nature>
                <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
                <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
                <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
        </natures>
</projectDescription>

What's the problem ?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Re: Problem with resources copying with m2eclipse 0.9.4

by hgomez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

the maven builder should be the last one of the builder list.


So like this it works :


<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
        <name>simplemavenproject</name>
        <comment></comment>
        <projects>
        </projects>
        <buildSpec>
                <buildCommand>
                        <name>org.eclipse.wst.common.project.facet.core.builder</name>
                        <arguments>
                        </arguments>
                </buildCommand>
                <buildCommand>
                        <name>org.eclipse.jdt.core.javabuilder</name>
                        <arguments>
                        </arguments>
                </buildCommand>
                <buildCommand>
                        <name>org.eclipse.wst.validation.validationbuilder</name>
                        <arguments>
                        </arguments>
                </buildCommand>
        <buildCommand>
            <name>org.maven.ide.eclipse.maven2Builder</name>
            <arguments>
            </arguments>
        </buildCommand>
        </buildSpec>
        <natures>
                <nature>org.eclipse.jdt.core.javanature</nature>
                <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
                <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
                <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
        <nature>org.maven.ide.eclipse.maven2Nature</nature>
        </natures>
</projectDescription>

May be good to check it in the 'Update Maven Configuration' menu (and
a note in wiki), it will save hours of search to others m2eclipse
users

Regards

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Re: Problem with resources copying with m2eclipse 0.9.4

by Eugene Kuleshov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


  There is a jira issue for that already. Please vote on it.

  MNGECLIPSE-707: action "update project configuration" should restore
proper order of project builders
http://jira.codehaus.org/browse/MNGECLIPSE-707

  Thanks

  Eugene


Henri Gomez wrote:

> the maven builder should be the last one of the builder list.
>
>
> So like this it works :
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <projectDescription>
> <name>simplemavenproject</name>
> <comment></comment>
> <projects>
> </projects>
> <buildSpec>
> <buildCommand>
> <name>org.eclipse.wst.common.project.facet.core.builder</name>
> <arguments>
> </arguments>
> </buildCommand>
> <buildCommand>
> <name>org.eclipse.jdt.core.javabuilder</name>
> <arguments>
> </arguments>
> </buildCommand>
> <buildCommand>
> <name>org.eclipse.wst.validation.validationbuilder</name>
> <arguments>
> </arguments>
> </buildCommand>
>         <buildCommand>
>             <name>org.maven.ide.eclipse.maven2Builder</name>
>             <arguments>
>             </arguments>
>         </buildCommand>
> </buildSpec>
> <natures>
> <nature>org.eclipse.jdt.core.javanature</nature>
> <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
> <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
> <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
>         <nature>org.maven.ide.eclipse.maven2Nature</nature>
> </natures>
> </projectDescription>
>
> May be good to check it in the 'Update Maven Configuration' menu (and
> a note in wiki), it will save hours of search to others m2eclipse
> users
>
> Regards
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>  


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Re: Problem with resources copying with m2eclipse 0.9.4

by hgomez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2008/7/11 Eugene Kuleshov <eu@...>:
>
>  There is a jira issue for that already. Please vote on it.
>
>  MNGECLIPSE-707: action "update project configuration" should restore proper
> order of project builders
> http://jira.codehaus.org/browse/MNGECLIPSE-707
>
>  Thanks

Done !

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Re: Problem with resources copying with m2eclipse 0.9.4

by hgomez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

BTW, this one should be added in a FAQ page until resolved, it could
save users hours of headaches :)

2008/7/11 Henri Gomez <henri.gomez@...>:

> 2008/7/11 Eugene Kuleshov <eu@...>:
>>
>>  There is a jira issue for that already. Please vote on it.
>>
>>  MNGECLIPSE-707: action "update project configuration" should restore proper
>> order of project builders
>> http://jira.codehaus.org/browse/MNGECLIPSE-707
>>
>>  Thanks
>
> Done !
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Re: Problem with resources copying with m2eclipse 0.9.4

by bouiaw :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I don't really understand the default values for resource processing,
especially :
- why should we run process-test-resources and not process-resources
after a clean ?
- why process-test-resources is not needed after resource changes ?

I know that we can cutomize these value, but as it is default value I
would like to understand how it works.

I have begin to play with these values because on one of my project,
when I run a clean + build in Eclipse, resource files are created in
target/classes at the beggining of the build but are removed at the
end ! If I replace default values for after a clean
"process-test-resources" by "process-resources resources:resources",
it works.

A related question is : does it make sense to configure the following
all inclusive command for both default values : process-resources
process-test-resources resources:resources resources:testResources

I have tried to reproduce it in a test case project but it works well
in my simple test project ...

Thanks in advance for your answers.

On Sat, Jul 12, 2008 at 9:00 AM, Henri Gomez <henri.gomez@...> wrote:

> BTW, this one should be added in a FAQ page until resolved, it could
> save users hours of headaches :)
>
> 2008/7/11 Henri Gomez <henri.gomez@...>:
>> 2008/7/11 Eugene Kuleshov <eu@...>:
>>>
>>>  There is a jira issue for that already. Please vote on it.
>>>
>>>  MNGECLIPSE-707: action "update project configuration" should restore proper
>>> order of project builders
>>> http://jira.codehaus.org/browse/MNGECLIPSE-707
>>>
>>>  Thanks
>>
>> Done !
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Re: Problem with resources copying with m2eclipse 0.9.4

by Igor Fedorenko-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bouiaw wrote:
> Hi,
>
> I don't really understand the default values for resource processing,
> especially :
> - why should we run process-test-resources and not process-resources
> after a clean ?

m2e projects include both main and test classes/resources, so it is
theoretically possible that some tests require processed test resources
to run successfully. I agree that chances are slim, but overhead of
running through couple of extra empty build phases is negligible.

> - why process-test-resources is not needed after resource changes ?

We're trying to limit extent of possible changes done by maven during
incremental build. process-test-resources generates sources, resource,
compiles classes all of which take time to execute and potentially
trigger other builders.

>
> I know that we can cutomize these value, but as it is default value I
> would like to understand how it works.
>
> I have begin to play with these values because on one of my project,
> when I run a clean + build in Eclipse, resource files are created in
> target/classes at the beggining of the build but are removed at the
> end ! If I replace default values for after a clean
> "process-test-resources" by "process-resources resources:resources",
> it works.

Current implementation is sensitive to builders order. Can you please
verify if maven build is configured to run after java builder? This
should be addressed to a certain degree by MNGECLIPSE-707.

>
> A related question is : does it make sense to configure the following
> all inclusive command for both default values : process-resources
> process-test-resources resources:resources resources:testResources

As I explained above, running almost complete maven build lifecycle for
incremental resource changes maybe very expensive. Also,
process-test-resources implies the other goals for all standard maven
project types.

>
> I have tried to reproduce it in a test case project but it works well
> in my simple test project ...
>
> Thanks in advance for your answers.
>
> On Sat, Jul 12, 2008 at 9:00 AM, Henri Gomez <henri.gomez@...> wrote:
>> BTW, this one should be added in a FAQ page until resolved, it could
>> save users hours of headaches :)
>>
>> 2008/7/11 Henri Gomez <henri.gomez@...>:
>>> 2008/7/11 Eugene Kuleshov <eu@...>:
>>>>  There is a jira issue for that already. Please vote on it.
>>>>
>>>>  MNGECLIPSE-707: action "update project configuration" should restore proper
>>>> order of project builders
>>>> http://jira.codehaus.org/browse/MNGECLIPSE-707
>>>>
>>>>  Thanks
>>> Done !
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit: