You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by An...@nokia.com on 2004/09/09 03:06:59 UTC

java:jar-resource copy failure

Hi,

I have a strange problem, perhaps you know, what I can do about it. I happens as well on w2k as on red hat. When there are resources defined in the project.xml and the ejb:install goal is invoked, the target path for the resources is duplicated. Any idea what the reason for that strange behaviour is? I don't want to quote the whole output from 'maven -X ...' yet, maybe someone encountered also the same problem once and nows how to deal with it.

resource definition from project.xml:

<resources>
  <resource>
    <directory>${basedir}/j2eesdk/1.4.01/src/deployment/ejb/META-INF</directory>
    <targetPath>${maven.build.dest}/META-INF</targetPath>
    <includes>
      <include>*.xml</include>
    </includes> 
  </resource>
</resources>


Starting the reactor...
Our processing order:
OSS/J Common API Reference Implementation
+----------------------------------------
| Building OSS/J Common API Reference Implementation
| Memory: 2M/3M
+----------------------------------------
build:start:
ri:
build:start:
ejb:init:
java:prepare-filesystem:
[mkdir] Created dir: C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes
java:compile:
[echo] Compiling to C:\Users\My Development\ossj\java.net\project\ossj\common\ri/target/classes
[javac] Compiling 101 source files to C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes
java:jar-resources:
Copying 1 file to C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\META-INF
BUILD FAILED
File...... C:\Users\My Development\ossj\java.net\project\ossj\common\maven.xml
Element... m:reactor
Line...... 21
Column.... 127
Unable to obtain goal [ejb:init] -- C:\Documents and Settings\aebbert\.maven\cache\maven-java-plugin-1.4\plugin.jelly:149:38: <maven:copy-resources> Failed to copy C:\USERS\My Development\ossj\java.net\project\ossj\common\ri\j2eesdk\1.4.01\src\deployment\ejb\META-INF\sun-ejb-jar.xml to C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\META-INF\sun-ejb-jar.xml due to C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\META-INF\sun-ejb-jar.xml (The filename, directory name, or volume label syntax is incorrect)
Total time: 11 seconds
Finished at: Thu Sep 09 02:54:06 CEST 2004

Andreas Ebbert 
   Software Design Engineer - Nokia Networks OSS 
   gsm: +49-177-9413928, fax: +49-211-94123838 
   Heltorfer Straße 1, 40472 Düsseldorf, Germany

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


Re: java:jar-resource copy failure

Posted by Brett Porter <br...@gmail.com>.
target path should just be META-INF. It is relative to maven.build.dest.

You can file a bug in JIRA so that Maven can figure out that you've
done this though - there should be a better error message.

- Brett


On Thu, 9 Sep 2004 03:06:59 +0200, andreas.ebbert@nokia.com
<an...@nokia.com> wrote:
> Hi,
> 
> I have a strange problem, perhaps you know, what I can do about it. I happens as well on w2k as on red hat. When there are resources defined in the project.xml and the ejb:install goal is invoked, the target path for the resources is duplicated. Any idea what the reason for that strange behaviour is? I don't want to quote the whole output from 'maven -X ...' yet, maybe someone encountered also the same problem once and nows how to deal with it.
> 
> resource definition from project.xml:
> 
> <resources>
>   <resource>
>     <directory>${basedir}/j2eesdk/1.4.01/src/deployment/ejb/META-INF</directory>
>     <targetPath>${maven.build.dest}/META-INF</targetPath>
>     <includes>
>       <include>*.xml</include>
>     </includes>
>   </resource>
> </resources>
> 
> Starting the reactor...
> Our processing order:
> OSS/J Common API Reference Implementation
> +----------------------------------------
> | Building OSS/J Common API Reference Implementation
> | Memory: 2M/3M
> +----------------------------------------
> build:start:
> ri:
> build:start:
> ejb:init:
> java:prepare-filesystem:
> [mkdir] Created dir: C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes
> java:compile:
> [echo] Compiling to C:\Users\My Development\ossj\java.net\project\ossj\common\ri/target/classes
> [javac] Compiling 101 source files to C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes
> java:jar-resources:
> Copying 1 file to C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\META-INF
> BUILD FAILED
> File...... C:\Users\My Development\ossj\java.net\project\ossj\common\maven.xml
> Element... m:reactor
> Line...... 21
> Column.... 127
> Unable to obtain goal [ejb:init] -- C:\Documents and Settings\aebbert\.maven\cache\maven-java-plugin-1.4\plugin.jelly:149:38: <maven:copy-resources> Failed to copy C:\USERS\My Development\ossj\java.net\project\ossj\common\ri\j2eesdk\1.4.01\src\deployment\ejb\META-INF\sun-ejb-jar.xml to C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\META-INF\sun-ejb-jar.xml due to C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\META-INF\sun-ejb-jar.xml (The filename, directory name, or volume label syntax is incorrect)
> Total time: 11 seconds
> Finished at: Thu Sep 09 02:54:06 CEST 2004
> 
> Andreas Ebbert
>    Software Design Engineer - Nokia Networks OSS
>    gsm: +49-177-9413928, fax: +49-211-94123838
>    Heltorfer Straße 1, 40472 Düsseldorf, Germany
> 
> ---------------------------------------------------------------------
> 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


