To answer my own question:

This worked for me:

   <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <id>bundle-jar</id>
            <phase>package</phase>
            <configuration>
              <archive>
                <manifestEntries>
                  <Bundle-Name>WebLogic Work Manager</Bundle-Name>
 
<Bundle-SymbolicName>com.bea.core.wm.WorkManager</Bundle-SymbolicName>
                  <Bundle-Version>1.0.0</Bundle-Version>
                  <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
 
<Bundle-Activator>com.bea.core.wm.internal.WorkManagerActivator</Bundle-
Activator>
 
<Import-Package>org.osgi.framework,weblogic.kernel,weblogic.utils,weblog
ic.utils.collections,com.bea.core.dioce</Import-Package>
 
<Export-Package>com.bea.core.wm;version=1.0.0</Export-Package>
                  <Bundle-Vendor>BEA Systems, Inc.</Bundle-Vendor>
                  <Bundle-ContactAddress>140 Allen Road, Liberty Corner,
NJ 07938</Bundle-ContactAddress>
                  <Bundle-Copyright>BEA Systems, Inc. (c)
2006</Bundle-Copyright>
                  <Bundle-Description>A thread
manager</Bundle-Description>
                </manifestEntries>
              </archive>
            </configuration>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
          <execution>
            <id>test-bundle-jar</id>
            <phase>package</phase>
            <configuration>
              <archive>
                <manifestEntries>
                  <Bundle-Name>WebLogic Work Manager Test</Bundle-Name>
 
<Bundle-SymbolicName>com.bea.core.wm.WorkManagerTest</Bundle-SymbolicNam
e>
                  <Bundle-Version>1.0.0</Bundle-Version>
                  <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
 
<Bundle-Activator>blah.bea.core.wm.internal.WorkManagerActivator</Bundle
-Activator>
 
<Import-Package>org.osgi.framework,weblogic.kernel,weblogic.utils,weblog
ic.utils.collections,com.bea.core.dioce</Import-Package>
 
<Export-Package>com.bea.core.wm;version=1.0.0</Export-Package>
                  <Bundle-Vendor>BEA Systems, Inc.</Bundle-Vendor>
                  <Bundle-ContactAddress>140 Allen Road, Liberty Corner,
NJ 07938</Bundle-ContactAddress>
                  <Bundle-Copyright>BEA Systems, Inc. (c)
2006</Bundle-Copyright>
                  <Bundle-Description>A thread
manager</Bundle-Description>
                </manifestEntries>
              </archive>
            </configuration>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

Thanks for hanging with me while I learn a new environment!

John Wells (Aziz)
[EMAIL PROTECTED]


-----Original Message-----
From: John Wells 
Sent: Tuesday, January 03, 2006 3:41 PM
To: Maven Users List
Subject: Different manifest for test jar

Multiple questions (I am a newbie with maven 2)

1.  I want the tests to be jar'ed separately from the main files.  I
have been able to do this with:

mvn jar:test-jar

How can I get this to always run as part of the "packaging" phase?
Right now I have to manually type mvn jar:test-jar


2.  I need my test jar to have a different manifest from the main jar.
How can I do this.  Right now I am using something like the following to
generate the main jar:

     <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Bundle-Name>Work Manager</Bundle-Name>
 
<Bundle-SymbolicName>com.bea.core.wm.WorkManager</Bundle-SymbolicName>
              <Bundle-Version>1.0.0</Bundle-Version>
              <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
 
<Bundle-Activator>com.bea.core.wm.internal.WorkManagerActivator</Bundle-
Activator>
              <Import-Package>org.osgi.framework</Import-Package>
 
<Export-Package>com.bea.core.wm;version=1.0.0</Export-Package>
              <Bundle-Description>A thread manager</Bundle-Description>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

Is there anyway to have a different manifest in the test jar?

John Wells (Aziz)
[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]

Reply via email to