This is a question that probably belongs on the users' list: [EMAIL PROTECTED] Additionally, the answer to your question can be learned by reading up on the assembly plugin here:

http://maven.apache.org/plugins/maven-assembly-plugin/

Having said that, you can construct a properties-only jar in addition to your main jar with the following configuration:

in your pom.xml:

<project>
  [...]

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.2-beta-2</version>

        <executions>
          <execution>
            <id>create-properties-jar</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
<descriptor>src/main/assembly/properties.xml</ descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>
      [...]
  </build>
  [...]

</project>

and in src/main/assembly/properties.xml:

<assembly>
  <id>properties</id>
  <formats>
    <format>jar</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <directory>src/main/resources</directory>
      <outputDirectory>/</outputDirectory>
    </fileSet>
  </fileSets>
</assembly>

That should do the trick.

-john
On Mar 25, 2008, at 4:45 AM, PashaOvechkin wrote:


Yes, I need separate jar, wich contain ONLY properties...
And I use this plugin now, can you demonstrate what I need to add in my pom
for done this task?

Thans!

[EMAIL PROTECTED] wrote:

Putting files in src/main/resources will cause them to be stored in the
"main" jar created by your module.

Do you want to create two different jars, one for the code and one for
the properties? If so, then the best way is probably to use the
maven-assembly-plugin:
  http://maven.apache.org/plugins/maven-assembly-plugin/usage.html

Regards,
Simon

PashaOvechkin schrieb:
Hmmm... By default? I create src/main/resources directory, and run my
pom...
Don't see any properties jar.... :|


Brian E Fox wrote:

Put them in src/main/resources and it should happen by default.

-----Original Message-----
From: PashaOvechkin [mailto:[EMAIL PROTECTED]
Sent: Monday, March 24, 2008 11:53 AM
To: dev@maven.apache.org
Subject: How to build properties JAR


I need with Maven command get jar with properties files(only with
properties
files).
What i need add in my pom.xml?

(for example in the same directory with pom.xml I have aaa.properties
and
bbb.properties, and need jar with both files)

Tanks!!!
--
View this message in context:
http://www.nabble.com/How-to-build-properties-JAR- tp16254904s177p1625490
4.html
Sent from the Maven Developers mailing list archive at Nabble.com.


------------------------------------------------------------------- --
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]








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




--
View this message in context: http://www.nabble.com/How-to-build- properties-JAR-tp16254904s177p16271122.html
Sent from the Maven Developers mailing list archive at Nabble.com.


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


---
John Casey
Committer and PMC Member, Apache Maven
mail: jdcasey at commonjava dot org
blog: http://www.ejlife.net/blogs/john
rss: http://feeds.feedburner.com/ejlife/john


Reply via email to