I see, you're copying all resources to the include etc. dirs when you write mvn install. I guess I would need something similar (I'll have to confirm). I was actually thinking of fetching rpms in the first phase (copy-resources?), before compiling. Then I'd try to install the rpm, if it's already installed then just skip it, and then do the compile (by calling "make").
Thanks for the idea!

eyal edri wrote:
i found that the rpm plugin only worked with maven 2.0.6 - 2.0.10.

i found a solution for coping file using the resouces:copy-resoucres plugin
or use the assembly pluging to create a dist pkg of .tar.gz.

here's a 'build' for pom.xml i've created:

 <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-dependencies</id>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>/usr/lib/ctch/java</outputDirectory>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>false</overWriteSnapshots>
              <overWriteIfNewer>true</overWriteIfNewer>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.4.1</version>
        <executions>
          <execution>
            <id>copy-conf</id>
            <phase>install</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>

<outputDirectory>/etc/ct-urlf-increase-priority/</outputDirectory>
              <resources>
                <resource>
                  <directory>src/main/resources</directory>
                  <filtering>true</filtering>
                  <includes>
                    <include>**/*.properties</include>
                  </includes>
                </resource>
              </resources>
            </configuration>
          </execution>
          <execution>
            <id>copy-cron</id>
            <phase>install</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>/etc/cron.d/</outputDirectory>
              <resources>
                <resource>
                  <directory>src/main/resources</directory>
                  <filtering>true</filtering>
                  <includes>
                    <include>**/*.cron</include>
                  </includes>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>

<outputDirectory>/usr/local/ct-urlf-increase-priority</outputDirectory>
          <archive>
            <manifest>

<mainClass>com.commtouch.url.unknowns.IncreasePriority</mainClass>
              <addClasspath>true</addClasspath>
              <classpathPrefix>/usr/lib/ctch/java</classpathPrefix>
            </manifest>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>




On Mon, Nov 23, 2009 at 3:47 PM, Gajo Csaba <[email protected]> wrote:

I have been actually using the rpm plugin, found a few bugs in it etc...
The problem is, when you install C++ projects, you want some .h files to be
copied to /usr/include, some .so files to /usr/lib etc. so it cannot work as
easily as for Java projects. I'm guessing it's easy for Perl as well, since
you've got packages...



eyal edri wrote:

you can try playing with the rpm plugin from mojo:
http://mojo.codehaus.org/rpm-maven-plugin/

i'm actually in the same boat as you are.

we've been programming in perl till now, using rpm & yum for deployment.

but from what i learned so far about Maven, you might find that it can
replace
any functionality you got from rpm/yum, thus rendering the use of rpm
packaging redundant.

Eyal.


2009/11/23 Gajo Csaba <[email protected]>



Hello,

We would like to use RPMs similarly to JARs. This means that, when we
install a project, its rpm would go into the repository. When another
project is using this project, then the rpm should be fetched from the
repository and installed. Is there a good way to do this?

The problem might also be that we need to install the rpms in su mode,
though this can be solved for now by running "sudo mvn"

All ideas are welcome!

Thanks, Csaba





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]






--
_____________________   _   _   _   _   ____________________
                    |_| |_| |_| |_| |_|
Csaba Gajo                                         Cosylab
Email: [email protected]       http://www.cosylab.com
Phone: +386 (70) 226-357                  Teslova ulica 30
Skype ID: gcsaba2                        SI-1000 Ljubljana
Yahoo! IM: gcsaba2                                Slovenia
Web page: http://users.cosylab.com/~cgajo
__   _   _   _   _   __________________   _   _   _   _   __
|_| |_| |_| |_| |_| |_| |_| |_| |_| |_|

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to