Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] [m2eclipse-dev] m2eclipse extensions that modify project classpath

Hi Igor

Thanks for the feedback, I will review it this evening when I get back
to my development machine.

Just a quick question: does this mean I need to be using Tycho to
build my projects?

TIA...

--
Ricardo Gladwell <ricardo.gladwell@xxxxxxxxx>
http://www.google.com/profiles/ricardo.gladwell
Twitter: @axonrg - MSN: axonrg@xxxxxxxxx



On 14 November 2010 23:08, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
> There are currently couple of ways to make this work. You can setup
> custom build lifecycle mapping using pom.xml snippet like below.
> Alternatively, you can provide default lifecycle mapping for projects
> with packaging=apk (I can provide pointers if you are interested).
>
>  <profiles>
>    <profile>
>      <id>m2e</id>
>      <activation>
>        <property>
>          <name>m2e.version</name>
>        </property>
>      </activation>
>      <build>
>        <plugins>
>              <plugin>
>                <groupId>org.maven.ide.eclipse</groupId>
>                <artifactId>lifecycle-mapping</artifactId>
>                <version>0.10.0</version>
>                <configuration>
>                  <mappingId>customizable</mappingId>
>                  <configurators>
>                    <configurator
> id="org.maven.ide.eclipse.jdt.javaConfigurator" />
>                    <configurator
> id="com.urbanmania.eclipse.maven.android.androidDevelopmentToolsProjectConfigurator"
> />
>                  </configurators>
>                  <mojoExecutions>
>
> <mojoExecution>org.apache.maven.plugins:maven-resources-plugin::</mojoExecution>
>                  </mojoExecutions>
>                </configuration>
>              </plugin>
>        </plugins>
>      </build>
>    </profile>
>  </profiles>
>
>
> Depending on what changes you need to make to raw classpath, you may
> need to use m2e 0.12.0, which is currently available from staged
> repository [1]. See MNGECLIPSE-2313 [2] for details.
>
>
> Also, due to unrelated bug in m2e [3], you need to explicitly specify
> versions of all plugins bound to project lifecycle.
>
>
> Also, you almost certainly want to avoid running "mvn package" during
> incremental build (this is what current implementation of
> AndroidMavenBuildParticipant does). It runs on each resource change
> (think Ctrl-S in editor) and takes many seconds even for most simple
> projects. It can also cause infinite build, because same output files
> are changed by Eclipse JDT/ADT builders and by Maven mojos. Why do you
> need to run any mojos? Can't you rely on ADT to do everything needed?
>
>
> Also, we plan to make some major improvements to build lifecycle mapping
> in the next m2e version. We track our progress as MNGECLIPSE-2426 [4]
> and you can read some prose at [5]. Most of the code you have in
> m2eclipse-android should still apply, but some changes will likely be
> required.
>
>
> [1]
> https://repository.sonatype.org/content/repositories/forge-sites/m2e/0.12.0/S/0.12.0.20101102-1505/
> [2] https://issues.sonatype.org/browse/MNGECLIPSE-2313
> [3] https://issues.sonatype.org/browse/MNGECLIPSE-2555
> [4] https://issues.sonatype.org/browse/MNGECLIPSE-2426
> [5]
> https://docs.sonatype.org/display/M2ECLIPSE/Project+build+lifecycle+mapping
>
> --
> Regards,
> Igor
>
> On 10-11-14 05:53 AM, Ricardo Gladwell wrote:
>>
>> HI Igor
>>
>> Thanks for sending me those code links. However, for the live of me I
>> can't see how my project is doing anything differently. I still can't
>> get m2eclipse to call the configureRawClasspath on my
>> IJavaProjectConfigurator concrete AbstractProjectConfigurator.
>>
>> The only significant difference is that your plugin.xml defines the
>> configurator extension point as generic="false", but when I add this
>> parameter my unit tests start failing altogether and my
>> ProjectConfigurator doesn't appear to get called at all.
>>
>> If you could take a look and give me some pointers as to where I'm going
>> wrong I would be most grateful.
>>
>> You checkout a sample test project from here:
>>
>>
>> http://svn.codespot.com/a/eclipselabs.org/m2eclipse-android-integration/trunk/com.urbanmania.eclipse.maven.android.test/projects/apidemos-15-app
>>
>> TIA...
>>
> _______________________________________________
> m2e-dev mailing list
> m2e-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/m2e-dev
>


Back to the top