Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First time clean is not setting ${project.build.finalName} value to m2e-wtp #23

Open
manikantag opened this issue May 26, 2015 · 3 comments

Comments

@manikantag
Copy link

Hi,

My project structure is very typical (plugin conf is at the end).

When cleaning for first time, seems ${project.build.finalName} is not set to m2e-wtp, but Maven is evaluating it to regular artifact name. Below is how the js-min and css-min dir are coming.

target
    ├───.wro4j
    ├───bo-web-0.0.1-SNAPSHOT
    │   ├───css-min            // generated here instead of m2e-wtp
    │   └───js-min
    ├───classes
    ├───m2e-wtp
    │   └───web-resources
    │       └───META-INF
    │           └─── ...
    └───test-classes

If I clean again (i.e., second time), files are generating correctly.

target
    ├───.wro4j
    ├───bo-web-0.0.1-SNAPSHOT
    │   ├───css-min
    │   └───js-min
    ├───classes
    ├───m2e-wtp
    │   └───web-resources
    │       ├───css-min            // generated correct
    │       ├───js-min
    │       └───META-INF
    │           └─── ...
    └───test-classes

wro4j plugin config:

<plugin>
    <groupId>ro.isdc.wro4j</groupId>
    <artifactId>wro4j-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>js-minify</id>
            <phase>compile</phase>
            <goals>
                <goal>run</goal>
            </goals>
            <configuration>
                <debug>true</debug>
                <targetGroups>angular-deps,app-bundle</targetGroups>
                <minimize>true</minimize>
                <wroManagerFactory>com.manikanta.wro4j.maven.CustomWroManagerFactory</wroManagerFactory>
                <groupNameMappingFile>${project.build.directory}/${project.build.finalName}/js-min/group-mapping.properties</groupNameMappingFile>
            </configuration>
        </execution>
        <execution>
            <id>css-minify</id>
            <phase>compile</phase>
            <goals>
                <goal>run</goal>
            </goals>
            <configuration>
                <targetGroups>styles</targetGroups>
                <minimize>true</minimize>
                <groupNameMappingFile>${project.build.directory}/${project.build.finalName}/css-min/group-mapping.properties</groupNameMappingFile>
            </configuration>
        </execution>
    </executions>

    <configuration>
        <contextFolder>${basedir}/src/main/webapp/</contextFolder>
        <destinationFolder>${project.build.directory}/${project.build.finalName}</destinationFolder>
        <jsDestinationFolder>${project.build.directory}/${project.build.finalName}/js-min</jsDestinationFolder>
        <cssDestinationFolder>${project.build.directory}/${project.build.finalName}/css-min</cssDestinationFolder>
        <wroFile>${basedir}/src/main/resources/wro.xml</wroFile>
        <extraConfigFile>${basedir}/src/main/resources/wro.properties</extraConfigFile>
        <wroManagerFactory>ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory</wroManagerFactory>
        <ignoreMissingResources>false</ignoreMissingResources>
        <incrementalBuildEnabled>true</incrementalBuildEnabled>
        <parallelProcessing>true</parallelProcessing>
    </configuration>
</plugin>
@fbricon
Copy link
Member

fbricon commented May 26, 2015

How do you clean it? mvn clean or Project > Clean in eclipse?

@fbricon
Copy link
Member

fbricon commented May 26, 2015

Providing a sample project to reproduce the problem would help

@manikantag
Copy link
Author

Project > Clean. Normal Maven build is working fine.
I'll create a new project and will share with you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants