2013-10-25 10 views
7

क्या कोई तरीका है कि मैं जावा का कौन सा संस्करण उपयोग कर सकता हूं जब मेरी .jrxml फ़ाइलों को मैवेन रिपोर्ट्स में जैस्पर रिपोर्ट्स (जेस्पररेपोर्ट्स-मेवेन-प्लगइन का उपयोग करके) संकलित करते समय उपयोग किया जाए? मैंने this blog post का दावा करते हुए दावा किया कि जैस्पर आपके कंप्यूटर "में" डिफ़ॉल्ट वर्चुअल मशीन सेट का उपयोग करता है "और" मैवेन-कंपाइलर-प्लगइन का एक ही संस्करण "नहीं। यदि मैं JAVA_HOME पर्यावरण परिवर्तक को बदल या गारंटी नहीं दे सकता, तो मैं जावा 6 के साथ संकलित करने के लिए जैस्पर कैसे प्राप्त कर सकता हूं?जैस्पर रिपोर्ट्स डब्ल्यू/मेवेन - मैं संकलित करने के लिए जावा संस्करण कैसे निर्दिष्ट करूं?

यहाँ मेरी pom.xml से एक टुकड़ा है:

<plugins> 
    <plugin> 
     <groupId>org.codehaus.mojo</groupId> 
     <artifactId>jasperreports-maven-plugin</artifactId> 
     <version>1.0-beta-2</version> 
     <configuration> 
      <outputDirectory>${project.build.directory}/classes</outputDirectory> 
     </configuration> 
     <executions> 
      <execution> 
       <phase>compile</phase> 
       <goals> 
        <goal>compile-reports</goal> 
       </goals> 
      </execution> 
     </executions> 
     <dependencies> 
      <dependency> 
       <groupId>net.sf.jasperreports</groupId> 
       <artifactId>jasperreports</artifactId> 
       <version>5.0.1</version> 
      </dependency> 
     </dependencies> 
    </plugin> 
    <plugin> 
</plugins> 

Codehaus docs पर देख रहे हैं, वहाँ एक पैरामीटर का उपयोग कर सकते है, लेकिन यह कहना नहीं है जो जावा संस्करण निर्दिष्ट करने के लिए कैसे।

धन्यवाद!

उत्तर

7

this issue के अनुसार folllowing मापदंडों आप मदद कर सकते हैं:

<configuration> 
    ... 
    <maven.compiler.source>1.6</maven.compiler.source> 
    <maven.compiler.target>1.6</maven.compiler.target> 
    <compiler>net.sf.jasperreports.engine.design.JRJdtCompiler</compiler> 
    ... 
</configuration> 

1,0-बीटा-2, हालांकि, इन गुणों, तो बाद के संस्करण के लिए आवश्यक है नहीं है। आप स्रोत कोड से प्लगइन बनाने के लिए, here से स्नैपशॉट प्लगइन संस्करण का उपयोग कर सकते हैं। जहां तक ​​मैं देख सकता हूं, plugin code from trunk इन मानकों का समर्थन करता है।

संबंधित मुद्दे

 संबंधित मुद्दे