On 25/10/2007, Adrian Herscu <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I am using Maven 2 to build projects based on my own framework. Because
> the framework requires different tools and dependency resolving
> mechanism, I had to create a dedicated lifecycle.
>
> Now I am thinking about some way to integrate the build of my framework
> with the build of a Java-based Web application.
>
> The first thing I have tried was to generate the Eclipse project
> descriptors and noticed that the .classpath file is not generated. There
> was a similar issue with the PDE projects which are packaged as ZIP-s (I
> found that this has been fixed in MECLIPSE-279).
>
> I believe that if I will add all the WAR's lifecycle goals to my custom
> lifecycle then the build artifact created will be indistinguishable from
> that created by the WAR packaging. Is it true?
>
> Is there any way to make the Eclipse plugin "believe" that some custom
> packaging type is a "Java" type?
check the Eclipse plugin sources, for example in 2.4 it has:
// ear projects don't contain java sources
// pde projects are always java projects
isJavaProject = pde
|| ( Constants.LANGUAGE_JAVA.equals( artifactHandler.getLanguage()
) && !Constants.PROJECT_PACKAGING_EAR
.equals( packaging ) );
so afaik you just need to set the language to Java in your component:
<component>
<role>org.apache.maven.artifact.handler.ArtifactHandler</role>
<!- ... snip ... -->
<configuration>
<!- ... snip ... -->
<language>java</language>
<!- ... snip ... -->
</configuration>
</component>
in your "src/main/resources/META-INF/plexus/components.xml" file
( when in doubt, check the source! )
Thanks,
> Adrian.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> --
Cheers, Stuart