siasia/xsbt-web-plugin — Issue #50: war name inconsistent with other artifacts
Author: mtye
Created: 2011-11-08 02:00:50+00:00
State: open

I notice that when I specify a non-standard project name in my `build.sbt`:

```
name := "Hello Lift"
```
sbt will normalize the artifact names:

```
> package-src
[info] Packaging ~/hellolift/target/scala-2.9.1/hello-lift_2.9.1-0.1-sources.jar
> package-doc
[info] Generating API documentation for main sources...
model contains 10 documentable templates
[info] API documentation generation successful.
[info] Packaging ~/hellolift/target/scala-2.9.1/hello-lift_2.9.1-0.1-javadoc.jar ...
```
But the web-plugin does not:

```
> package-war
[info] Compiling 3 Scala sources to ~/hellolift/target/scala-2.9.1/classes...
[info] Packaging ~/webapplications/hellolift/target/scala-2.9.1/Hello Lift_2.9.1-0.1.war ...
```

I think this can be fixed by changing line 60 of [WarPlugin.scala](https://github.com/siasia/xsbt-web-plugin/blob/master/src/main/scala/com/github/siasia/WarPlugin.scala#L60):

```
artifact in packageWar <<= name(n => Artifact(n, "war", "war")),
```
to use the `moduleName` setting, consistent with [Defaults.scala](https://github.com/harrah/xsbt/blob/0.11/main/Defaults.scala#L329):

```
artifact <<= moduleName(n => Artifact(n)),
```

I will submit a pull request with this fix.