분류 자 태그를 종속성에 추가하여 추가 아티팩트를 참조 할 수 있습니다. 분류는 저장소에있는 유물의 이름의 추가 부분, 예를 들어, JUnit을-4.5 ~ 소스입니다 그래서 .JAR
직접 다음과 같이 당신이 그것을 지정할 수 있습니다 항아리의 JUnit 소스에 대한 종속성을 선언 :
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<classifier>sources</classifier>
<scope>test</scope>
</dependency>
모든 종속 소스를 다운로드하려면 분류 기준 소스를 지정하는 maven-dependency-plugin의 copy-dependencies 목표를 사용하십시오. 다음 예제에서는 소스와 javadocs에 대한 두 가지 실행을 정의합니다. 당신이 우편으로 모든 다운로드 유물을 포장 할 경우
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>sources</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<classifier>sources</classifier>
<failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
<outputDirectory>${project.build.directory}/sources</outputDirectory>
</configuration>
</execution>
<execution>
<id>javadocs</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<classifier>javadoc</classifier>
<failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
<outputDirectory>${project.build.directory}/javadocs</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
, 당신은 프로젝트의 아카이브를 만들 받는다는 - 조립 플러그인을 사용할 수 있습니다. 아래의 예는 어셈블리 설명자 파일의 내용이 소스와의 javadoc 디렉토리를 포함 할 수 있습니다
<assembly>
<id>project</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.basedir}</directory>
<useDefaultExcludes>true</useDefaultExcludes>
<includes>
<include>${project.build.directory}/sources</include>
<include>${project.build.directory}/javadocs</include>
</includes>
</fileSet>
</fileSets>
</assembly>
이 어셈블리를 참조하여 치어에 플러그인 구성을 추가하려면. 위의 내용이 src/main/assembly/sources.xml에 들어 있다고 가정합니다 (위의 종속성 구성 후에 정의되어 있는지 확인하십시오).
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/sources.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
프레임 워크 이름/유형 . 문자열 (http://javasearch.buggybread.com/home2.php?keyword=)을 검색 한 다음 클래스를 나열하십시오. 거기에서 개별 클래스의 javadoc을 볼 수 있습니다. –