Because Netbeans created it that way... and in the netbeans created
pom.xml there's no usage of the maven-jar-plugin. Also the statement:
"Starting with version 2.1, the maven-jar-plugin uses Maven Archiver
2.1. This means that it no longer creates the Specification and
Implementation details in the manifest by default."

I dont want to change so much in the pom.xml, because i am new to maven
and dont want to "kill" it, so i hoped there is something like "just add
this line and its done" ;)

thanks,

oli

Am 19.12.2011 12:01, schrieb Anders Hammar:
> Why aren't you using the standard Maven way for a jar project and
> configure the jar plugin?
> http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html
>
> /Anders
>
> On Mon, Dec 19, 2011 at 11:56, Oliver Zemann
> <oliver.zem...@googlemail.com> wrote:
>> Hi,
>>
>> i would like to add a line into my manifest.mf when the .jar is created
>> with netbeans 7.0.1.
>> This is my pom.xml:
>>
>> <profiles>
>>        <profile>
>>            <id>build-for-felix</id>
>>            <dependencies>
>>                <dependency>
>>                    <groupId>org.apache.felix</groupId>
>>                    <artifactId>org.apache.felix.main</artifactId>
>>                    <version>3.0.7</version>
>>                    <scope>provided</scope>
>>                </dependency>
>>                <!-- To include a shell:
>>                <dependency>
>>                    <groupId>org.apache.felix</groupId>
>>                    <artifactId>org.apache.felix.gogo.shell</artifactId>
>>                    <version>0.6.1</version>
>>                </dependency>
>>                -->
>>            </dependencies>
>>            <build>
>>                <plugins>
>>                    <plugin>
>>                        <groupId>org.apache.maven.plugins</groupId>
>>                        <artifactId>maven-antrun-plugin</artifactId>
>>                        <version>1.6</version>
>>                        <executions>
>>                            <execution>
>>                                <id>compile</id>
>>                                <phase>package</phase>
>>                                <goals>
>>                                    <goal>run</goal>
>>                                </goals>
>>                                <configuration>
>>                                    <target>
>>                                        <pathconvert
>> property="plugins.jars" pathsep="${path.separator}">
>>                                            <path
>> refid="maven.runtime.classpath"/>
>>                                            <map
>> from="${project.build.directory}${file.separator}classes" to=""/>
>>                                        </pathconvert>
>>                                        <pathconvert pathsep=" "
>> property="bundles">
>>                                            <path path="${plugins.jars}"/>
>>                                            <mapper>
>>                                                <chainedmapper>
>>                                                    <flattenmapper/>
>>                                                    <globmapper from="*"
>> to="file:modules/*" casesensitive="no"/>
>>                                                </chainedmapper>
>>                                            </mapper>
>>                                        </pathconvert>
>>                                        <propertyfile
>> file="${project.build.directory}/config.properties">
>>                                            <entry
>> key="felix.auto.start" value="${bundles}
>> file:modules/${project.build.finalName}.jar"/>
>>                                            <entry
>> key="org.osgi.framework.bootdelegation" value="*"/>
>>                                        </propertyfile>
>>                                        <copy
>> file="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}"
>> tofile="${project.build.directory}/felix.jar"/>
>>                                    </target>
>>                                </configuration>
>>                            </execution>
>>                        </executions>
>>                    </plugin>
>>                    <plugin>
>>                        <groupId>org.apache.maven.plugins</groupId>
>>                        <artifactId>maven-assembly-plugin</artifactId>
>>                        <version>2.2</version>
>>                        <executions>
>>                            <execution>
>>                                <id>create-executable-jar</id>
>>                                <phase>package</phase>
>>                                <goals>
>>                                    <goal>single</goal>
>>                                </goals>
>>                                <configuration>
>>                                    <descriptors>
>>
>> <descriptor>${basedir}/src/main/assembly/felix.xml</descriptor>
>>                                    </descriptors>
>>
>> <finalName>${project.build.finalName}</finalName>
>>
>> <archive>
>>                                        <manifestEntries>
>>
>> <SPI-Consumer>javax.sound.sampled.AudioSystem#getAudioInputStream</SPI-Consumer>
>>
>> </manifestEntries>
>>                                    </archive>
>>                                </configuration>
>>                            </execution>
>>                        </executions>
>>                    </plugin>
>>                    <plugin>
>>
>> <groupId>org.codehaus.mojo</groupId>
>>
>> <artifactId>exec-maven-plugin</artifactId>
>>                        <version>1.1</version>
>>                        <executions>
>>
>> <execution>
>>
>> <phase>verify</phase>
>>
>> <goals>
>>
>> <goal>exec</goal>
>>
>> </goals>
>>                            </execution>
>>                        </executions>
>>                        <configuration>
>>
>> <executable>java</executable>
>>
>> <workingDirectory>${project.build.dir}</workingDirectory>
>>
>>
>> <arguments>
>>                                <argument>-jar</argument>
>>
>> <argument>org.apache.aries.spifly.static.tool-0.4-SNAPSHOT-jar-with-dependencies.jar</argument>
>>
>> <argument>target/${project.build.finalName}.jar</argument>
>>
>>                            </arguments>
>>                        </configuration>
>>                    </plugin>
>>                    <plugin>
>>                        <groupId>org.apache.maven.plugins</groupId>
>>                        <artifactId>maven-clean-plugin</artifactId>
>>                        <version>2.2</version>
>>                        <configuration>
>>
>> <excludeDefaultDirectories>true</excludeDefaultDirectories>
>>                            <filesets>
>>                                <fileset>
>>                                    <directory>${basedir}/target</directory>
>>                                    <includes>
>>
>> <include>${project.build.finalName}.jar</include>
>>
>>                                    </includes>
>>                                    <excludes>
>>
>> <exclude>${project.build.finalName}-spifly.jar</exclude>
>>
>>                                    </excludes>
>>                                    <followSymlinks>false</followSymlinks>
>>                                </fileset>
>>                            </filesets>
>>                        </configuration>
>>                    </plugin>
>>                </plugins>
>>            </build>
>>        </profile>
>>
>> The problem is in the maven-assembly-plugin. the code:
>> <archive>
>>                                        <manifestEntries>
>>
>> <SPI-Consumer>javax.sound.sampled.AudioSystem#getAudioInputStream</SPI-Consumer>
>>
>> </manifestEntries>
>>                                    </archive>
>> is just not executed and i dont know why...
>> the line that should be added somewhere in the manifest.mf looks like:
>> SPI-Consumer: javax.sound.sampled.AudioSystem#getAudioInputStream
>>
>> i also posted at
>> http://www.coderanch.com/t/561974/tools/maven-adding-line-manifest-mf#2551534
>>
>>
>> thanks
>>
>> oli
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to