[ 
http://jira.codehaus.org/browse/MRESOURCES-116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=210641#action_210641
 ] 

Don Corley commented on MRESOURCES-116:
---------------------------------------

Actually I need to filter my byte code because I need the same class files in a 
web accessible location (/classes and /lib) and in the server class file 
location (WEB-INF/classes and WEB-INF/lib). My code runs in a servlet and as an 
applet on the client, so I need to duplicate the code. I'm sure there is an 
easier way, but I have not figured it out yet.
Thanks for the filtering tip... sounds like this is my problem.

> maven-resources-plugin corrupts my class file on move
> -----------------------------------------------------
>
>                 Key: MRESOURCES-116
>                 URL: http://jira.codehaus.org/browse/MRESOURCES-116
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 2.4.1
>         Environment: Linux, jdk 1.6.0_17, maven 2.2.1
>            Reporter: Don Corley
>         Attachments: pom.xml
>
>
> I'm trying to create a copy of my class files and they seem to get corrupted.
> I'm new to maven, so maybe I'm not understanding how it works.
> To recreate this bug, create the simple maven project:
> mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes 
> -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.0 
> -DgroupId=com.example -DartifactId=zjar
> Now, add this maven-resources-plugin from the 
> http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html
>  page to the pom.
> Change the source directory to target/classes and the phase to package (since 
> I want this to run after compile)
> My new pom is attached.
> Now,
> cd target/extra-resources
> java -cp . com.example.App
> gives me Incompatible magic value error. The weird thing is the class in the 
> target/classes directory is fine.
> Thanks

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to