You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Alex <pi...@googlemail.com> on 2008/08/12 11:12:43 UTC

bootclasspath as a dependency

Hi,

Is there a way to specify a bootclasspath as a dependency?
I've been looking for it for a while but I haven't found a solution yet. 
What I'd like to have would be something as follows:

pom.xml ->
<bootDependency>
  <groupId>javax.xml.bind</groupId>
   <artifactId>jaxb-api</artifactId>
   <version>2.1</version>
</bootDependency>

Meanwhile I've set MANVEN_OPTS, but it would be very nice to use only 
POM files.

  export 
MAVEN_OPTS=-Xbootclasspath/p:$HOME/.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar

Thanks in advance

Alex

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


Re: bootclasspath as a dependency

Posted by Brett Porter <br...@gmail.com>.
Unfortunately there's no built in way to do so. You can still use the
JVM argument options to pass in the option:
http://mojo.codehaus.org/exec-maven-plugin/exec-mojo.html#arguments
http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#argLine

To get the correct value, use:
${settings.localRepository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar
(obviously, dependent on the local repository format).

You need to have the artifact in the local repository first - you can
do that via a regular dependency (though be aware it'll be added to
the normal classpaths as well, which may be undesirable).
Alterantively, you can use the dependency plugin to resolve it.

HTH,
Brett

2008/8/12 Alex <pi...@googlemail.com>:
> Hi,
>
>> at which point do you need it in the boot classpath? For your unit
>> tests, or a plugin?
> For unit tests and for the exec-maven-plugin.
>
> Cheers,
> Alex
>
> Brett Porter wrote:
>>
>> at which point do you need it in the boot classpath? For your unit
>> tests, or a plugin?
>>
>> Cheers,
>> Brett
>>
>> 2008/8/12 Alex <pi...@googlemail.com>:
>>>
>>> Hi,
>>>
>>> Is there a way to specify a bootclasspath as a dependency?
>>> I've been looking for it for a while but I haven't found a solution yet.
>>> What I'd like to have would be something as follows:
>>>
>>> pom.xml ->
>>> <bootDependency>
>>>  <groupId>javax.xml.bind</groupId>
>>>  <artifactId>jaxb-api</artifactId>
>>>  <version>2.1</version>
>>> </bootDependency>
>>>
>>> Meanwhile I've set MANVEN_OPTS, but it would be very nice to use only POM
>>> files.
>>>
>>>  export
>>>
>>> MAVEN_OPTS=-Xbootclasspath/p:$HOME/.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar
>>>
>>> Thanks in advance
>>>
>>> Alex
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>



-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

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


Re: bootclasspath as a dependency

Posted by Alex <pi...@googlemail.com>.
Hi,

 > at which point do you need it in the boot classpath? For your unit
 > tests, or a plugin?
For unit tests and for the exec-maven-plugin.

Cheers,
Alex

Brett Porter wrote:
> at which point do you need it in the boot classpath? For your unit
> tests, or a plugin?
> 
> Cheers,
> Brett
> 
> 2008/8/12 Alex <pi...@googlemail.com>:
>> Hi,
>>
>> Is there a way to specify a bootclasspath as a dependency?
>> I've been looking for it for a while but I haven't found a solution yet.
>> What I'd like to have would be something as follows:
>>
>> pom.xml ->
>> <bootDependency>
>>  <groupId>javax.xml.bind</groupId>
>>  <artifactId>jaxb-api</artifactId>
>>  <version>2.1</version>
>> </bootDependency>
>>
>> Meanwhile I've set MANVEN_OPTS, but it would be very nice to use only POM
>> files.
>>
>>  export
>> MAVEN_OPTS=-Xbootclasspath/p:$HOME/.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar
>>
>> Thanks in advance
>>
>> Alex
>>
>> ---------------------------------------------------------------------
>> 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: bootclasspath as a dependency

Posted by Brett Porter <br...@gmail.com>.
at which point do you need it in the boot classpath? For your unit
tests, or a plugin?

Cheers,
Brett

2008/8/12 Alex <pi...@googlemail.com>:
> Hi,
>
> Is there a way to specify a bootclasspath as a dependency?
> I've been looking for it for a while but I haven't found a solution yet.
> What I'd like to have would be something as follows:
>
> pom.xml ->
> <bootDependency>
>  <groupId>javax.xml.bind</groupId>
>  <artifactId>jaxb-api</artifactId>
>  <version>2.1</version>
> </bootDependency>
>
> Meanwhile I've set MANVEN_OPTS, but it would be very nice to use only POM
> files.
>
>  export
> MAVEN_OPTS=-Xbootclasspath/p:$HOME/.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar
>
> Thanks in advance
>
> Alex
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

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