Re: java:jar-resource copy failure

Posted by jeff mutonho <ej...@yahoo.com>.
Hi Andreas
The problem is ${maven.build.dest}.Take it out and substitute with the the actual path from  /target/classes.../META-INF.I had the same problem and that's how i got mine to work.If you check my post about having resources copied the same directory as the classes.
 
jeff mutonho

t@nokia.com wrote:
Hi,

I have a strange problem, perhaps you know, what I can do about it. I happens as well on w2k as on red hat. When there are resources defined in the project.xml and the ejb:install goal is invoked, the target path for the resources is duplicated. Any idea what the reason for that strange behaviour is? I don't want to quote the whole output from 'maven -X ...' yet, maybe someone encountered also the same problem once and nows how to deal with it.

resource definition from project.xml:



${basedir}/j2eesdk/1.4.01/src/deployment/ejb/META-INF
${maven.build.dest}/META-INF

*.xml





Starting the reactor...
Our processing order:
OSS/J Common API Reference Implementation
+----------------------------------------
| Building OSS/J Common API Reference Implementation
| Memory: 2M/3M
+----------------------------------------
build:start:
ri:
build:start:
ejb:init:
java:prepare-filesystem:
[mkdir] Created dir: C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes
java:compile:
[echo] Compiling to C:\Users\My Development\ossj\java.net\project\ossj\common\ri/target/classes
[javac] Compiling 101 source files to C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes
java:jar-resources:
Copying 1 file to C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\META-INF
BUILD FAILED
File...... C:\Users\My Development\ossj\java.net\project\ossj\common\maven.xml
Element... m:reactor
Line...... 21
Column.... 127
Unable to obtain goal [ejb:init] -- C:\Documents and Settings\aebbert\.maven\cache\maven-java-plugin-1.4\plugin.jelly:149:38: Failed to copy C:\USERS\My Development\ossj\java.net\project\ossj\common\ri\j2eesdk\1.4.01\src\deployment\ejb\META-INF\sun-ejb-jar.xml to C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\META-INF\sun-ejb-jar.xml due to C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\C:\Users\My Development\ossj\java.net\project\ossj\common\ri\target\classes\META-INF\sun-ejb-jar.xml (The filename, directory name, or volume label syntax is incorrect)
Total time: 11 seconds
Finished at: Thu Sep 09 02:54:06 CEST 2004

Andreas Ebbert 
Software Design Engineer - Nokia Networks OSS 
gsm: +49-177-9413928, fax: +49-211-94123838 
Heltorfer Stra�e 1, 40472 D�sseldorf, Germany

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


		
---------------------------------
Do you Yahoo!?
Shop for Back-to-School deals on Yahoo! Shopping.