You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Torsten Reinhard (JIRA)" <ji...@codehaus.org> on 2008/02/26 18:04:28 UTC
[jira] Commented: (MWAR-126) It is not possible to package empty
war.
[ http://jira.codehaus.org/browse/MWAR-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_125187 ]
Torsten Reinhard commented on MWAR-126:
---------------------------------------
I´ve been running into the same problem, here´s a part of my pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<classifier>${typeClassifier}</classifier>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>service-remote-spring</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<typeClassifier></typeClassifier>
</properties>
...
</profile>
<profile>
<id>service-local-mock</id>
<properties>
<typeClassifier>mock</typeClassifier>
</properties>
...
</profile>
The build without any classifier works fine,
The build with the classifier "mock" only works, when I have a target\classes directory which may be empty !
> It is not possible to package empty war.
> ----------------------------------------
>
> Key: MWAR-126
> URL: http://jira.codehaus.org/browse/MWAR-126
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.0.2
> Reporter: Libor Kramolis
> Attachments: war-bug.txt
>
>
> If there is no java sources and no resources (src/main/java and src/main/resources does not exist) it is not possible to package war application.
> But if I do NOT user classifier of war plugin there is no problem while war:war goal.
> --
> org.apache.maven.lifecycle.LifecycleExecutionException: Error installing artifact: File d:\work\tutor\development\tutorialproject-war_ws\target\classes does not exist
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
> 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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error installing artifact: File d:\work\tutor\development\tutorialproject-war_ws\target\classes does not exist
> at org.apache.maven.plugin.install.InstallMojo.execute(InstallMojo.java:143)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
> ... 16 more
> Caused by: org.apache.maven.artifact.installer.ArtifactInstallationException: Error installing artifact: File d:\work\tutor\development\tutorialproject-war_ws\target\classes does not exist
> at org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(DefaultArtifactInstaller.java:87)
> at org.apache.maven.plugin.install.InstallMojo.execute(InstallMojo.java:105)
> ... 18 more
> Caused by: java.io.IOException: File d:\work\tutor\development\tutorialproject-war_ws\target\classes does not exist
> at hidden.org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:845)
> at org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(DefaultArtifactInstaller.java:73)
> ... 19 more
> --
--
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