Loading...

users@maven.apache.org

[Prev] Thread [Next]  |  [Prev] Date [Next]

installing non-maven jars before compile Paul Rivera Mon Apr 02 21:00:16 2012

Hi,

I'm trying to install some non-maven files before I compile my project.
Here's a snippet of my pom.xml:

[code]
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.3.1</version>
                <executions>
                    <execution>
                        <id>install-mallet</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <file>${project.basedir}/lib/somejar.jar</file>
                            <groupId>mygroup</groupId>
                            <artifactId>somejar</artifactId>
                            <version>1</version>
                            <packaging>jar</packaging>
                            <createChecksum>true</createChecksum>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    ...
[/code]


Now, this works fine if I call:
  mvn validate

But if I call:
  mvn compile

These jars don't get installed.  I thought that if I call "mvn compile",
all phases before it will also get called (e.g. validate, initialize,
generate-sources, process-sources, generate-resources, process-resources).
Why is this not happenning?

Best Regards,
Paul