You may have to look into the plugin internals and see if it has
something like "if packaging == WAR then". If it does, this could be
adjusted, perhaps with a new property to say "ignorePackaging" or
something to that effect.

Wayne

On Thu, Sep 4, 2008 at 6:34 AM, DavidCAIT <[EMAIL PROTECTED]> wrote:
>
> Following your suggestion, I created the following pom file. When running
> maven package, the script compiled all of my java files into a single JAR,
> but it did not precompile my JSP files into a JAR.
>
> Any other suggestions?
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <project xmlns="http://maven.apache.org/POM/4.0.0";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd";>
>
>    <modelVersion>4.0.0</modelVersion>
>
>    <groupId>org.mycompany</groupId>
>    <artifactId>appName</artifactId>
>    <packaging>jar</packaging>
>    <name>appName</name>
>    <version>1.0</version>
>
>    <build>
>            <outputDirectory>target/classes</outputDirectory>
>            <defaultGoal>package</defaultGoal>
>
> <sourceDirectory>src/main/java</sourceDirectory</sourceDirectory>
>
>            <plugins>
>               <!-- Compiles java source files -->
>               <plugin>
>                 <artifactId>maven-compiler-plugin</artifactId>
>                <version>2.0.2</version>
>                <configuration>
>                    <source>1.5</source>
>                    <target>1.5</target>
>                </configuration>
>            </plugin>
>            <!-- Precompile JSP Pages -->
>            <plugin>
>                <groupId>org.codehaus.mojo</groupId>
>                <artifactId>jspc-maven-plugin</artifactId>
>                <configuration>
>                        <includeInProject>true</includeInProject>
>                        
> <warSourceDirectory>webapps/default</warSourceDirectory>
>                        <!-- My JSP files are located in the webapps/default
> directory -->
>                        <workingDirectory>target/build</workingDirectory>
>                </configuration>
>                <executions>
>                    <execution>
>                        <id>jspc</id>
>                        <phase>package</phase>
>                        <goals>
>                            <goal>compile</goal>
>                        </goals>
>                    </execution>
>                </executions>
>            </plugin>
>         </plugins>
>    </build>
> </project>
>
>
>
> Wayne Fay wrote:
>>
>> I have only ever used this plugin in WAR packaging, but I imagine it
>> would work for JAR packaging as well. Have you tried just specifying
>> <packaging>jar</packaging> and putting the plugin in the <plugins>
>> section?
>>
>> Wayne
>>
>> On Wed, Sep 3, 2008 at 11:53 AM, DavidCAIT <[EMAIL PROTECTED]> wrote:
>>>
>>> Hello,
>>>
>>> I am trying to use the JSPC maven plugin to precompile my JSP pages.
>>> However, I need the output (.class files) to be packaged in a jar instead
>>> of
>>> a WAR file. Is there a good way to do this through maven? I would also
>>> like
>>> to use an internal maven plugin instead of calling ant.
>>>
>>> Thanks!
>>>
>>> David
>>> --
>>> View this message in context:
>>> http://www.nabble.com/JSPC-plugin-and-JAR-output-tp19295640p19295640.html
>>> Sent from the mojo - user mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/JSPC-plugin-and-JAR-output-tp19295640p19309012.html
> Sent from the mojo - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to