You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ibbignerd <ib...@yahoo.com> on 2012/01/24 18:27:06 UTC

Make Source directory the Destination directory

I am new to using maven, but understand a little. 

I need to create a pom file that makes the destination of a minified file be
where the source file is.

here is a snippet of my code

<plugins>
      <plugin>
        <groupId>com.samaxes.maven</groupId>
        <artifactId>maven-minify-plugin</artifactId>
        <version>1.3.5</version>
        <executions>
          <execution>
            <id>default-minify</id>
            <phase>process-resources</phase>
            <configuration>
              <cssSourceDir>css</cssSourceDir>
              <cssSourceFiles>
                <cssSourceFile>src/main/**/*.css</cssSourceFile>
              </cssSourceFiles>
              <cssFinalFile>style.css</cssFinalFile>
              <jsSourceDir>js</jsSourceDir>
              <jsSourceFiles>
                <jsSourceFile>tablefilter.js</jsSourceFile>
              </jsSourceFiles>
              <jsFinalFile>script.js</jsFinalFile>
            </configuration>
            <goals>
              <goal>minify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>

I also need it to search for all js and css files in the subfolders.

Please let me know if you guys need any more info. Thanks

--
View this message in context: http://maven.40175.n5.nabble.com/Make-Source-directory-the-Destination-directory-tp5323988p5323988.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Make Source directory the Destination directory

Posted by Wayne Fay <wa...@gmail.com>.
> I need to create a pom file that makes the destination of a minified file be
> where the source file is.

This is a bad plan. Please read the plugin documentation and just use
it as it is designed to be used "out of the box" with standard
configuration options.

If you insist on going this route, do not look for support on this
mailing list. Contact the author directly.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Make Source directory the Destination directory

Posted by Guillaume Polet <gu...@gmail.com>.
I am not sure that I understand correctly what you are trying to do 
(mainly because I have never used that plugin), but have you looked at 
the goal documentation?: 
http://maven-samaxes-plugin.googlecode.com/svn/sites/maven-minify-plugin/minify-mojo.html, 
there is a cssTargetDir and jsTargetDir configuration option.

Now maybe you could explain the purpose of generating those minified 
files directly into your source directory? There may be a 
cleaner/simpler way to do what you actually attempt to perform.

Cheers,
Guillaume

Le 24/01/2012 18:27, ibbignerd a écrit :
> I am new to using maven, but understand a little.
>
> I need to create a pom file that makes the destination of a minified file be
> where the source file is.
>
> here is a snippet of my code
>
> <plugins>
>        <plugin>
>          <groupId>com.samaxes.maven</groupId>
>          <artifactId>maven-minify-plugin</artifactId>
>          <version>1.3.5</version>
>          <executions>
>            <execution>
>              <id>default-minify</id>
>              <phase>process-resources</phase>
>              <configuration>
>                <cssSourceDir>css</cssSourceDir>
>                <cssSourceFiles>
>                  <cssSourceFile>src/main/**/*.css</cssSourceFile>
>                </cssSourceFiles>
>                <cssFinalFile>style.css</cssFinalFile>
>                <jsSourceDir>js</jsSourceDir>
>                <jsSourceFiles>
>                  <jsSourceFile>tablefilter.js</jsSourceFile>
>                </jsSourceFiles>
>                <jsFinalFile>script.js</jsFinalFile>
>              </configuration>
>              <goals>
>                <goal>minify</goal>
>              </goals>
>            </execution>
>          </executions>
>        </plugin>
>      </plugins>
>
> I also need it to search for all js and css files in the subfolders.
>
> Please let me know if you guys need any more info. Thanks
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Make-Source-directory-the-Destination-directory-tp5323988p5323988.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org