You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Eric Miller (JIRA)" <ji...@codehaus.org> on 2012/02/28 20:30:03 UTC

[jira] (MWAR-277) New version does not work with yuicompressor-maven-plugin. v2.0.2 works.

Eric Miller created MWAR-277:
--------------------------------

             Summary: New version does not work with yuicompressor-maven-plugin. v2.0.2 works.
                 Key: MWAR-277
                 URL: https://jira.codehaus.org/browse/MWAR-277
             Project: Maven 2.x WAR Plugin
          Issue Type: Bug
    Affects Versions: 2.1.1
         Environment: OSX
            Reporter: Eric Miller


We use YUI Compressor to minify static web resources. With nosuffix on, this produces a .js or .css file of the same name in the target dir (eg: src/main/webapp/script.js becomes target/script.js). This is a good way to work because then your script and style references don't need to change between development and qa or dev int (wherever you test minified resources).

The problem is that v2.1.1 overwrites files in the target dir if they already exist. v2.0.2 did not behave in this way.

There must have been some change in the way that overwriting existing files behaves, but I cannot find a flag to switch that behavior back.

We have reverted to the old version of the war plugin for now.

our config:

{code:xml}
<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-war-plugin</artifactId>
	<version>2.0.2</version>
	<!-- <version>2.1.1</version> breaks YUI compressor -->
	<configuration>
		<useDefaultManifestFile>true</useDefaultManifestFile>
		<archive>
			<manifestEntries>
				<Implementation-Title>${project.name}</Implementation-Title> <!-- This is in the default manifest, but we add it explicitly so m2e-wtp 
					can pick it up -->
				<Implementation-Version>${project.version}</Implementation-Version> <!-- This is in the default manifest, but we add it explicitly so m2e-wtp 
					can pick it up -->
				<ReleaseName>${releasename}</ReleaseName>
			</manifestEntries>
		</archive>
	</configuration>
</plugin>
{code} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MWAR-277) New version does not work with yuicompressor-maven-plugin. v2.0.2 works.

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MWAR-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=309730#comment-309730 ] 

Dennis Lundberg commented on MWAR-277:
--------------------------------------

Can you put together a small project that we can use to test this issue?
                
> New version does not work with yuicompressor-maven-plugin. v2.0.2 works.
> ------------------------------------------------------------------------
>
>                 Key: MWAR-277
>                 URL: https://jira.codehaus.org/browse/MWAR-277
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1.1
>         Environment: OSX
>            Reporter: Eric Miller
>
> We use YUI Compressor to minify static web resources. With nosuffix on, this produces a .js or .css file of the same name in the target dir (eg: src/main/webapp/script.js becomes target/script.js). This is a good way to work because then your script and style references don't need to change between development and qa or dev int (wherever you test minified resources).
> The problem is that v2.1.1 overwrites files in the target dir if they already exist. v2.0.2 did not behave in this way.
> There must have been some change in the way that overwriting existing files behaves, but I cannot find a flag to switch that behavior back.
> We have reverted to the old version of the war plugin for now.
> our config:
> {code:xml}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-war-plugin</artifactId>
> 	<version>2.0.2</version>
> 	<!-- <version>2.1.1</version> breaks YUI compressor -->
> 	<configuration>
> 		<useDefaultManifestFile>true</useDefaultManifestFile>
> 		<archive>
> 			<manifestEntries>
> 				<Implementation-Title>${project.name}</Implementation-Title> <!-- This is in the default manifest, but we add it explicitly so m2e-wtp 
> 					can pick it up -->
> 				<Implementation-Version>${project.version}</Implementation-Version> <!-- This is in the default manifest, but we add it explicitly so m2e-wtp 
> 					can pick it up -->
> 				<ReleaseName>${releasename}</ReleaseName>
> 			</manifestEntries>
> 		</archive>
> 	</configuration>
> </plugin>
> {code} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira