Hi, all.

Thanks to everyone who helped me out with finding and configuring the
war plugin. I believe that I have the settings correct to do what I need
now.

However, when I try and run "mvn -P dev clean package", I get a null
pointer exception. The War plugin source is available only by
Subversion, which I do not have and am not allowed to install without
prior approval (yay, bureaucracy), so I'm afraid I can't check out
precisely what the problem is here. I don't know what would or wouldn't
be helpful, so I just copied my whole POM down below, along with the
profiles.xml file that defines the "dev" profile referenced above.

Any help or advice would be great--I'm pretty sure that this plugin is
what I need to solve my previous problems with Maven.
~Dan Allen


[INFO] Building jar:
H:\workspace\insurancederiv3\target\com.kbcfp.insurancederiv-0.2.jar
[INFO] [war:exploded {execution: WarPackaging}]
[INFO] Exploding webapp
[INFO] Assembling webapp[com.kbcfp.insurancederiv] in
[H:\workspace\insurancederiv3\target\com.kbcfp.insurancederiv-0.2]
[INFO] Processing war project
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] null
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
        at java.io.File.<init>(File.java:222)
        at
org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.handleWebR
esources(WarProjectPackagingTask.java:88)
        at
org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.performPac
kaging(WarProjectPackagingTask.java:64)
        at
org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.
java:364)
        at
org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(Abstract
WarMojo.java:317)
        at
org.apache.maven.plugin.war.WarExplodedMojo.execute(WarExplodedMojo.java
:40)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:447)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:539)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
ycle(DefaultLifecycleExecutor.java:480)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:459)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:311)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:278)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:143)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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) 

________________________________________________________________________
__
My POM:
________________________________________________________________________
__
<?xml version="1.0" encoding="UTF-8"?>
<project>

        <modelVersion>4.0.0</modelVersion>

        <artifactId>com.kbcfp.insurancederiv</artifactId>
        <name>insurancederiv</name>
        <version>0.2</version>

    <reports>
      <report>jutils-lint4j-plugin</report>
      <report>maven-statcvs-plugin</report>
      <report>maven-changelog-plugin</report>
      <report>maven-changes-plugin</report>
      <report>maven-checkstyle-plugin</report>
      <report>maven-developer-activity-plugin</report>
      <report>maven-file-activity-plugin</report>
      <report>maven-javadoc-plugin</report>
      <report>maven-jdepend-plugin</report>
      <report>maven-junit-report-plugin</report>
      <report>maven-license-plugin</report>
      <report>maven-pmd-plugin</report>
      <report>maven-tasklist-plugin</report>
      <report>maven-faq-plugin</report>
      <report>maven-simian-plugin</report>
    </reports>

    <!-- the version control repository and http url for online access
       the connection element has the form:
       scm:<system>:<system specific connection string> -->
    <scm>
 
<connection>scm:cvs:pserver:[EMAIL PROTECTED]:/proj/webgroup/repository:i
nsurancederiv</connection>
 
<url>http://webgroup.london.kbcfp.com:8000/cgi-bin/cvsweb.cgi/insuranced
eriv/</url>
    </scm>

    <!-- any mailing lists for the project -->
        <mailingLists>
                <mailingList>
                        <name>Web Development London</name>
        
<subscribe>[EMAIL PROTECTED]</subscribe>
        
<unsubscribe>[EMAIL PROTECTED]</unsubscribe>
                        <post>[EMAIL PROTECTED]</post>
                </mailingList>
                <mailingList>
                        <name>Web Production London</name>
        
<subscribe>[EMAIL PROTECTED]</subscribe>
        
<unsubscribe>[EMAIL PROTECTED]</unsubscribe>
                        <post>[EMAIL PROTECTED]</post>
                </mailingList>
        </mailingLists>

    <developers>
        <developer>
            <name>Yuri Fadeev</name>
            <id>fadeevy</id>
            <email>[EMAIL PROTECTED]</email>
            <organization>KBC Financial Products</organization>
            <organizationUrl>http://www.kbcfp.com</organizationUrl>
            <timezone>0</timezone>
        </developer>
        <developer>
            <name>Graham King</name>
            <id>kinggr</id>
            <email>[EMAIL PROTECTED]</email>
            <organization>KBC Financial Products</organization>
            <organizationUrl>http://www.kbcfp.com</organizationUrl>

            <timezone>0</timezone>            
        </developer>
    </developers>
    
    <profiles>
        <profile>
                <id>live</id>
                <properties>
        
<log4j.properties.file>log4j.live.properties</log4j.properties.file>
        
<hibernate.properties.file>hibernate.properties.live</hibernate.properti
es.file>
        
<spreadsheet.storage>/prod/webgroup/insurancederiv/server${server.number
}/tomcat/webapps/insurancederiv/client/spreadsheet/</spreadsheet.storage
>

        
<tomcat.home>/prod/webgroup/insurancederiv/server${server.number}/tomcat
</tomcat.home>
                                
        
<host>server${server.number}.insurancederiv.kbcfp.com</host>
        
<host.url>http\://server${server.number}.insurancederiv.kbcfp.com\:8107/
insurancederiv/</host.url>

        
<email.alerts.system>[EMAIL PROTECTED]</email.alerts.system>
        
<email.business>[EMAIL PROTECTED]</email.business>
        
<email.reports>[EMAIL PROTECTED]</email.reports>

                                <daemon.rv>webextsx1:7500</daemon.rv>
                                
                                <war.goal.type>war</war.goal.type>
                </properties>
                </profile>
                <!-- Development profile requires per-workstation
settings, and therefore is put into a separate
             files (which maven requires be called profiles.xml) that is
not kept in source control. To create
             one, see profiles.xml.template and substitute the relevant
values. -->
    </profiles>

    <dependencies>

        <!-- Test Scope -->

        <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>3.8.1</version>
                <scope>test</scope>
        </dependency>
        
        <!-- Compile Scope -->
        
        <dependency>
                <groupId>commons-beanutils</groupId>
                <artifactId>commons-beanutils</artifactId>
                <version>1.7.0</version>
                <scope>compile</scope>
        </dependency>
        
        <dependency>
                <groupId>commons-lang</groupId>
                <artifactId>commons-lang</artifactId>
                <version>2.1</version>
                <scope>compile</scope>
        </dependency>
        
                <dependency>
                <groupId>hibernate</groupId>
                <artifactId>hibernate</artifactId>
                <version>3.0</version>
                <scope>compile</scope>
        </dependency>
        
        <dependency>
                <groupId>j2ee</groupId>
                <artifactId>mail</artifactId>
                <version>1.3.2</version>
                <scope>compile</scope>
        </dependency>

        <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.8</version>
                <scope>compile</scope>
        </dependency>

        <dependency>
                <groupId>struts</groupId>
                <artifactId>struts</artifactId>
                <version>1.2.8</version>
                <scope>compile</scope>
        </dependency>
        
        <dependency>
            <groupId>tibco</groupId>
            <artifactId>tibrvj</artifactId>
            <version>7.4.1</version>
            <scope>compile</scope>
        </dependency>
        
        <dependency>
                <groupId>tomcat</groupId>
                <artifactId>catalina</artifactId>
                <version>5.5.12</version>
                <scope>provided</scope>
        </dependency>           
        
        <dependency>
                <groupId>tomcat</groupId>
                <artifactId>catalina-optional</artifactId>
                <version>5.5.12</version>
                <scope>provided</scope>
        </dependency>

                <dependency>
                <groupId>servletapi</groupId>
                <artifactId>servletapi</artifactId>
                <version>2.3</version>
                <scope>provided</scope>
        </dependency>
        
        <dependency>
                        <groupId>org.apache.struts</groupId>
                        <artifactId>struts2-core</artifactId>
                        <version>2.0.6</version>
                        <scope>compile</scope>
                </dependency>
                
                <dependency>
                <groupId>taglibs</groupId>
                <artifactId>standard</artifactId>
                <version>1.1.1</version>
                <scope>compile</scope>
        </dependency>
        
        <dependency>
                <groupId>dom4j</groupId>
                <artifactId>dom4j</artifactId>
                <version>1.6</version>
        </dependency>

    </dependencies>

    <build>
                <resources>
                        <resource>
                                <directory>src/main/config</directory>
                                <filtering>true</filtering>
                                <includes>
                                        <include>*.properties</include>
                                        <include>*.xml</include>
                                        <include>*.xsd</include>
        
