coderplus / m2e-connector-for-maven-remote-resources-plugin

m2e connector for the maven-remote-resources-plugin
3 stars 2 forks source link

Resources not being updated for incremental builds #2

Open jiteshvassa opened 9 years ago

jiteshvassa commented 9 years ago

I'm seeing issues where resources aren't updated when they're updated in a dependent project (workspace resolution).

Here's sample pom files that show this behaviour.

Common project:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>my-group</groupId>
    <artifactId>common</artifactId>
    <version>1.0-SNAPSHOT</version>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-remote-resources-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>bundle</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <resourcesDirectory>${basedir}/src/main/resources</resourcesDirectory>
                    <includes>
                        <include>**/*</include>
                    </includes>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

Client project:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>my-group</groupId>
    <artifactId>client</artifactId>
    <version>1.0-SNAPSHOT</version>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-remote-resources-plugin</artifactId>
                <version>1.5</version>
                <configuration>
                    <resourceBundles>
                        <resourceBundle>my-group:common:1.0-SNAPSHOT</resourceBundle>
                    </resourceBundles>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>process</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>my-group</groupId>
            <artifactId>common</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
    </dependencies>

</project>
aneesh-joseph commented 9 years ago

Thanks for the sample Jithesh :+1:

You are right, currently the connector doesn't process the bundle in the client project if your resources in the bundle has changed. If this has to be fixed, the connector should try to resolve the resource bundle project from workspace and if present look for any delta. If there is some delta, it should trigger the process goal, otherwise not. I will see how this can be implemented.

grouvig commented 4 years ago

Hi,

I'm facing this issue too. There wasn't any progress in five years. @aneesh-joseph , there weren't any update for many years in the code base, is this plugin dead or do you plan to work on issues ?

Regards