문제

책 "OSGi 및 Apache Felix 3.0"에서 예제를 통해 작업하고 있습니다.Maven Deploy 단계에서는이 메시지로 실패합니다.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project bookshelf-inventory-api: 
Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy failed: 
Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved: 
The repository system is offline but the artifact org.codehaus.plexus:plexus-utils:jar:1.5.6 is not available in the local repository.
.

이게 나에게 무엇을 말하고 있으며 일이 거기에 있습니까?

여기에 내 pom.xml :

<groupId>osgi.example</groupId>
  <artifactId>bookshelf-inventory-api</artifactId>
  <version>1.0.0</version>

  <packaging>bundle</packaging>

  <dependencies>
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>maven-bundle-plugin</artifactId>
      <version>2.4.0</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <inherited>true</inherited>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.4.0</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-Category>inventory</Bundle-Category>
            <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
            <Export-Package>osgi.example.bookshelf.inventory.api</Export-Package>
          </instructions>
          <remoteOBR>repo-rel</remoteOBR>
          <prefixUrl>file:///C:/home/src/demo/osgi/felix-3-book/releases</prefixUrl>
          <ignoreLock>true</ignoreLock>
          <!--
          <instructions>
            <Private-Package>org.foo.myproject.*</Private-Package>
            <Bundle-Activator>org.foo.myproject.impl1.Activator</Bundle-Activator>
          </instructions>
          -->
        </configuration>
      </plugin>
    </plugins>
  </build>
  <distributionManagement>
    <!-- releases repo -->
    <repository>
      <id>repo-rel</id>
      <url>file:///C:/home/src/demo/osgi/felix-3-book/releases</url>
    </repository>
  </distributionManagement>
   <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
.

도움이 되었습니까?

해결책

메시지는 오프라인 모드 (-O)로 빌드하려고하고 있습니다. org.codehaus.plexus : Plexus-utils : jar : 1.5.6 경우가 아니라면이 메시지가 온라인 상태가되면 ~ / .m2 / org / codeaus / plexus를 제거하고 다시 시도하십시오.파일이 오류가있는 파일을 다운로드 할 수 있습니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top