NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Re: Maven-based project: add Saxon dependency

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers
View previous topic :: View next topic  
Author Message
Florent Georges
Posted via mailing list.





PostPosted: Wed Jul 07, 2010 11:04 am    Post subject: Re: Maven-based project: add Saxon dependency Reply with quote

anebuzelsky wrote:

Hi,

Quote:
You can specify the dependency on a secondary artifact by using
<classifier> parameter in your pom.

I closed the project, added the second dependency (with the classifier element) as you suggested, manually, to the pom.xml file. Then opened again the project in NetBeans, selected "Clean and build", and Maven downloaded the corresponding JAR file and NetBeans added it to the project's node "Libraries".

Everything seems fine now, thank you!

NB: Maybe it would be nice to be able to select that from the interface?

Regards,

--
Florent Georges
http://fgeorges.org/
Back to top
Florent Georges
Posted via mailing list.





PostPosted: Wed Jul 07, 2010 11:33 am    Post subject: Re: Maven-based project: add Saxon dependency Reply with quote

anebuzelsky wrote:

Quote:
Quote:
NB: Maybe it would be nice to be able to select that from the
interface?

Quote:
http://netbeans.org/bugzilla/show_bug.cgi?id=188440

Good! thanks for the follow up!

--
Florent Georges
http://fgeorges.org/
Back to top
anebuzelsky
Posted via mailing list.





PostPosted: Wed Jul 07, 2010 1:14 pm    Post subject: Re: Maven-based project: add Saxon dependency Reply with quote

You can specify the dependency on a secondary artifact by using
<classifier> parameter in your pom.

I.e. your dependency section could look like


<dependencies>
...
<dependency>
<groupId>net.sourceforge.saxon</groupId>
<artifactId>saxon</artifactId>
<version>9.1.0.8</version>
</dependency>

<dependency>
<groupId>net.sourceforge.saxon</groupId>
<artifactId>saxon</artifactId>
<version>9.1.0.8</version>
<classifier>s9api</classifier>
</dependency>

</dependencies>


~tonda


On 06/29/2010 07:16 PM, Florent Georges wrote:
Quote:
Hi,

I created a new Maven-based project by using the builtin project
wizard for Maven plugins. That plugin has to use the Saxon XSLT
processor, so I right-click on the "Libraries" node under the
project, and select "Add Dependency". In the "Query" field I type
"saxon", and select "9.1.0.8 [jar,s9api]" in the result list (see
http://fgeorges.org/tmp/maven-nb-xspec.png for a screenshot).

The main Saxon JAR file is downloaded, but not the S9API one, which
you can see at:

http://repo1.maven.org/maven2/net/sourceforge/saxon/saxon/9.1.0.8/

If I expend the JAR added in the "Libraries" mode, I do not see the
package net.sf.saxon.s9api. If I right-click on this JAR and select
"View Artifact Details", I can see "s9api" in the box "Secondary
Artifacts", but there is no way to ask NetBeans to add the
corresponding JAR as a dependency of my project. And the
corresponding JAR (saxon-s9api) is not in my ~/.m2 neither.

How can I ask NetBeans to add the proper dependencies to my project?

Regards,
Back to top
anebuzelsky
Posted via mailing list.





PostPosted: Wed Jul 07, 2010 1:15 pm    Post subject: Re: Maven-based project: add Saxon dependency Reply with quote

On 07/07/2010 01:03 PM, Florent Georges wrote:
Quote:
anebuzelsky wrote:

Hi,

Quote:
You can specify the dependency on a secondary artifact by using
<classifier> parameter in your pom.

I closed the project, added the second dependency (with the
classifier element) as you suggested, manually, to the pom.xml file.
Then opened again the project in NetBeans, selected "Clean and
build", and Maven downloaded the corresponding JAR file and NetBeans
added it to the project's node "Libraries".

Everything seems fine now, thank you!

NB: Maybe it would be nice to be able to select that from the
interface?


http://netbeans.org/bugzilla/show_bug.cgi?id=188440

Rgds,
~tonda
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo