You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by anamika gupta <an...@hcl.com> on 2011/08/26 06:01:11 UTC
Jar plugin issue
Hi,
I am using maven-jar-plugin-2.3.2, now i am trying to include 2 files from
other folder but now when it is creating the jar, it ends up with only with
only a few files in it (just the stuff in META-INF). The file that I
included is not in the jar either not the classes.
pom.xml is:-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<includes>
<include>${project.basedir}/**</include>
<include>${project.basedir}/../src/main/resources/BPP-Build/config/BPP_Beans.xml</include>
<include>${project.basedir}/../src/main/resources/BPP-Build/config/log4j.properties</include>
</includes>
<finalName>bpp</finalName>
</configuration>
</execution>
</executions>
</plugin>
Any help is appreciated
--
View this message in context: http://maven.40175.n5.nabble.com/Jar-plugin-issue-tp4736854p4736854.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Jar plugin issue
Posted by anamika gupta <an...@hcl.com>.
Thanks , with your reply problem resolved
--
View this message in context: http://maven.40175.n5.nabble.com/Jar-plugin-issue-tp4736854p4737509.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Jar plugin issue
Posted by anamika gupta <an...@hcl.com>.
Thanks
--
View this message in context: http://maven.40175.n5.nabble.com/Jar-plugin-issue-tp4736854p4737511.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Jar plugin issue
Posted by Anders Hammar <an...@hammar.net>.
I get worried when I see something like
${project.basedir}/../blabla
Never EVER walk outside of your Maven project! A Maven project should
be self-contained.
/Anders
On Fri, Aug 26, 2011 at 06:34, Stephen Coy <st...@resolvesw.com> wrote:
> Resources are copied into place by the maven-resources-plugin. You need to configure:
>
> <build>
> <resources>
> <resource>...<resource>
> ...
> <resources>
> </build>
>
> in order to accomplish what you're trying to do here.
>
> If these are source files, then life would be much easier for you if simply moved them into the src/main/resources directory of the module containing your pom.xml file. Then this would all just work with no configuration at all.
>
> Cheers,
>
>
> On 26/08/2011, at 2:01 PM, anamika gupta wrote:
>
>> Hi,
>>
>> I am using maven-jar-plugin-2.3.2, now i am trying to include 2 files from
>> other folder but now when it is creating the jar, it ends up with only with
>> only a few files in it (just the stuff in META-INF). The file that I
>> included is not in the jar either not the classes.
>>
>>
>> pom.xml is:-
>>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-jar-plugin</artifactId>
>> <version>2.3.2</version>
>> <executions>
>> <execution>
>> <goals>
>> <goal>jar</goal>
>> </goals>
>> <configuration>
>> <includes>
>> <include>${project.basedir}/**</include>
>>
>> <include>${project.basedir}/../src/main/resources/BPP-Build/config/BPP_Beans.xml</include>
>>
>> <include>${project.basedir}/../src/main/resources/BPP-Build/config/log4j.properties</include>
>> </includes>
>> <finalName>bpp</finalName>
>> </configuration>
>>
>>
>> </execution>
>> </executions>
>>
>>
>> </plugin>
>>
>>
>> Any help is appreciated
>>
>> --
>> View this message in context: http://maven.40175.n5.nabble.com/Jar-plugin-issue-tp4736854p4736854.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Jar plugin issue
Posted by Stephen Coy <st...@resolvesw.com>.
Resources are copied into place by the maven-resources-plugin. You need to configure:
<build>
<resources>
<resource>...<resource>
...
<resources>
</build>
in order to accomplish what you're trying to do here.
If these are source files, then life would be much easier for you if simply moved them into the src/main/resources directory of the module containing your pom.xml file. Then this would all just work with no configuration at all.
Cheers,
On 26/08/2011, at 2:01 PM, anamika gupta wrote:
> Hi,
>
> I am using maven-jar-plugin-2.3.2, now i am trying to include 2 files from
> other folder but now when it is creating the jar, it ends up with only with
> only a few files in it (just the stuff in META-INF). The file that I
> included is not in the jar either not the classes.
>
>
> pom.xml is:-
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-jar-plugin</artifactId>
> <version>2.3.2</version>
> <executions>
> <execution>
> <goals>
> <goal>jar</goal>
> </goals>
> <configuration>
> <includes>
> <include>${project.basedir}/**</include>
>
> <include>${project.basedir}/../src/main/resources/BPP-Build/config/BPP_Beans.xml</include>
>
> <include>${project.basedir}/../src/main/resources/BPP-Build/config/log4j.properties</include>
> </includes>
> <finalName>bpp</finalName>
> </configuration>
>
>
> </execution>
> </executions>
>
>
> </plugin>
>
>
> Any help is appreciated
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Jar-plugin-issue-tp4736854p4736854.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org