Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Help with process-resources

This may be unrelated but I'm also having a similar problem. We use the
buildnumber plugin to put a timestamp into a properties file and it
doesn't work anymore in Eclipse after we've upgraded to m2e 1.0. To
reproduce yourself, create an app.properties with the following
contents:

buildnumber=${buildNumber}
project.version=${project.version}

And then put the following in your pom.xml:

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>app.properties</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.0-beta-1</version> <!-- can't update to newer
version due to MOJO-1463 -->
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <format>{0,date,yyMMddHHmm}</format>
                    <items>
                        <item>timestamp</item>
                    </items>
                </configuration>
            </plugin>
        </plugins>
    </build>

${project.version} gets resolved fine, from Eclipse or the command line,
but ${buildNumber} only gets resolves if run from the command line. I've
tried every phase I can think of, to no avail. Any clue what's wrong?

Thanks,

-Matthew

-----Original Message-----
From: m2e-users-bounces@xxxxxxxxxxx
[mailto:m2e-users-bounces@xxxxxxxxxxx] On Behalf Of Igor Fedorenko
Sent: Tuesday, July 19, 2011 1:07 AM
To: m2e-users@xxxxxxxxxxx
Subject: Re: [m2e-users] Help with process-resources

What exact m2e version do you use? m2e 1.0 available as part of Eclipse
3.7 "Indigo" release is expected to process resources automatically,
without any explicit configuration.

--
Regards,
Igor

On 11-07-19 1:26 AM, Todd Nine wrote:
> Hi guys,
> We've using the latest m2e, but we're still on maven 2.2.1, which I
have
> defined in my eclipse settings as the default.
>
> We have several projects that depend on resource processing, however
> I've notice that the maven build phase does not execute process
resources.
>
> I have the maven builder as the last builder in our project's list of
> builders per project, how can I add specific maven goals to this
builder?
>
> At the moment we're executing maven as an external tool, however this
> seems a bit sloppy since we have direct maven integration with the
plugin.
>
> Thanks,
>
> Todd
_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users


Back to the top