2016-06-10 2 views
0

JIRA REST Java 클라이언트를 사용하여 Java 서비스에서 JIRA에 연결을 시도하고 있습니다. 나는 다음과 같은 튜토리얼 다음입니다 : https://ecosystem.atlassian.net/wiki/display/JRJC/TutorialJava 서비스에서 JIRA 연결하기

나는 주어진 예 Example1.java를 실행하는 것을 시도하고있다, 그러나 그것은 나에게 다음과 같은 오류가 있습니다 :

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>gov.grantsolutions.pmo</groupId> 
    <artifactId>jira-pmo</artifactId> 
    <packaging>jar</packaging> 
    <version>1.2</version> 
    <name>jira-pmo</name> 
    <url>http://maven.apache.org</url> 
    <repositories> 
     <repository> 
      <id>atlassian.com</id> 
      <name>Atlassian</name> 
      <url>http://maven.atlassian.com/public</url> 
      <layout>default</layout> 
     </repository> 
    <repository> 
      <id>maven2-repository.dev.java.net</id> 
      <name>Java.net Repository for Maven</name> 
      <url>http://download.java.net/maven/2/</url> 
      <layout>default</layout> 
     </repository> 
    </repositories> 
    <build> 
    <plugins> 
     <plugin> 
     <artifactId>maven-assembly-plugin</artifactId> 
     <version>2.2.1</version> 
     <configuration> 
      <descriptorRefs> 
      <descriptorRef>jar-with-dependencies</descriptorRef> 
      </descriptorRefs> 
      <archive> 
      <manifest> 
       <mainClass>gov.grantsolutions.pmo.App</mainClass> 
      </manifest> 
      </archive> 
     </configuration> 
     <executions> 
      <execution> 
      <id>make-assembly</id> <!-- this is used for inheritance merges --> 
      <phase>package</phase> <!-- bind to the packaging phase --> 
      <goals> 
       <goal>single</goal> 
      </goals> 
      </execution> 
     </executions> 
     </plugin> 
    </plugins> 
    </build> 
    <dependencies> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>3.8.1</version> 
     <scope>test</scope> 
    </dependency> 
     <dependency> 
     <groupId>com.atlassian.jira</groupId> 
     <artifactId>jira-rest-java-client</artifactId> 
     <version>0.2</version> 
    </dependency> 
     <dependency> 
     <groupId>joda-time</groupId> 
     <artifactId>joda-time</artifactId> 
     <version>1.6.2</version> 
     </dependency> 
     <dependency> 
     <groupId>com.google.guava</groupId> 
     <artifactId>guava</artifactId> 
     <version>r08</version> 
     </dependency> 
     <dependency> 
     <groupId>org.bluestemsoftware.open.maven.tparty</groupId> 
     <artifactId>jettison</artifactId> 
     <version>1.1</version> 
     </dependency> 
     <dependency> 
     <groupId>commons-codec</groupId> 
     <artifactId>commons-codec</artifactId> 
     <version>1.3</version> 
     </dependency> 
     <dependency> 
     <groupId>commons-httpclient</groupId> 
     <artifactId>commons-httpclient</artifactId> 
     <version>3.1</version> 
     </dependency> 
     <dependency> 
     <groupId>commons-logging</groupId> 
     <artifactId>commons-logging</artifactId> 
     <version>1.0.4</version> 
     </dependency> 
     <dependency> 
     <groupId>com.sun.jersey</groupId> 
     <artifactId>jersey-client</artifactId> 
     <version>1.19</version> 
     </dependency> 
     <dependency> 
     <groupId>com.sun.jersey</groupId> 
     <artifactId>jersey-core</artifactId> 
     <version>1.17.1</version> 
     </dependency> 
     <dependency> 
     <groupId>com.sun.jersey</groupId> 
     <artifactId>jersey-json</artifactId> 
     <version>1.19</version> 
     </dependency> 
     <dependency> 
     <groupId>com.sun.jersey.contribs</groupId> 
     <artifactId>jersey-apache-client</artifactId> 
     <version>1.19</version> 
     </dependency> 
     <dependency> 
      <groupId>com.sun.xml.bind</groupId> 
     <artifactId>jaxb-impl</artifactId> 
     <version>2.1.12</version> 
     </dependency> 
     <dependency> 
     <groupId>javax.activation</groupId> 
     <artifactId>activation</artifactId> 
     <version>1.1</version> 
     </dependency> 
     <dependency> 
     <groupId>javax.ws.rs</groupId> 
     <artifactId>jsr311-api</artifactId> 
     <version>1.1.1</version> 
     </dependency> 
     <dependency> 
     <groupId>javax.xml</groupId> 
     <artifactId>jaxb-api</artifactId> 
     <version>2.1</version> 
     </dependency> 
     <dependency> 
    <groupId>javax.xml.stream</groupId> 
    <artifactId>stax-api</artifactId> 
    <version>1.0-2</version> 
     </dependency> 
     <dependency> 
     <groupId>org.codehaus.jackson</groupId> 
     <artifactId>jackson-core-asl</artifactId> 
     <version>1.1.1</version> 
     </dependency> 
     <dependency> 
     <groupId>stax</groupId> 
     <artifactId>stax-api</artifactId> 
     <version>1.0.1</version> 
     </dependency>  
    </dependencies> 
</project> 
: 이것은 내 pom.xml 파일이

JerseyJiraRestClientFactory cannot be resolved to a type 
JiraRestClient cannot be resolved to a type 
NullProgressMonitor cannot be resolved to a type 
Issue cannot be resolved to a type 
FieldInput cannot be resolved to a type 
TransitionInput cannot be resolved to a type 

입니다

이 오류를 없애기 위해 추가 할 내용이 더 있는지 알려주세요.

+0

안녕하세요. http://stackoverflow.com/help/on-topic – dunni

+0

@dunni를 보아주세요. 안녕하세요, 제 질문을 좀 더 구체적으로 수정했습니다. 감사. – user3591433

+0

이 예제를 확인하십시오 https://bitbucket.org/atlassian/jira-rest-java-client/src/75a64c9d81aad7d8bd9beb11e098148407b13cae/test/src/test/java/samples/ExampleCreateIssuesAsynchronous.java?at=master&fileviewer=file-view-default –

답변

0

"유형으로 해결할 수 없습니다"는 일반적으로 프로젝트가 올바르게 작성되지 않은 것처럼 냄새가납니다. 따라서 올바른 libs가 maven에 의해 다운로드되지 않았고 IDE가 해당 클래스를 인식하지 못합니다.

보통

mvn clean package 

트릭을 할해야합니다.

그러나 ecosystem.atlassian.net에 대한 자습서는 특히 구형 의존성 측면에서 구형입니다.

당신은 몇 가지 예제 코드를 살펴 수 있습니다 나는 여기에 JRJC를 사용하여 락스 나머지 API에 액세스 쓴 : 당신이 내 코드를 다운로드하는 URL, 사용자 이름, 암호 및 문제 ID 번호를 변경하면 https://github.com/somaiah/jrjc

과 코드가 작동해야합니다.

관련 문제