You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Johan S <jo...@gmail.com> on 2009/02/27 11:53:47 UTC

Can no longer create war file

Hi

Suddenly I can't create a war file, with package, install, or war...
Can't figure out what I have done. It says "Access denied" to classes
folder. But the jar that is build and should be injected as dependency lands
in the target folder. I have tried to manually copy the file to classes
folder, but without any luck.

Any help, please...

Error stacktrace:
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in
the plugin manager executing goal
'org.apache.maven.plugins:maven-war-plugin:2.1-alpha-2:war': Mojo execution
failed.
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:505)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
	at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
	at
org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
	at
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
	at
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
	at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
	at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
Caused by: org.apache.maven.plugin.PluginExecutionException: Mojo execution
failed.
	at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:601)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
	... 20 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to copy
file for artifact[com.resultreporter.player:player-core:jar:1.1.0:compile]
	at
org.apache.maven.plugin.war.packaging.ArtifactsPackagingTask.performPackaging(ArtifactsPackagingTask.java:125)
	at
org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.handleArtifacts(WarProjectPackagingTask.java:183)
	at
org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.performPackaging(WarProjectPackagingTask.java:103)
	at
org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:439)
	at
org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375)
	at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181)
	at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143)
	at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579)
	... 21 more
Caused by: java.io.FileNotFoundException:
C:\Workspaces\ResultReporter\resultreporter\player\player-core\target\classes
(Access is denied)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:106)
	at
org.codehaus.plexus.util.io.FileInputStreamFacade.getInputStream(FileInputStreamFacade.java:78)
	at org.codehaus.plexus.util.FileUtils.copyStreamToFile(FileUtils.java:1057)
	at org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:965)
	at
org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask.copyFile(AbstractWarPackagingTask.java:293)
	at
org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask$1.registered(AbstractWarPackagingTask.java:150)
	at
org.apache.maven.plugin.war.util.WebappStructure.registerFile(WebappStructure.java:176)
	at
org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask.copyFile(AbstractWarPackagingTask.java:145)
	at
org.apache.maven.plugin.war.packaging.ArtifactsPackagingTask.performPackaging(ArtifactsPackagingTask.java:100)
	... 28 more

[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILED
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 8 seconds
[INFO] Finished at: Fri Feb 27 11:47:13 CET 2009
[INFO] Final Memory: 3M/18M
[INFO]
------------------------------------------------------------------------

-----
http://www.procensor.se
http://www.mobilepost.se
http://www.resultreporter.com
http://www.butiksbelysning.se
-- 
View this message in context: http://www.nabble.com/Can-no-longer-create-war-file-tp22243531p22243531.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: Can no longer create war file

Posted by Johan S <jo...@gmail.com>.

Marco I know... However I don't know what I did to get it like this. A
single war-project works without any problem. It's only when I have a
multiple modules i a parent project and then a dependency from one of the
modules to the other.


Marco Huber wrote:
> 
> Hi Johan,
> 
> if these are your complete pom.xml's, than you must have an other 
> problem. There are no classifier in there, even only the dependency 
> between core and web.
> 
> The classifier was only a guess.
> 
> Regards
> Marco
> 


-----
http://www.procensor.se
http://www.mobilepost.se
http://www.resultreporter.com
http://www.butiksbelysning.se
-- 
View this message in context: http://www.nabble.com/Can-no-longer-create-war-file-tp22243531p22316318.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: Can no longer create war file

Posted by Marco Huber <mh...@project-team.de>.
Hi Johan,

if these are your complete pom.xml's, than you must have an other 
problem. There are no classifier in there, even only the dependency 
between core and web.

The classifier was only a guess.

Regards
Marco

Johan S wrote:
> Hi
> 
> I think I have a similar problem but don't know how to solve it.
> 
> I have a structure like:
> 
> parent
> |
> |- core
> |
> |- web
> 
> I uploaded my pom files. I renamed them after each module.
> 
> http://www.nabble.com/file/p22295674/pom-core.xml pom-core.xml 
> http://www.nabble.com/file/p22295674/pom-web.xml pom-web.xml 
> http://www.nabble.com/file/p22295674/pom-parent.xml pom-parent.xml 
> 
> Johan
> 
> 
> Marco Huber wrote:
>> Hi Johan,
>>
>> in our project we have the following in the build section in the parent
>> pom:
>>
>> <plugins>
>> 	<plugin>
>> 	<groupId>org.apache.maven.plugins</groupId>
>> 	<artifactId>maven-jar-plugin</artifactId>
>> 	<configuration>
>> 		<classifier>${config.suffix}</classifier>
>> 	</configuration>
>> 	</plugin>
>>
>> 	<plugin>
>> 	<groupId>org.apache.maven.plugins</groupId>
>> 	<artifactId>maven-deploy-plugin</artifactId>
>> 	<configuration>
>> 		<classifier>${config.suffix}</classifier>
>> 	</configuration>
>> 	</plugin>
>> </plugins>
>>
>> The ${config.suffix} is a profile dependend classifier for different 
>> configurations of our application.
>>
>> The problem was that we have a structure like:
>>
>> parent
>> |
>> |- core
>> |
>> |- client
>> |
>> |- services
>>
>> and all sub modules were generated with classifiers, like core-dev.jar, 
>> client-dev.jar, services-dev.jar etc. But the pom.xml's of the sub 
>> modules were not updated in the repository.
>>
>> I thought you have a similar problem, that one of your sub modules have 
>> a classifier, that you use in your war assembly.
>>
>> Regards
>> Marco
>>
> 
> -----
> http://www.procensor.se
> http://www.mobilepost.se
> http://www.resultreporter.com
> http://www.butiksbelysning.se


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


Re: Can no longer create war file

Posted by Johan S <jo...@gmail.com>.
Hi

I think I have a similar problem but don't know how to solve it.

I have a structure like:

parent
|
|- core
|
|- web

I uploaded my pom files. I renamed them after each module.

http://www.nabble.com/file/p22295674/pom-core.xml pom-core.xml 
http://www.nabble.com/file/p22295674/pom-web.xml pom-web.xml 
http://www.nabble.com/file/p22295674/pom-parent.xml pom-parent.xml 

Johan


Marco Huber wrote:
> 
> Hi Johan,
> 
> in our project we have the following in the build section in the parent
> pom:
> 
> <plugins>
> 	<plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-jar-plugin</artifactId>
> 	<configuration>
> 		<classifier>${config.suffix}</classifier>
> 	</configuration>
> 	</plugin>
> 
> 	<plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-deploy-plugin</artifactId>
> 	<configuration>
> 		<classifier>${config.suffix}</classifier>
> 	</configuration>
> 	</plugin>
> </plugins>
> 
> The ${config.suffix} is a profile dependend classifier for different 
> configurations of our application.
> 
> The problem was that we have a structure like:
> 
> parent
> |
> |- core
> |
> |- client
> |
> |- services
> 
> and all sub modules were generated with classifiers, like core-dev.jar, 
> client-dev.jar, services-dev.jar etc. But the pom.xml's of the sub 
> modules were not updated in the repository.
> 
> I thought you have a similar problem, that one of your sub modules have 
> a classifier, that you use in your war assembly.
> 
> Regards
> Marco
> 

-----
http://www.procensor.se
http://www.mobilepost.se
http://www.resultreporter.com
http://www.butiksbelysning.se
-- 
View this message in context: http://www.nabble.com/Can-no-longer-create-war-file-tp22243531p22295674.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: Can no longer create war file

Posted by Marco Huber <mh...@project-team.de>.
Hi Johan,

in our project we have the following in the build section in the parent pom:

<plugins>
	<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-jar-plugin</artifactId>
	<configuration>
		<classifier>${config.suffix}</classifier>
	</configuration>
	</plugin>

	<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-deploy-plugin</artifactId>
	<configuration>
		<classifier>${config.suffix}</classifier>
	</configuration>
	</plugin>
</plugins>

The ${config.suffix} is a profile dependend classifier for different 
configurations of our application.

The problem was that we have a structure like:

parent
|
|- core
|
|- client
|
|- services

and all sub modules were generated with classifiers, like core-dev.jar, 
client-dev.jar, services-dev.jar etc. But the pom.xml's of the sub 
modules were not updated in the repository.

I thought you have a similar problem, that one of your sub modules have 
a classifier, that you use in your war assembly.

Regards
Marco


Johan S wrote:
> Hi Marco
> 
> Could you give me an example with classifiers. I don't think I using it.
> This isn't the only project that it appears in.
> 
> Johan
> 
> 
> Marco Huber wrote:
>> Hi Johan,
>>
>> have you add classifiers to your project or a sub module of your project?
>>
>> I had once the problem, that I got this \target\classes access denied 
>> error, because the install plugin had problems with classifiers. Think 
>> it's fixed.
>>
>> Hope that helps.
>>
>> Marco
>>
> 
> 
> -----
> http://www.procensor.se
> http://www.mobilepost.se
> http://www.resultreporter.com
> http://www.butiksbelysning.se


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


Re: Can no longer create war file

Posted by Johan S <jo...@gmail.com>.
Hi Marco

Could you give me an example with classifiers. I don't think I using it.
This isn't the only project that it appears in.

Johan


Marco Huber wrote:
> 
> Hi Johan,
> 
> have you add classifiers to your project or a sub module of your project?
> 
> I had once the problem, that I got this \target\classes access denied 
> error, because the install plugin had problems with classifiers. Think 
> it's fixed.
> 
> Hope that helps.
> 
> Marco
> 


-----
http://www.procensor.se
http://www.mobilepost.se
http://www.resultreporter.com
http://www.butiksbelysning.se
-- 
View this message in context: http://www.nabble.com/Can-no-longer-create-war-file-tp22243531p22250211.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: Can no longer create war file

Posted by Marco Huber <mh...@project-team.de>.
Hi Johan,

have you add classifiers to your project or a sub module of your project?

I had once the problem, that I got this \target\classes access denied 
error, because the install plugin had problems with classifiers. Think 
it's fixed.

Hope that helps.

Marco

Johan S wrote:
> I have tried that without any luck. Still stuck...
> 
> 
> Brett Randall-2 wrote:
>> What happens if you "mvn clean" or otherwise brute-force delete the
>> offending folder:
>>
>> C:\Workspaces\ResultReporter\resultreporter\player\player-core\target\classes
>> (Access is denied)
>>
>> Brett
>>
>>
> 
> 
> -----
> http://www.procensor.se
> http://www.mobilepost.se
> http://www.resultreporter.com
> http://www.butiksbelysning.se


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


Re: Can no longer create war file

Posted by Johan S <jo...@gmail.com>.
I have tried that without any luck. Still stuck...


Brett Randall-2 wrote:
> 
> What happens if you "mvn clean" or otherwise brute-force delete the
> offending folder:
> 
> C:\Workspaces\ResultReporter\resultreporter\player\player-core\target\classes
> (Access is denied)
> 
> Brett
> 
> 


-----
http://www.procensor.se
http://www.mobilepost.se
http://www.resultreporter.com
http://www.butiksbelysning.se
-- 
View this message in context: http://www.nabble.com/Can-no-longer-create-war-file-tp22243531p22247051.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: Can no longer create war file

Posted by Brett Randall <ja...@gmail.com>.
What happens if you "mvn clean" or otherwise brute-force delete the
offending folder:

C:\Workspaces\ResultReporter\resultreporter\player\player-core\target\classes
(Access is denied)

Brett

On Fri, Feb 27, 2009 at 9:53 PM, Johan S <jo...@gmail.com> wrote:

>
> Hi
>
> Suddenly I can't create a war file, with package, install, or war...
> Can't figure out what I have done. It says "Access denied" to classes
> folder. But the jar that is build and should be injected as dependency
> lands
> in the target folder. I have tried to manually copy the file to classes
> folder, but without any luck.
>
> Any help, please...
>
> Error stacktrace:
> org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in
> the plugin manager executing goal
> 'org.apache.maven.plugins:maven-war-plugin:2.1-alpha-2:war': Mojo execution
> failed.
>        at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:505)
>        at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
>        at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
>        at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
>        at
> org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
>        at
>
> org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
>        at
>
> org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
>        at
>
> org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
>        at
> org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
>        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
>        at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>        at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>        at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
>        at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
>        at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Mojo execution
> failed.
>        at
>
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:601)
>        at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
>        ... 20 more
> Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to copy
> file for artifact[com.resultreporter.player:player-core:jar:1.1.0:compile]
>        at
>
> org.apache.maven.plugin.war.packaging.ArtifactsPackagingTask.performPackaging(ArtifactsPackagingTask.java:125)
>        at
>
> org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.handleArtifacts(WarProjectPackagingTask.java:183)
>        at
>
> org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.performPackaging(WarProjectPackagingTask.java:103)
>        at
>
> org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:439)
>        at
>
> org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375)
>        at
> org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181)
>        at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143)
>        at
>
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579)
>        ... 21 more
> Caused by: java.io.FileNotFoundException:
>
> C:\Workspaces\ResultReporter\resultreporter\player\player-core\target\classes
> (Access is denied)
>        at java.io.FileInputStream.open(Native Method)
>        at java.io.FileInputStream.<init>(FileInputStream.java:106)
>        at
>
> org.codehaus.plexus.util.io.FileInputStreamFacade.getInputStream(FileInputStreamFacade.java:78)
>        at
> org.codehaus.plexus.util.FileUtils.copyStreamToFile(FileUtils.java:1057)
>        at org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:965)
>        at
>
> org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask.copyFile(AbstractWarPackagingTask.java:293)
>        at
>
> org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask$1.registered(AbstractWarPackagingTask.java:150)
>        at
>
> org.apache.maven.plugin.war.util.WebappStructure.registerFile(WebappStructure.java:176)
>        at
>
> org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask.copyFile(AbstractWarPackagingTask.java:145)
>        at
>
> org.apache.maven.plugin.war.packaging.ArtifactsPackagingTask.performPackaging(ArtifactsPackagingTask.java:100)
>        ... 28 more
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILED
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 8 seconds
> [INFO] Finished at: Fri Feb 27 11:47:13 CET 2009
> [INFO] Final Memory: 3M/18M
> [INFO]
> ------------------------------------------------------------------------
>
> -----
> http://www.procensor.se
> http://www.mobilepost.se
> http://www.resultreporter.com
> http://www.butiksbelysning.se
> --
> View this message in context:
> http://www.nabble.com/Can-no-longer-create-war-file-tp22243531p22243531.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
>
>