<include>${log4j.properties.file}</include>
                                </includes>
                                <excludes>
        
<exclude>log4j.properties</exclude>
                                </excludes>
                        </resource>

                        <resource>
        
<directory>src/main/config/hibernate</directory>
                                <includes>
                                        <include>*.xml</include>
        
<include>${hibernate.properties.file}</include>
                                </includes>

                        </resource>

                </resources>
                
                <plugins>
                        <!-- For whatever reason, Maven defaults to
building with Java 1.4 where available, which
                             fails out on any use of the Java 5 features
(annotations, generics, etc), so force 5. -->
                        <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.5</source>
                        <target>1.5</target>
                    </configuration>
                </plugin> 
                
                        <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                                <execution>
                                <id>RenamePropertiesFiles</id>
                                <!-- This must be done before the
Package phase, as at that point the classes directory is
                                     duplicated into the WEB-INF/
directory. -->
                                <phase>compile</phase> 
                                <goals>
                                        <goal>run</goal>
                                </goals>
                                <configuration>
                                        <tasks>
        
<echo>${project.build.directory}</echo>
                                                <filter
token="tomcat.home" value="${tomcat.home}" />
                                                <move
file="${project.build.outputDirectory}\${log4j.properties.file}"
tofile="${project.build.outputDirectory}\log4j.properties"/>
                                                <move
file="${project.build.outputDirectory}\${hibernate.properties.file}"
tofile="${project.build.outputDirectory}\hibernate.properties"/>
                                        </tasks>
                                </configuration>
                                </execution>
                         </executions>
                </plugin>
                
                <plugin>
                        <artifactId>maven-war-plugin</artifactId>
                        <executions>
                                <execution>
                                        <id>WarPackaging</id>
                                        <!-- Defaults to running during
package phase; that's what we want, so let it. -->
                                        <goals>
        
<goal>${war.goal.type}</goal>
                                        </goals>
                                        <configuration>
        
<warName>${project.name}</warName>
                                                <webResources>
                                                    <resource>
        
<filtering>true</filtering>
        
<includes>
        
<include>*.xml</include>
        
</includes>
                                                    </resource>
                                                        </webResources>
                                        </configuration>
                                </execution>
                        </executions>
                </plugin>
            </plugins>

        </build>
</project>
_________________________________________________
Profiles.xml
_________________________________________________
        <profiles>
                <profile>
                <id>dev</id>
                <activation>
                        <activeByDefault>false</activeByDefault>
                </activation>
                <properties>
        
<log4j.properties.file>log4j.dev.properties</log4j.properties.file>
        
<hibernate.properties.file>hibernate.properties.dev</hibernate.propertie
s.file>
        
<tomcat.home>C:\\Software\\Tomcat5.5</tomcat.home>
                                
        
<spreadsheet.storage>H:\workspace\insurancederiv\docs</spreadsheet.stora
ge>
                                
        
<email.alerts.system>[EMAIL PROTECTED]</email.alerts.system>
        
<email.business>[EMAIL PROTECTED]</email.business>
        
<email.reports>[EMAIL PROTECTED]</email.reports>
                                
        
<host.url>http\://caramac.nyc.kbcfp.com\:8081/insurancederiv/</host.url>
                                <host>caramac.nyc.kbcfp.com</host>
                                
        
<daemon.rv>cbdev1.london.kbcfp.com:7500</daemon.rv>
                                
                                <war.goal.type>exploded</war.goal.type>
                </properties>
        </profile>
    </profiles>

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as "KBC FP"). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided "as is", 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to